P_PurchaseOrderSupplierAddress

DDL: P_PURCHASEORDERSUPPLIERADDRESS SQL: PPUORDSUPADD Type: view COMPOSITE

P_PurchaseOrderSupplierAddress is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrder) and exposes 4 fields with key field PurchaseOrder. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PurchaseOrder PurchaseOrder from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_Address_2 _SupplierAddress $projection.SupplierAddressID = _SupplierAddress.AddressID and $projection.AddressPersonID = '' and $projection.AddressRepresentationCode = ''
[0..1] I_Customer _CustomerAddress PurchaseOrder.Customer = _CustomerAddress.Customer

Annotations (11)

NameValueLevelField
AbapCatalog.preserveKey true view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PPUORDSUPADD view
AbapCatalog.compiler.compareFilter true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder I_PurchaseOrder PurchaseOrder
AddressPersonID
AddressRepresentationCode
_SupplierAddress _SupplierAddress
@AbapCatalog.preserveKey: true
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'PPUORDSUPADD'
@AbapCatalog.compiler.compareFilter: true
@ObjectModel.usageType: {
             dataClass: #MIXED,
        serviceQuality: #B,
          sizeCategory: #L
          }
@AccessControl: { authorizationCheck: #NOT_REQUIRED, personalData.blocking: #BLOCKED_DATA_EXCLUDED, privilegedAssociations: [ '_SupplierAddress' ] }

/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK", "CALCULATED_FIELD_CHECK" ]  } */
define view P_PurchaseOrderSupplierAddress
  as select from I_PurchaseOrder as PurchaseOrder
  association [0..1] to I_Address_2 as _SupplierAddress on  $projection.SupplierAddressID         = _SupplierAddress.AddressID
                                                        and $projection.AddressPersonID           = ''
                                                        and $projection.AddressRepresentationCode = ''

  association [0..1] to I_Customer as _CustomerAddress on  PurchaseOrder.Customer = _CustomerAddress.Customer
{
  key PurchaseOrder.PurchaseOrder,
   ''  as AddressPersonID,
   ''  as AddressRepresentationCode,

      case
      when ManualSupplierAddressID = '' or ManualSupplierAddressID is null then
       case
         when Customer = '' or Customer is null then
           case
            when  SupplyingPlant = '' or SupplyingPlant is null then
                 _Supplier.AddressID
            else _SupplyingPlant.AddressID
           end
         else    _CustomerAddress.AddressID
         end
      else   ManualSupplierAddressID
      end as SupplierAddressID,

      // Associations

       @ObjectModel.foreignKey.association: '_SupplierAddress'
      _SupplierAddress
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMER",
"I_PLANT",
"I_PURCHASEORDER",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"I_ADDRESS_2",
"I_CUSTOMER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/