P_PurOrdItemDeliveryAddress

DDL: P_PURORDITEMDELIVERYADDRESS SQL: PPUORDDELAD Type: view COMPOSITE

P_PurOrdItemDeliveryAddress is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_PurchaseOrderItem) and exposes 6 fields with key fields PurchaseOrder, PurchaseOrderItem. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_PurchaseOrderItem I_PurchaseOrderItem from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_PurchaseOrder _PurchaseOrder $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder
[0..1] P_StorLocDefaultAddress _StorLocDefAddr $projection.Plant = _StorLocDefAddr.Plant and $projection.StorageLocation = _StorLocDefAddr.StorageLocation
[0..*] I_Address_2 _DeliveryAddress $projection.ItemDeliveryAddressID = _DeliveryAddress.AddressID

Annotations (11)

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

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder I_PurchaseOrderItem PurchaseOrder
KEY PurchaseOrderItem I_PurchaseOrderItem PurchaseOrderItem
StorageLocation StorageLocation
_DeliveryAddress _DeliveryAddress
_PurchaseOrder _PurchaseOrder
Plant I_PurchaseOrderItem Plant
@AbapCatalog.preserveKey: true
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {
             dataClass: #MIXED,
        serviceQuality: #C,
          sizeCategory: #L
          }
@AbapCatalog.sqlViewName: 'PPUORDDELAD'
@AbapCatalog.compiler.compareFilter: true 
@AccessControl: { authorizationCheck: #NOT_REQUIRED, personalData.blocking: #BLOCKED_DATA_EXCLUDED, privilegedAssociations: [ '_DeliveryAddress' ] }


define view P_PurOrdItemDeliveryAddress
  as select from I_PurchaseOrderItem
  association [1..1] to I_PurchaseOrder         as _PurchaseOrder  on  $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder
  association [0..1] to P_StorLocDefaultAddress as _StorLocDefAddr on  $projection.Plant           = _StorLocDefAddr.Plant
                                                                   and $projection.StorageLocation = _StorLocDefAddr.StorageLocation
  association [0..*]    to I_Address_2             as _DeliveryAddress  on  $projection.ItemDeliveryAddressID = _DeliveryAddress.AddressID
{
  key I_PurchaseOrderItem.PurchaseOrder,
  key I_PurchaseOrderItem.PurchaseOrderItem,

      StorageLocation,
   
      case
      when ManualDeliveryAddressID = '' or ManualDeliveryAddressID is null then
       case
         when ReferenceDeliveryAddressID = '' or ReferenceDeliveryAddressID is null then
           case
            when Subcontractor = '' or Subcontractor is null then
             case
             when Customer = '' or Customer is null then
              case
               when _StorLocDefAddr.AddressID = '' or _StorLocDefAddr.AddressID is null then _Plant.AddressID
             else _StorLocDefAddr.AddressID
             end
             else _Customer.AddressID
             end
             else _Subcontractor.AddressID
           end
         else ReferenceDeliveryAddressID
       end
      else ManualDeliveryAddressID
      end                      as ItemDeliveryAddressID,


       
      _DeliveryAddress,
      _PurchaseOrder,

      I_PurchaseOrderItem.Plant as Plant

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMER",
"I_PLANT",
"I_PURCHASEORDERITEM",
"I_SUPPLIER",
"P_STORLOCDEFAULTADDRESS"
],
"ASSOCIATED":
[
"I_ADDRESS_2",
"I_PURCHASEORDER",
"P_STORLOCDEFAULTADDRESS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/