C_Customer360DeliveryDocument

DDL: C_CUSTOMER360DELIVERYDOCUMENT SQL: CUST360BDRDEL Type: view_entity CONSUMPTION

Customer 360 Outbound Delivery

C_Customer360DeliveryDocument is a Consumption CDS View that provides data about "Customer 360 Outbound Delivery" in SAP S/4HANA. It reads from 2 data sources (I_Customer360BusDocSetting, I_OutboundDelivery) and exposes 61 fields with key field OutboundDelivery. It has 6 associations to related views. It is exposed through 1 OData service (SD_ADVNCD_CUSTOMER360).

Data Sources (2)

SourceAliasJoin Type
I_Customer360BusDocSetting Customer360BusDocSetting inner
I_OutboundDelivery OutboundDelivery from

Associations (6)

CardinalityTargetAliasCondition
[0..*] C_DeliveryShipToPartyVH _DeliveryShipToPartyVH $projection.ShipToParty = _DeliveryShipToPartyVH.Customer
[0..1] I_DeliveryPriority _DeliveryPriority $projection.DeliveryPriority = _DeliveryPriority.DeliveryPriority
[0..1] C_ShippingPointVH _ShippingPointVH $projection.ShippingPoint = _ShippingPointVH.ShippingPoint
[0..1] C_OutboundDeliveryTypeVH _DeliveryTypeVH $projection.DeliveryDocumentType = _DeliveryTypeVH.DeliveryDocumentType
[0..1] I_User _User $projection.CreatedByUser = _User.UserID
[0..*] C_OutbDelivFirstFreightOrd _FreightOrder $projection.OutboundDelivery = _FreightOrder.DeliveryDocument

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Customer 360 Outbound Delivery view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view
Search.searchable true view

OData Services (1)

ServiceBindingVersionContractRelease
SD_ADVNCD_CUSTOMER360 SD_ADVNCD_CUSTOMER360 V4 C1 NOT_RELEASED

Fields (61)

KeyFieldSource TableSource FieldDescription
KEY OutboundDelivery I_OutboundDelivery OutboundDelivery
EU_DeliveryARCStatus I_OutboundDelivery EU_DeliveryARCStatus Excise Tax ARC Status
EU_ARCStatusDesc
numc2asDeliveryPriority Delivery Priority
DeliveryPriorityDesc
PickingDate I_OutboundDelivery PickingDate
OverallPickingStatus I_OutboundDelivery OverallPickingStatus
OverallPickingStatusDesc
int1asPickingStatusCriticality
OverallPickingConfStatus I_OutboundDelivery OverallPickingConfStatus Confirmation Status
OverallPickingConfStatusDesc
int1asConfirmationStatusCriticality
FreightOrder _FreightOrder FreightOrder
OverallGoodsMovementStatus I_OutboundDelivery OverallGoodsMovementStatus
OverallGoodsMovementStatusDesc
int1asGoodsMovementStatusCriticality
ShipToParty I_OutboundDelivery ShipToParty
CustomerName
ShippingPoint I_OutboundDelivery ShippingPoint
ShippingPointName
ActualGoodsMovementDate I_OutboundDelivery ActualGoodsMovementDate Actual Goods Movement Date
PlannedGoodsIssueDate
LoadingDate I_OutboundDelivery LoadingDate
CreatedByUser I_OutboundDelivery CreatedByUser
UserDescription _User UserDescription
DeliveryDocumentType I_OutboundDelivery DeliveryDocumentType
DeliveryTypeName
CreationDate I_OutboundDelivery CreationDate
OverallChmlCmplncStatus I_OutboundDelivery OverallChmlCmplncStatus Product Marketability Status
OverallChmlCmplncStatusDesc
int1asOvrlChmlCmplncStsCriticality
OverallDangerousGoodsStatus I_OutboundDelivery OverallDangerousGoodsStatus Dangerous Goods Status
OverallDangerousGoodsStsDesc
int1asOvrlDngrsGdsStsCriticality
OverallSafetyDataSheetStatus I_OutboundDelivery OverallSafetyDataSheetStatus Safety Data Sheet Status
OverallSafetyDataSheetStsDesc
int1asOvrlSftyDataSheetStsCritlty
ReadyForWarehouseExecStatus I_OutboundDelivery ReadyForWarehouseExecStatus Warehouse Execution Status
SafetyDataSheetStatusDesc
DelivAdvncdShipgRcvgRlvnce I_OutboundDelivery DelivAdvncdShipgRcvgRlvnce
DelivAdvncdShipgRcvgRlvnceDesc
ProposedDeliveryRoute I_OutboundDelivery ProposedDeliveryRoute
RouteName
_DeliveryPriority _DeliveryPriority
_ShipToParty I_OutboundDelivery _ShipToParty
_ShippingPoint I_OutboundDelivery _ShippingPoint
_LogProcgStsPick _LogProcgStsPick
_LogProcgStsConf _LogProcgStsConf
_LogProcgStsMove _LogProcgStsMove
_DeliveryShipToPartyVH _DeliveryShipToPartyVH
_DeliveryTypeVH _DeliveryTypeVH
_ShippingPointVH _ShippingPointVH
_OverallChmlCmplncStatus I_OutboundDelivery _OverallChmlCmplncStatus
_OverallDangerousGoodsStatus I_OutboundDelivery _OverallDangerousGoodsStatus
_OvrlSftyDataSheetSts I_OutboundDelivery _OvrlSftyDataSheetSts
_User _User
_ExciseTaxStatus I_OutboundDelivery _ExciseTaxStatus
_WarehouseExecutionStatus I_OutboundDelivery _WarehouseExecutionStatus
_DelivAdvncdShipgRcvgRlvnce I_OutboundDelivery _DelivAdvncdShipgRcvgRlvnce
_ProposedDeliveryRoute I_OutboundDelivery _ProposedDeliveryRoute
_FreightOrder _FreightOrder
//@AbapCatalog.sqlViewName: 'CUST360BDRDEL'

//@AbapCatalog.compiler.compareFilter: true

//@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Customer 360 Outbound Delivery'
@ObjectModel: {
//  compositionRoot: true,

//  representativeKey: 'DeliveryDocument',

  usageType: {
    dataClass: #TRANSACTIONAL,
    serviceQuality: #D,
    sizeCategory: #XL
    }
 }
@VDM.viewType: #CONSUMPTION 
@Metadata.allowExtensions: true
 @Search.searchable: true
define view entity C_Customer360DeliveryDocument as select from I_OutboundDelivery as OutboundDelivery 
inner join I_Customer360BusDocSetting as Customer360BusDocSetting on Customer360BusDocSetting.Cust360BusDocCategory     = 'J'
                                                                  and Customer360BusDocSetting.BusinessDocumentIsEnabled = 'X'
  association        to I_LogProcgSts              as _LogProcgStsPick     on $projection.OverallPickingStatus = _LogProcgStsPick.ProcessingStatus
  association        to I_LogProcgSts              as _LogProcgStsConf     on $projection.OverallPickingConfStatus = _LogProcgStsConf.ProcessingStatus
  association        to I_LogProcgSts              as _LogProcgStsMove     on $projection.OverallGoodsMovementStatus = _LogProcgStsMove.ProcessingStatus
  association [0..*] to C_DeliveryShipToPartyVH    as _DeliveryShipToPartyVH on $projection.ShipToParty = _DeliveryShipToPartyVH.Customer
  association [0..1] to I_DeliveryPriority         as _DeliveryPriority    on $projection.DeliveryPriority = _DeliveryPriority.DeliveryPriority
  association [0..1] to C_ShippingPointVH          as _ShippingPointVH     on $projection.ShippingPoint = _ShippingPointVH.ShippingPoint
  association [0..1] to C_OutboundDeliveryTypeVH   as _DeliveryTypeVH      on $projection.DeliveryDocumentType = _DeliveryTypeVH.DeliveryDocumentType
  association [0..1] to I_User                     as _User                on $projection.CreatedByUser = _User.UserID
  association [0..*] to C_OutbDelivFirstFreightOrd as _FreightOrder        on $projection.OutboundDelivery = _FreightOrder.DeliveryDocument
 {


      @Consumption.semanticObject: 'OutboundDelivery'
      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #HIGH
  key OutboundDelivery.OutboundDelivery                                                                  as OutboundDelivery,

      @EndUserText.label: 'Excise Tax ARC Status'
      @ObjectModel.text.element: ['EU_ARCStatusDesc']
      OutboundDelivery.EU_DeliveryARCStatus,
      @UI.hidden: true
      OutboundDelivery._ExciseTaxStatus._Text[1:Language = $session.system_language].EU_ARCStatusDesc,
      
      @EndUserText.label: 'Delivery Priority'
      @ObjectModel.foreignKey.association: '_DeliveryPriority'
      @ObjectModel.text.element: ['DeliveryPriorityDesc']
      cast(case 
      when  OutboundDelivery.DeliveryPriority = '00' then '  '
      else OutboundDelivery.DeliveryPriority
      end    as abap.numc(2) )                                                                                              as DeliveryPriority,
      OutboundDelivery._DeliveryPriority._Text[1:Language = $session.system_language].DeliveryPriorityDesc as DeliveryPriorityDesc,

      OutboundDelivery.PickingDate,

  //    @EndUserText.label: 'Picking Status'

      @ObjectModel.foreignKey.association:'_LogProcgStsPick'
      @ObjectModel.text.element: ['OverallPickingStatusDesc']
      OutboundDelivery.OverallPickingStatus,
      OutboundDelivery._OverallPickingStatus._Text[1:Language = $session.system_language].OverallPickingStatusDesc,

      @UI.hidden
      cast(
        case OutboundDelivery.OverallPickingStatus
         when '' then 0
         when 'A' then 1
         when 'B' then 2
         when 'C' then 3
         else 0
        end as abap.int1
      )                                                                                                   as PickingStatusCriticality,

      @EndUserText.label: 'Confirmation Status'
      @ObjectModel.foreignKey.association:'_LogProcgStsConf'
      @ObjectModel.text.element: ['OverallPickingConfStatusDesc']
      OutboundDelivery.OverallPickingConfStatus,
      OutboundDelivery._OverallPickingConfStatus._Text[1:Language = $session.system_language].OverallPickingConfStatusDesc as OverallPickingConfStatusDesc,

      @UI.hidden
      cast(
        case OutboundDelivery.OverallPickingConfStatus
         when '' then 0
         when 'A' then 1
         when 'B' then 2
         when 'C' then 3
         else 0
        end as abap.int1
      )                                                                                                   as ConfirmationStatusCriticality,


      @Consumption.valueHelpDefinition: [{entity: {name: 'C_OutbDelivFreightOrdVH',element: 'FreightOrder'} }]
     
      _FreightOrder.FreightOrder                                                                        as FreightOrder,

      //@EndUserText.label: 'GI Status'

      @ObjectModel.foreignKey.association:'_LogProcgStsMove'
      @ObjectModel.text.element: ['OverallGoodsMovementStatusDesc']
      OutboundDelivery.OverallGoodsMovementStatus,
      OutboundDelivery._OverallGoodsMovementStatus._Text[1:Language = $session.system_language].OverallGoodsMovementStatusDesc as OverallGoodsMovementStatusDesc,

      @UI.hidden:true
      cast(
        case OutboundDelivery.OverallGoodsMovementStatus
         when '' then 0
         when 'A' then 1
         when 'B' then 2
         when 'C' then 3
         else 0
        end as abap.int1
       )                                                                                                  as GoodsMovementStatusCriticality,

//     @Consumption: {

//        valueHelpDefinition: [

//        { entity: { name : 'C_DeliveryShipToPartyVH', element: 'Customer' } ,

////        { entity: { name : 'I_BPCustomerMultiAddrVH', element: 'Customer' } ,

//               qualifier: 'CustMultiAddr1',

//               label: 'Ship-To-Party with Standard Address'

//               },

//             { entity: { name: 'I_BPCustomerMultiAddrVH', element: 'Customer'},

//                   qualifier: 'CustMultiAddr',

//                   label: 'Ship-To-Party with Multiple Addresses',

//                   enabled: 'BPCustMultiAddrIsActive'

//                  }

//            ]

//         }

      @ObjectModel.text.element: ['CustomerName']
      @UI.textArrangement: #TEXT_FIRST
      @Consumption.semanticObject: 'Customer'
      OutboundDelivery.ShipToParty,

      @UI.hidden: true
      OutboundDelivery._Partner[1:PartnerFunction='WE']._Address.FullName                                                  as CustomerName,

      @UI.textArrangement: #TEXT_FIRST
      @Consumption.valueHelpDefinition: [{entity: {name: 'C_ShippingPointVH',element: 'ShippingPoint'} }]
      @ObjectModel.text.element: ['ShippingPointName']
      OutboundDelivery.ShippingPoint,

      @UI.hidden: true
      cast(OutboundDelivery._ShippingPoint._Text[1: Language=$session.system_language].ShippingPointName as bezei30)       as ShippingPointName,

      @EndUserText.label: 'Actual Goods Movement Date'
      OutboundDelivery.ActualGoodsMovementDate,

      cast (OutboundDelivery.PlannedGoodsIssueDate as wadak_plan)                                                          as PlannedGoodsIssueDate,

      OutboundDelivery.LoadingDate,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'C_OutbDelivListCreatedByVH', element: 'UserID' } } ]
      @ObjectModel.text.element:  [ 'UserDescription' ]
      OutboundDelivery.CreatedByUser,

      @UI.hidden: true
      @Semantics.text: true
      _User.UserDescription                                                                               as UserDescription,

      @Consumption.valueHelpDefinition: [{entity: {name: 'C_OutboundDeliveryTypeVH',element: 'DeliveryDocumentType'} }]
      @UI.textArrangement: #TEXT_FIRST
      @ObjectModel.text.element: ['DeliveryTypeName']
      OutboundDelivery.DeliveryDocumentType,

      @UI.hidden: true
      cast(_DeliveryTypeVH._Text[1: Language=$session.system_language].DeliveryDocumentTypeName as vtext) as DeliveryTypeName,

      OutboundDelivery.CreationDate,

      // Overall Marketability Check Status

      @ObjectModel.foreignKey.association:'_OverallChmlCmplncStatus'
      @EndUserText.label: 'Product Marketability Status'
      @ObjectModel.text.element: ['OverallChmlCmplncStatusDesc']
      OutboundDelivery.OverallChmlCmplncStatus,
      OutboundDelivery._OverallChmlCmplncStatus._Text[1:Language = $session.system_language].OverallChmlCmplncStatusDesc as OverallChmlCmplncStatusDesc,

      @UI.hidden
      cast(
        case OutboundDelivery.OverallChmlCmplncStatus
          when '' then 0
          when 'A' then 3
          when 'C' then 1
          when 'D' then 1
          else 0
        end as abap.int1
      )                                                                                                   as OvrlChmlCmplncStsCriticality,

      // Overall Dangerous Goods Status

      @ObjectModel.foreignKey.association:'_OverallDangerousGoodsStatus'
      @EndUserText.label: 'Dangerous Goods Status'
      @ObjectModel.text.element: ['OverallDangerousGoodsStsDesc']
      OutboundDelivery.OverallDangerousGoodsStatus,
      OutboundDelivery._OverallDangerousGoodsStatus._Text[1:Language = $session.system_language].OverallDangerousGoodsStsDesc as OverallDangerousGoodsStsDesc,

      @UI.hidden
      cast(
        case OutboundDelivery.OverallDangerousGoodsStatus
          when '' then 0
          when 'A' then 3
          when 'B' then 2
          when 'D' then 1
          else 0
        end as abap.int1
      )                                                                                                   as OvrlDngrsGdsStsCriticality,

      // Overall Safety Data Sheet Status

      @ObjectModel.foreignKey.association:'_OvrlSftyDataSheetSts'
      @EndUserText.label: 'Safety Data Sheet Status'
      @ObjectModel.text.element: ['OverallSafetyDataSheetStsDesc']
      OutboundDelivery.OverallSafetyDataSheetStatus,
      OutboundDelivery._OvrlSftyDataSheetSts._Text[1:Language = $session.system_language].OverallSafetyDataSheetStsDesc as OverallSafetyDataSheetStsDesc,

      @UI.hidden
      cast(
        case OutboundDelivery.OverallSafetyDataSheetStatus
          when '' then 0
          when 'A' then 3
          when 'B' then 2
          when 'D' then 1
          else 0
        end as abap.int1
      )                                                                                                   as OvrlSftyDataSheetStsCritlty,

      @EndUserText.label: 'Warehouse Execution Status'
      @Feature: 'LE_SHP_ASR_SHOW_FIELDS'
      @ObjectModel.foreignKey.association: '_WarehouseExecutionStatus'
      @ObjectModel.text.element: ['SafetyDataSheetStatusDesc']
      OutboundDelivery.ReadyForWarehouseExecStatus,
      OutboundDelivery._WarehouseExecutionStatus._Text[1:Language = $session.system_language].SafetyDataSheetStatusDesc as SafetyDataSheetStatusDesc,

      //@EndUserText.label: 'Adv. Ship. & Rec. Relevance'

      @Feature: 'LE_SHP_ASR_SHOW_FIELDS'
      @ObjectModel.foreignKey.association: '_DelivAdvncdShipgRcvgRlvnce'
      @ObjectModel.text.element: ['DelivAdvncdShipgRcvgRlvnceDesc']
      OutboundDelivery.DelivAdvncdShipgRcvgRlvnce,
      OutboundDelivery._DelivAdvncdShipgRcvgRlvnce._Text[1:Language = $session.system_language].DelivAdvncdShipgRcvgRlvnceDesc as DelivAdvncdShipgRcvgRlvnceDesc,

      @ObjectModel.foreignKey.association: '_ProposedDeliveryRoute'
      @ObjectModel.text.element: ['RouteName']
      OutboundDelivery.ProposedDeliveryRoute,
      OutboundDelivery._ProposedDeliveryRoute._Text[1:Language = $session.system_language].RouteName as RouteName,

//      @ObjectModel.readOnly: true

//      @ObjectModel.virtualElement

//      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_BP_MULTI_ADDR_BF_CALC_EXIT'

////      @ObjectModel.virtualElementCalculatedBy: 'ABAP:ZCL_LE_SHP_BP_MULT_ADDR'

//      cast(' ' as abap_boolean  )                                                           as BPCustMultiAddrIsActive,


      //Associations

      @Consumption.filter.hidden: true
      _DeliveryPriority,
      @Consumption.filter.hidden: true
      OutboundDelivery._ShipToParty,
      @Consumption.filter.hidden: true
      OutboundDelivery._ShippingPoint,
      @Consumption.filter.hidden: true
      _LogProcgStsPick,
      @Consumption.filter.hidden: true
      _LogProcgStsConf,
      @Consumption.filter.hidden: true
      _LogProcgStsMove,
      @Consumption.filter.hidden: true
      _DeliveryShipToPartyVH,
      @Consumption.filter.hidden: true
      _DeliveryTypeVH,
      @Consumption.filter.hidden: true
      _ShippingPointVH,
      @Consumption.filter.hidden: true
      OutboundDelivery._OverallChmlCmplncStatus,
      @Consumption.filter.hidden: true
      OutboundDelivery._OverallDangerousGoodsStatus,
      @Consumption.filter.hidden: true
      OutboundDelivery._OvrlSftyDataSheetSts,
      @Consumption.filter.hidden: true
      _User,
      @Consumption.filter.hidden: true
      OutboundDelivery._ExciseTaxStatus,
      @Consumption.filter.hidden: true
      OutboundDelivery._WarehouseExecutionStatus,
      @Consumption.filter.hidden: true
      OutboundDelivery._DelivAdvncdShipgRcvgRlvnce,
      @Consumption.filter.hidden: true
      OutboundDelivery._ProposedDeliveryRoute,
      @Consumption.filter.hidden: true
      _FreightOrder

}
where OutboundDelivery.CreationDate > dats_add_days( tstmp_to_dats(tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL'), -Customer360BusDocSetting.BusDocumentDurationInDays, 'INITIAL')
  and OutboundDelivery.CreationDate <= $session.system_date