C_OutboundDeliveryItemFs

DDL: C_OUTBOUNDDELIVERYITEMFS SQL: COUTBDELIVITMFS Type: view CONSUMPTION

Outbound Delivery Item Object Page

C_OutboundDeliveryItemFs is a Consumption CDS View that provides data about "Outbound Delivery Item Object Page" in SAP S/4HANA. It reads from 1 data source (I_OutboundDeliveryItem) and exposes 25 fields with key fields OutboundDelivery, OutboundDeliveryItem. It has 7 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_OutboundDeliveryItem I_OutboundDeliveryItem from

Associations (7)

CardinalityTargetAliasCondition
[0..*] C_RelSalesOrderItmDlvrFSS _SalesOrder $projection.OutboundDelivery = _SalesOrder.SalesDocument and $projection.DeliveryDocumentItem = _SalesOrder.SalesDocumentItem and _SalesOrder.SubsequentDocumentCategory = 'J'
[0..1] C_DeliveryPickSum _PickingSum $projection.OutboundDelivery = _PickingSum.PrecedingDocument and $projection.DeliveryDocumentItem = _PickingSum.PrecedingDocumentItem
[0..1] C_DeliveryPickSub _PickingSub $projection.OutboundDelivery = _PickingSub.PrecedingDocument and $projection.DeliveryDocumentItem = _PickingSub.PrecedingDocumentItem
[0..1] I_PickingStatus _PickingStatus $projection.PickingStatus = _PickingStatus.PickingStatus
[0..*] C_SerialNmbrEquipNmbrDelivery _SerialNmbrEquipNmbrDelivery $projection.OutboundDelivery = _SerialNmbrEquipNmbrDelivery.DeliveryDocument and $projection.DeliveryDocumentItem = _SerialNmbrEquipNmbrDelivery.DeliveryDocumentItem
[0..1] I_ValueChainType _ValueChainType $projection.ValueChainType = _ValueChainType.ValueChainType and $projection.ValueChainTypeVersion = _ValueChainType.ValueChainTypeVersion
[1] E_DeliveryDocumentItem _Extension $projection.OutboundDelivery = _Extension.DeliveryDocument and $projection.DeliveryDocumentItem = _Extension.DeliveryDocumentItem

Annotations (19)

NameValueLevelField
AbapCatalog.sqlViewName COUTBDELIVITMFS view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Outbound Delivery Item Object Page view
Search.searchable true view
ObjectModel.compositionRoot true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
UI.headerInfo.typeName Outbound Delivery Item view
UI.headerInfo.typeNamePlural Items view
UI.headerInfo.title.type #STANDARD view
UI.headerInfo.title.value MaterialName view
UI.headerInfo.description.type #STANDARD view
UI.headerInfo.description.value Material view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY OutboundDelivery OutboundDelivery
KEY OutboundDeliveryItem
DeliveryDocumentItem OutboundDeliveryItem
HigherLevelItem HigherLevelItem
HigherLvlItmOfBatSpltItm HigherLvlItmOfBatSpltItm Higher Level Batch Item
char18asSortField Sort Field
PickingStatus PickingStatus
int1asPickingStatusCriticality
PickingConfirmationStatus PickingConfirmationStatus Picking Confirmation Status
WarehouseActivityStatus WarehouseActivityStatus
Material
MaterialName
DeliveryDocumentItemText DeliveryDocumentItemText
DeliveryDocumentItemCategory DeliveryDocumentItemCategory
MaterialByCustomer MaterialByCustomer
Batch Batch
InventoryValuationType
InternationalArticleNumber InternationalArticleNumber
ManufactureDate ManufactureDate
ShelfLifeExpirationDate ShelfLifeExpirationDate
InspectionLot InspectionLot
OrderQuantity
DeliveryQuantityUnit DeliveryQuantityUnit
ActualDeliveryQuantity ActualDeliveryQuantity Actual Delivery Quantity
char20asConversionFactor Conversion Rate
@AbapCatalog.sqlViewName: 'COUTBDELIVITMFS'
@ClientHandling.algorithm:#SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
//@AccessControl.privilegedAssociations:  [ '_Extension' ]

@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@EndUserText.label: 'Outbound Delivery Item Object Page'
@Search.searchable: true

@ObjectModel: {
   compositionRoot: true,
   semanticKey: ['OutboundDelivery', 'OutboundDeliveryItem'],
   usageType.dataClass: #MIXED,
   usageType.serviceQuality: #C,
   usageType.sizeCategory: #XL

}

@UI.headerInfo: {
     typeName:         'Outbound Delivery Item',
     typeNamePlural:   'Items',
     title: {
        type:   #STANDARD,
        value:  'MaterialName'
        },
     description: {
       type:   #STANDARD,
        value:  'Material'
        }

}

@UI.presentationVariant:{
    requestAtLeast: ['MaterialName', 'OrderItemHasConfiguration']
}


define view C_OutboundDeliveryItemFs
  as select from I_OutboundDeliveryItem

  association [0..*] to C_RelSalesOrderItmDlvrFSS     as _SalesOrder                  on  $projection.OutboundDelivery           = _SalesOrder.SalesDocument
                                                                                      and $projection.DeliveryDocumentItem       = _SalesOrder.SalesDocumentItem
                                                                                      and _SalesOrder.SubsequentDocumentCategory = 'J'
  //             and _SalesOrder.PrecedingDocumentCategory = 'C'


  association [0..1] to C_DeliveryPickSum             as _PickingSum                  on  $projection.OutboundDelivery     = _PickingSum.PrecedingDocument
                                                                                      and $projection.DeliveryDocumentItem = _PickingSum.PrecedingDocumentItem

  association [0..1] to C_DeliveryPickSub             as _PickingSub                  on  $projection.OutboundDelivery     = _PickingSub.PrecedingDocument
                                                                                      and $projection.DeliveryDocumentItem = _PickingSub.PrecedingDocumentItem

  association [0..1] to I_PickingStatus               as _PickingStatus               on  $projection.PickingStatus = _PickingStatus.PickingStatus

  association [0..*] to C_SerialNmbrEquipNmbrDelivery as _SerialNmbrEquipNmbrDelivery on  $projection.OutboundDelivery     = _SerialNmbrEquipNmbrDelivery.DeliveryDocument
                                                                                      and $projection.DeliveryDocumentItem = _SerialNmbrEquipNmbrDelivery.DeliveryDocumentItem


  association [0..1] to I_ValueChainType              as _ValueChainType              on  $projection.ValueChainType        = _ValueChainType.ValueChainType
                                                                                      and $projection.ValueChainTypeVersion = _ValueChainType.ValueChainTypeVersion

  association [0..*] to C_OutbDlvItmJITCallCompGrpDet as _JITInbCallComponentGroupDet on  $projection.ReferenceSDDocument           = _JITInbCallComponentGroupDet.InternalJITCallNumber
                                                                                      and $projection.JITCallComponentGrpItemNumber = _JITInbCallComponentGroupDet.JITCallComponentGrpItemNumber
                                                                                      and $projection.ReferenceSDDocumentCategory   = 'JITC'

  //Extensibility

  association [1]    to E_DeliveryDocumentItem        as _Extension                   on  $projection.OutboundDelivery     = _Extension.DeliveryDocument
                                                                                      and $projection.DeliveryDocumentItem = _Extension.DeliveryDocumentItem

{ //FACET SECTION

      @UI.facet: [

        //Header Facets

        { id: 'HeaderFacet-Item',
          purpose: #HEADER ,
          type: #DATAPOINT_REFERENCE,
          // label: 'Item',

          targetQualifier: 'OutboundDeliveryItem',
          position: 10 },

        { id: 'HeaderFacet-ItemStatus',
          purpose: #HEADER ,
          type: #FIELDGROUP_REFERENCE,
          // label: 'Item Status Facet',

          targetQualifier: 'ItemStatus',
          position: 20 },

        { id: 'HeaderFacet-ProductComplianceFields',
          purpose: #HEADER ,
          type: #FIELDGROUP_REFERENCE,
          // label: 'Product Compliance Fields Facet',

          targetQualifier: 'ProductComplianceFields',
          position: 30 },

        { id: 'HeaderFacet-EMCSStatus',
          purpose: #HEADER ,
          type: #FIELDGROUP_REFERENCE,
          // label: 'EMCS Status Facet',

          targetQualifier: 'EMCSStatus',
          position: 40 },

        { id: 'HeaderFacet-TCStatus',
          purpose: #HEADER ,
          type: #FIELDGROUP_REFERENCE ,
          //label: 'Trade Compliance Facet',

          targetQualifier: 'Fieldgroup:TradeCompliance',
          position: 50 },

         //Body Facets

         // Facet 'General Infromation' - Parent (collection)

         { id:              'GeneralInformation-ID',
           type:            #COLLECTION,
           label:           'General Information',
           position:        10 },

             // Facet for Fieldgroup 'Info Item Block Left' - nested inside 'General Information'

             { id:              'GeneralInfoItemBlockLeft-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'GeneralInformation-ID', // Places this facet into 'GeneralInformation'

               targetQualifier: 'GeneralInfoItemBlockLeft',
               position:         10 },

              // Facet for Fieldgroup 'Info Item Block Center' - nested inside 'General Information'

             { id:              'GeneralInfoItemBlockCenter-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'GeneralInformation-ID', // Places this facet into 'GeneralInformation'

               targetQualifier: 'GeneralInfoItemBlockCenter',
               position:         20 },

              // Facet for Fieldgroup 'Info Item Block Right' - nested inside 'General Information'

             { id:              'GeneralInfoItemBlockRight-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'GeneralInformation-ID', // Places this facet into 'GeneralInformation'

               targetQualifier: 'GeneralInfoItemBlockRight',
               position:         30 },

         // Facet 'Item Quantities' - Parent (collection)

         { id:              'ItemQuantities-ID',
           type:            #COLLECTION,
           label:           'Quantities',
           position:        20 },

             // Facet for Fieldgroup 'Quantity Block Left' - nested inside 'Item Quantities'

             { id:              'QuantityBlockLeft-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'ItemQuantities-ID', // Places this facet into 'Item Quantities'

               targetQualifier: 'QuantityBlockLeft',
               position:         10 },

              // Facet for Fieldgroup 'Quantity Block Center' - nested inside 'Item Quantities'

             { id:              'QuantityBlockCenter-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'ItemQuantities-ID', // Places this facet into 'Item Quantities'

               targetQualifier: 'QuantityBlockCenter',
               position:         20 },

              // Facet for Fieldgroup 'Quantity Block Right' - nested inside 'Item Quantities'

             { id:              'QuantityBlockRight-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'ItemQuantities-ID', // Places this facet into 'Item Quantities'

               targetQualifier: 'QuantityBlockRight',
               position:         30 },

         // Facet 'Warehouse' - Parent (collection)

         { id:              'Warehouse-ID',
           type:            #COLLECTION,
           label:           'Warehouse',
           position:        30 },

             // Facet for Fieldgroup 'Warehouse Block Left' - nested inside 'Warehouse'

             { id:              'WarehouseBlockLeft-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'Warehouse-ID', // Places this facet into 'Warehouse'

               targetQualifier: 'WarehouseBlockLeft',
               position:         10 },

              // Facet for Fieldgroup 'Warehouse Block Center' - nested inside 'Warehouse'

             { id:              'WarehouseBlockCenter-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'Warehouse-ID', // Places this facet into 'Warehouse'

               targetQualifier: 'WarehouseBlockCenter',
               position:         20 },

              // Facet for Fieldgroup 'Warehouse Block Right' - nested inside 'Warehouse'

             { id:              'WarehouseBlockRight-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'Warehouse-ID', // Places this facet into 'Warehouse'

               targetQualifier: 'WarehouseBlockRight',
               position:         30 },

         // Facet 'Serial Numbers'

         {  id: 'SerialNumbers-ID',
            type: #LINEITEM_REFERENCE,
            label: 'Serial Numbers',
            targetQualifier: 'OBDL_Item-Facet:SerialNumbers',
            position: 40 ,
            targetElement: '_SerialNmbrEquipNmbrDelivery' },

         // Facet 'LoadingShipment' - Parent (collection)

         { id:              'LoadingShipment-ID',
           type:            #COLLECTION,
           label:           'Loading/Shipment',
           position:        50 },

             // Facet for Fieldgroup 'LoadingShipment Block Left' - nested inside 'LoadingShipment'

             { id:              'LoadingShipmentBlockLeft-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'LoadingShipment-ID', // Places this facet into 'LoadingShipment'

               targetQualifier: 'LoadingShipmentBlockLeft',
               position:         10 },

              // Facet for Fieldgroup 'LoadingShipment Block Center' - nested inside 'LoadingShipment'

             { id:              'LoadingShipmentBlockCenter-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'LoadingShipment-ID', // Places this facet into 'LoadingShipment'

               targetQualifier: 'LoadingShipmentBlockCenter',
               position:         20 },

              // Facet for Fieldgroup 'LoadingShipment Block Right' - nested inside 'LoadingShipment'

             { id:              'LoadingShipmentBlockRight-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'LoadingShipment-ID', // Places this facet into 'LoadingShipment'

               targetQualifier: 'LoadingShipmentBlockRight',
               position:         30 },

         // Facet 'FinancialProcessing' - Parent (collection)

         { id:              'FinancialProcessing-ID',
           type:            #COLLECTION,
           label:           'Financial Processing',
           position:        60 },

             // Facet for Fieldgroup 'Financial Processing Block Left' - nested inside 'FinancialProcessing'

             { id:              'FinancialProcessingBlockLeft-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'FinancialProcessing-ID', // Places this facet into 'FinancialProcessing'

               targetQualifier: 'FinancialProcessingBlockLeft',
               position:         10 },

              // Facet for Fieldgroup 'Financial Processing Block Center' - nested inside 'FinancialProcessing'

             { id:              'FinancialProcessingBlockCenter-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'FinancialProcessing-ID', // Places this facet into 'FinancialProcessing'

               targetQualifier: 'FinancialProcessingBlockCenter',
               position:         20 },

              // Facet for Fieldgroup 'Financial Processing Block Right' - nested inside 'FinancialProcessing'

             { id:              'FinancialProcessingBlockRight-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'FinancialProcessing-ID', // Places this facet into 'FinancialProcessing'

               targetQualifier: 'FinancialProcessingBlockRight',
               position:         30 },

         // Facet 'GoodsMovement' - Parent (collection)

         { id:              'GoodsMovement-ID',
           type:            #COLLECTION,
           label:           'Goods Movement',
           position:        70 },

             // Facet for Fieldgroup 'Goods Movement Block Left' - nested inside 'GoodsMovement'

             { id:              'GoodsMovementBlockLeft-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'GoodsMovement-ID', // Places this facet into 'GoodsMovement'

               targetQualifier: 'GoodsMovementBlockLeft',
               position:         10 },

              // Facet for Fieldgroup 'Financial Processing Block Center' - nested inside 'GoodsMovement'

             { id:              'GoodsMovementBlockCenter-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'GoodsMovement-ID', // Places this facet into 'GoodsMovement'

               targetQualifier: 'GoodsMovementBlockCenter',
               position:         20 },

              // Facet for Fieldgroup 'Financial Processing Block Right' - nested inside 'GoodsMovement'

             { id:              'GoodsMovementBlockRight-ID',
               type:            #FIELDGROUP_REFERENCE,
               //label:           'Fieldgroup ',

               parentId:        'GoodsMovement-ID', // Places this facet into 'GoodsMovement'

               targetQualifier: 'GoodsMovementBlockRight',
               position:         30 },

         // Facet 'Output Management'

         {  id: 'OutputManagement',
            type: #COLLECTION,
            label: 'Output',
            position: 80
            },

         // Facet 'Related Sales Orders'

         {  id: 'RelatedSalesOrders-ID',
            type: #LINEITEM_REFERENCE,
            label: 'Related Sales Orders',
            hidden:          #(DeliveryPredecessorIsJITCall),
            targetQualifier: 'OBDL_Item-Facet:RelatedSalesOrders',
            position: 90 ,
            targetElement: '_SalesOrder'  },

         { id:              'FieldLogistics',
           type:            #COLLECTION,
           label:           'Field Logistics',
           hidden:          #(FldLogsIsHidden),
           position:        99 },
            {
              id:'FieldLogistics-Block1',
              type: #FIELDGROUP_REFERENCE,
              parentId: 'FieldLogistics',
              targetQualifier: 'FieldLogistics-Block1',
              position: 10
            },

         // Facet 'Related JIT Call'

         {  id:              'RelatedJITCall-ID',
            type:            #LINEITEM_REFERENCE,
            label:           'Related JIT Call',
            hidden:          #(DelivPredecessorIsSalesOrder),
            targetQualifier: 'OBDL_Item-Facet:RelatedJITCall',
            position:        100 ,
            targetElement:   '_JITInbCallComponentGroupDet' }
      ]


      @ObjectModel.foreignKey.association: '_OutboundDelivery'
  key OutboundDelivery,

      @UI:{ lineItem: [{position: 10,
                        importance: #MEDIUM },
                       {qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                        position: 10,
                        importance: #MEDIUM }
                      ],
            dataPoint: {  description:'Item' },
            textArrangement: #TEXT_SEPARATE  }
      @Search.defaultSearchElement: true
      @Search.ranking: #HIGH
  key cast(OutboundDeliveryItem as le_doc_item )                                                                             as OutboundDeliveryItem,

      /***************************************************************************/
      //HEADER

      /***************************************************************************/

      OutboundDeliveryItem                                                                                                   as DeliveryDocumentItem,

      HigherLevelItem,

      @EndUserText.label: 'Higher Level Batch Item'
      HigherLvlItmOfBatSpltItm,

      @EndUserText.label: 'Sort Field'
      cast(
      case
      when ( HigherLevelItem = '000000' and HigherLvlItmOfBatSpltItm = '000000' )
         then concat( OutboundDeliveryItem, '0000000000000' )
      when ( HigherLevelItem <> '000000' and HigherLvlItmOfBatSpltItm = '000000' )
         then concat(concat(HigherLevelItem,  OutboundDeliveryItem), HigherLvlItmOfBatSpltItm )
      when ( HigherLevelItem <> '000000' and HigherLvlItmOfBatSpltItm <> '000000' )
         then concat(concat(HigherLevelItem,  HigherLvlItmOfBatSpltItm), OutboundDeliveryItem )
      else
        concat(concat(HigherLvlItmOfBatSpltItm,  OutboundDeliveryItem), HigherLevelItem )
      end as abap.char( 18 ))                                                                                                as SortField,

      //   Not usable, as calculated field cannot be used for Sorting etc.

      //   @ObjectModel: { virtualElement: true, virtualElementCalculatedBy: 'ABAP:ZCL_ZDIP_SORTFIELD_CALC'}

      //   cast( '' as abap.char( 18 ) ) as SortItemCalculated,


      @UI.fieldGroup: [ { qualifier: 'ItemStatus',
                          position: 10,
                          importance: #HIGH,
                          criticality: 'PickingStatusCriticality'
                       } ]
      PickingStatus,

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

      @EndUserText.label: 'Picking Confirmation Status'
      @UI.fieldGroup: [  {  qualifier: 'ItemStatus',
                            position: 20,
                            importance: #HIGH  } ]
      PickingConfirmationStatus,

      @UI.fieldGroup: [ { qualifier: 'ItemStatus',
                          position: 30,
                          importance: #HIGH } ]
      WarehouseActivityStatus,


      //Product Compliance Fields

      //**********************************************************************************************

      @ObjectModel.foreignKey.association: '_ChmlCmplncStatus'
      @EndUserText.label: 'Product Marketability Status'
      @UI.fieldGroup: [ { qualifier: 'ProductComplianceFields',
                          position: 10,
                          criticality: 'ChmlCmplncStsCriticality',
                          criticalityRepresentation: #WITHOUT_ICON } ]
      ChmlCmplncStatus,

      @EndUserText.label: 'Product Marketability Status Crit.'
      cast( case ChmlCmplncStatus
        when ''  then 0  //not relevant

        when 'A' then 3 //Approved

        when 'B' then 3 //Approved as Exemption

        when 'C' then 1 //Blocked - not marketable

        when 'D' then 1 //Blocked - not approved as exemption

        when 'G' then 1 //Blocked - Decision pending

        else 0
      end as abap.int1 )                                                                                                     as ChmlCmplncStsCriticality,

      @ObjectModel.foreignKey.association: '_DangerousGoodsStatus'
      @EndUserText.label: 'Dangerous Goods Status'
      @UI.fieldGroup: [ { qualifier: 'ProductComplianceFields',
                          position: 20,
                          criticality: 'DngrsGdsStsCriticality',
                          criticalityRepresentation: #WITHOUT_ICON } ]
      DangerousGoodsStatus,

      @EndUserText.label: 'Dangerous Goods Status Crit.'
      cast( case DangerousGoodsStatus
        when '' then 0  //Not relevant

        when 'A' then 3 //Ok - No Dangerous Goods

        when 'B' then 3 //Ok - Transport allowed

        when 'C' then 2 //Warning - Transport restricted

        when 'F' then 1 //Blocked - Transport forbidden

        when 'G' then 1 //Blocked - Decision pending

        else 0
      end as abap.int1 )                                                                                                     as DngrsGdsStsCriticality,


      @ObjectModel.foreignKey.association: '_SafetyDataSheetStatus'
      @EndUserText.label: 'Safety Data Sheet Status'
      @UI.fieldGroup: [ { qualifier: 'ProductComplianceFields',
                          position: 30,
                          criticality: 'SftyDataShtStatCriticality',
                          criticalityRepresentation: #WITHOUT_ICON } ]
      SafetyDataSheetStatus,

      //Global Field Name Missing

      @EndUserText.label: 'Safety Data Sheet Status Crit.'
      cast( case SafetyDataSheetStatus
         when '' then  0 //not relevant

         when 'A' then 3 //not required

         when 'B' then 3 //Available

         when 'C' then 2 //Warning - Request pending

         when 'D' then 3 //Ok - Approved as exemption

         when 'E' then 1 //Blocked - Data Missing

         when 'F' then 1 //Blocked not approved as Exemption

         when 'G' then 1 //Blocked decision pending

         else 0
       end as abap.int1 )                                                                                                    as SftyDataShtStatCriticality,



      //Trade Compliance

      //Legal Control

      @UI: {  fieldGroup: [{  qualifier: 'Fieldgroup:TradeCompliance',
                              position: 10,
                              importance: #HIGH,
                              hidden: #(TradeComplianceIsInactive)}] ,
  textArrangement: #TEXT_FIRST }
      @EndUserText.label: 'Legal Control Check Status'
      @ObjectModel.foreignKey.association: '_TrdCmplncLegalControlSts'
      I_OutboundDeliveryItem.TrdCmplncLegalControlSts,

      //Embargo

      @UI: {  fieldGroup: [{  qualifier: 'Fieldgroup:TradeCompliance',
                          position: 20,
                          importance: #HIGH ,
                          hidden: #(TradeComplianceIsInactive) }] ,
  textArrangement: #TEXT_FIRST }
      @EndUserText.label: 'Embargo Status'
      @ObjectModel.foreignKey.association: '_TrdCmplncEmbargoSts'
      I_OutboundDeliveryItem.TrdCmplncEmbargoSts,

      //Watch List Screening

      @UI: {  fieldGroup: [{  qualifier: 'Fieldgroup:TradeCompliance',
                              position: 30,
                              importance: #HIGH ,
                              hidden: #(TradeComplianceIsInactive) }] ,
  textArrangement: #TEXT_FIRST }
      @EndUserText.label: 'Watch List Screening Status'
      @ObjectModel.foreignKey.association: '_TrdCmplncSnctndListChkSts'
      I_OutboundDeliveryItem.TrdCmplncSnctndListChkSts,

      @UI.hidden: true
      @Semantics.booleanIndicator: true
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_TRADE_COMPL_RELEVANT'
      cast('' as boole_d preserving type )                                                                                   as TradeComplianceIsInactive,

      //EMCS Integration - Excise Tax

      @UI.fieldGroup: [{ qualifier: 'EMCSStatus', position: 10, importance: #HIGH }]
      @EndUserText.label: 'Excise Tax ARC Status'
      @ObjectModel.foreignKey.association: '_ExciseTaxStatus'
      EU_DeliveryItemARCStatus,

      /***************************************************************************/
      //GENERAL INFORMATION

      /***************************************************************************/

      @UI: {  lineItem: [{position: 20,
                          importance: #HIGH },
                         {qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                          position: 20,
                          importance: #HIGH }
                        ],
              fieldGroup: { qualifier: 'GeneralInfoItemBlockLeft',
                            position: 10,
                            importance: #HIGH } }
      @Consumption.semanticObject: 'Material'
      @Search.defaultSearchElement: true
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
      Material,

      @Search.defaultSearchElement: true
      _Material._Text[1: Language=$session.system_language].MaterialName                                                     as MaterialName,

      @UI.fieldGroup: { qualifier: 'GeneralInfoItemBlockLeft',
                        position: 20,
                        importance: #HIGH}
      DeliveryDocumentItemText,

      @UI.fieldGroup: {qualifier: 'GeneralInfoItemBlockLeft', position: 30, importance: #HIGH }
      DeliveryDocumentItemCategory,

      @UI.fieldGroup: {qualifier: 'GeneralInfoItemBlockLeft', position: 40, importance: #HIGH}
      MaterialByCustomer,

      @UI:{ lineItem:   [{position: 30,
                          importance: #HIGH,
                          type: #STANDARD},
                         {qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                          position: 30,
                          importance: #HIGH,
                          type: #STANDARD }
                        ],
            fieldGroup: { qualifier: 'GeneralInfoItemBlockCenter', position: 10, importance: #HIGH} }
      @Search.defaultSearchElement: true
      @Consumption.semanticObject: 'Batch'
      Batch,

      @UI: { fieldGroup:[ {qualifier: 'GeneralInfoItemBlockCenter', position: 20, importance: #HIGH },
                          {qualifier: 'GoodsMovementBlockCenter'  , position: 10, importance: #HIGH } ] }
      cast(InventoryValuationType as valuationtype)                                                                          as InventoryValuationType,

      @UI.fieldGroup: {qualifier: 'GeneralInfoItemBlockCenter', position: 30, importance: #HIGH}
      InternationalArticleNumber,

      @UI.fieldGroup: {qualifier: 'GeneralInfoItemBlockRight', position: 10, importance: #HIGH}
      ManufactureDate,

      @UI.fieldGroup: {qualifier: 'GeneralInfoItemBlockRight', position: 20, importance: #HIGH}
      ShelfLifeExpirationDate,

      @UI.fieldGroup: {qualifier: 'GeneralInfoItemBlockRight', position: 30, importance: #HIGH}
      InspectionLot,

      /***************************************************************************/
      //QUANTITY

      /***************************************************************************/

      @UI.fieldGroup: {qualifier: 'QuantityBlockLeft', position: 10, importance: #HIGH}
      @DefaultAggregation: #NONE
      @Semantics.quantity: { unitOfMeasure: 'DeliveryQuantityUnit' }
      cast( OriginalDeliveryQuantity as wmeng )                                                                              as OrderQuantity,

      @Semantics.unitOfMeasure: true
      @Search.defaultSearchElement: true
      DeliveryQuantityUnit,

      @EndUserText.label: 'Actual Delivery Quantity'
      @UI: { fieldGroup: { qualifier: 'QuantityBlockLeft',
                            position: 20,
                            importance: #HIGH,
                            label:'Actual Delivery Quantity'},
              lineItem: [ { position: 60,
                            importance: #HIGH,
                            type: #STANDARD,
                            label:'Actual Delivery Quantity'},
                          { qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                            position: 60,
                            importance: #HIGH,
                            type: #STANDARD,
                            label:'Actual Delivery Quantity' }
                        ]
           }
      @Semantics.quantity: { unitOfMeasure: 'DeliveryQuantityUnit' }
      @DefaultAggregation: #NONE
      ActualDeliveryQuantity                                                                                                 as ActualDeliveryQuantity,

      @EndUserText.label: 'Conversion Rate'
      @UI.fieldGroup: { qualifier: 'QuantityBlockCenter', position: 10, importance: #HIGH, label:'Conversion Rate'}
      cast( concat_with_space(
            concat_with_space( concat_with_space( cast( DeliveryToBaseQuantityDnmntr as abap.char(9) ), DeliveryQuantityUnit, 1 ) , ':' , 1 ) ,
            concat_with_space( cast( DeliveryToBaseQuantityNmrtr as abap.char(9) ) , BaseUnit , 1 ) , 1 ) as abap.char(20) ) as ConversionFactor,


      @UI.fieldGroup: {qualifier: 'QuantityBlockCenter', position: 20, importance: #HIGH}
      @Semantics.quantity: { unitOfMeasure: 'BaseUnit' }
      @DefaultAggregation: #NONE
      cast(ActualDeliveredQtyInBaseUnit as le_lgmng)                                                                         as ActualDeliveredQtyInBaseUnit,

      @Semantics.unitOfMeasure: true
      BaseUnit,

      @EndUserText.label: 'Tolerance Unlimited'
      @DefaultAggregation: #NONE
      @UI.fieldGroup: {qualifier: 'QuantityBlockCenter', position: 30, importance: #HIGH, label:'Tolerance Unlimited'}
      UnlimitedOverdeliveryIsAllowed,

      @EndUserText.label: 'Overdelivery Tolerance'
      @UI.fieldGroup: {qualifier: 'QuantityBlockRight', position: 10, importance: #HIGH, label: 'Overdelivery Tolerance'}
      concat_with_space( cast( OverdelivTolrtdLmtRatioInPct as char10 ) , '%', 1)                                            as OverdelivTolrtdLmtRatioInPct,

      @EndUserText.label: 'Underdelivery Tolerance'
      @UI.fieldGroup: {qualifier: 'QuantityBlockRight', position: 20, importance: #HIGH, label: 'Underdelivery Tolerance'}
      concat_with_space( cast( UnderdelivTolrtdLmtRatioInPct as char10 ) , '%', 1)                                           as UnderdelivTolrtdLmtRatioInPct,


      /***************************************************************************/
      //Warehouse information

      /***************************************************************************/

      @UI: { lineItem:  [{ position: 40,
                            importance: #HIGH,
                            type: #STANDARD },
                          { qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                            position: 40,
                            importance: #HIGH,
                            type: #STANDARD }
                          ],
               fieldGroup: { qualifier: 'WarehouseBlockLeft',
                             position: 10,
                             importance: #HIGH}
            }
      @Search.defaultSearchElement: true
      Plant,

      // Needed for the table search

      @Search.defaultSearchElement: true
      _Plant.PlantName                                                                                                       as PlantName,

      @UI: { lineItem: [ { position: 50,
                            importance: #HIGH,
                            type: #STANDARD },
                          { qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                            position: 50,
                            importance: #HIGH,
                            type: #STANDARD }
                        ],
              fieldGroup: {qualifier: 'WarehouseBlockLeft', position: 20, importance: #HIGH}
           }
      @Search.defaultSearchElement: true
      StorageLocation,

      // Needed for the table search

      @Search.defaultSearchElement: true
      _StorageLocation.StorageLocationName                                                                                   as StorageLocationName,

      @UI.fieldGroup: [{qualifier: 'WarehouseBlockLeft', position: 30, importance: #HIGH }]
      DeliveryItemResourceID,

      @EndUserText.label: 'Picking Quantity'
      @UI: { fieldGroup: [{qualifier: 'WarehouseBlockCenter',
                            position: 10,
                            importance: #HIGH,
                            label: 'Picking Quantity' }
                          ],
              lineItem: [{ position: 70,
                           importance: #HIGH,
                           type: #STANDARD ,
                           label: 'Picking Quantity' },
                         { qualifier: 'OBDL_FS_Facet:Items', //Reference for LineItem in C_OUTBOUNDDELIVERYFS

                           position: 70,
                           importance: #HIGH,
                           type: #STANDARD ,
                           label: 'Picking Quantity' }
                        ]
           }
      @Semantics.quantity: { unitOfMeasure: 'BaseUnit' }
      @DefaultAggregation: #NONE
      case
          when _PickingSub.QuantityInBaseUnit >= 0 then _PickingSum.QuantityInBaseUnit  - _PickingSub.QuantityInBaseUnit
          else  _PickingSum.QuantityInBaseUnit
      end                                                                                                                    as PickQuantityInBaseUoM,

      @EndUserText.label: 'Picking Quantity in Delivery Unit'
      @Semantics.quantity: { unitOfMeasure: 'DeliveryQuantityUnit' }
      @DefaultAggregation: #NONE
      case
       when _PickingSub.PickQuantityInSalesUoMFlt >= 0 then  _PickingSum.PickQuantityInSalesUoMFlt  - _PickingSub.PickQuantityInSalesUoMFlt
       else  _PickingSum.PickQuantityInSalesUoMFlt
      end                                                                                                                    as PickQuantityInSalesUoMFlt,


      @EndUserText.label: 'Warehouse'
      @UI.fieldGroup: {qualifier: 'WarehouseBlockRight', position: 10, importance: #HIGH, label: 'Warehouse'  }
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WarehouseStdVH', element: 'Warehouse' } } ]
      Warehouse,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_LMD_ACTIVE'
      cast('' as char1)                                                                                                      as LastMileDistrIsActive, //is active flag for last mile distribution



      /***************************************************************************/
      //Loading / Shipping

      /***************************************************************************/

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockLeft', position: 10, importance: #HIGH}
      LoadingGroup,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockLeft', position: 20, importance: #HIGH}
      TransportationGroup,

      @EndUserText.label: 'Staging Area'
      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockLeft', position: 30, importance: #HIGH}
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WarehouseStagingAreaStdVH', element: 'WarehouseStagingArea' },
                                            additionalBinding: [{localElement: 'Warehouse', element: 'Warehouse' } ] } ]
      WarehouseStagingArea,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockCenter', position: 10, importance: #HIGH}
      @Semantics.quantity: { unitOfMeasure: 'ItemWeightUnit' }
      @DefaultAggregation: #NONE
      ItemGrossWeight,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockCenter', position: 20, importance: #HIGH}
      @Semantics.quantity: { unitOfMeasure: 'ItemWeightUnit' }
      @DefaultAggregation: #NONE
      ItemNetWeight,

      @Semantics.unitOfMeasure: true
      ItemWeightUnit,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockCenter', position: 30, importance: #HIGH}
      @Semantics.quantity: { unitOfMeasure: 'ItemVolumeUnit' }
      @DefaultAggregation: #NONE
      ItemVolume,
      @Semantics.unitOfMeasure: true
      ItemVolumeUnit,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockRight', position: 10, importance: #HIGH}
      PackingStatus,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockRight', position: 20, importance: #HIGH}
      ReceivingPoint,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockRight', position: 30, importance: #HIGH}
      DepartmentClassificationByCust,

      @UI.fieldGroup: {qualifier: 'LoadingShipmentBlockRight', position: 40, importance: #HIGH}
      @EndUserText.label: 'Loading Point'
      LoadingPointForDelivery,

      /***************************************************************************/
      //Financial Information

      /***************************************************************************/

      @EndUserText.label: 'Billing Block Reason'
      @UI.fieldGroup: {qualifier: 'FinancialProcessingBlockLeft', position: 10, importance: #HIGH, label:'Billing Block Reason'}
      ItemBillingBlockReason,

      @UI.fieldGroup: {qualifier: 'FinancialProcessingBlockCenter', position: 10, importance: #HIGH}
      @EndUserText.label: 'Delivery-Related Billing Status'
      DeliveryRelatedBillingStatus,

      @EndUserText.label: 'Intercompany Billing Status'
      @UI.fieldGroup: {qualifier: 'FinancialProcessingBlockRight', position: 10, importance: #HIGH, label:'Intercompany Billing Status'}
      IntercompanyBillingStatus,


      /***************************************************************************/
      //Good Movments

      /***************************************************************************/

      @EndUserText.label: 'Goods Movement Status'
      @UI.fieldGroup: {qualifier: 'GoodsMovementBlockLeft', position: 10, importance: #HIGH, label:'Goods Movement Status'}
      GoodsMovementStatus,

      @UI.fieldGroup: {qualifier: 'GoodsMovementBlockLeft', position: 20, importance: #HIGH }
      InventorySpecialStockType,

      @UI.fieldGroup: {qualifier: 'GoodsMovementBlockLeft', position: 30, importance: #HIGH }
      StockType,

      @EndUserText.label: 'Goods Movement Type'
      @UI.fieldGroup: {qualifier: 'GoodsMovementBlockCenter', position: 20, importance: #HIGH, label:'Goods Movement Type' }
      GoodsMovementType,

      @EndUserText.label: 'Follow-Up Movement'
      @UI.fieldGroup: {qualifier: 'GoodsMovementBlockCenter', position: 30, importance: #HIGH, label: 'Follow-Up Movement'}
      SubsequentMovementType,

      @UI.fieldGroup: {qualifier: 'GoodsMovementBlockRight', position: 10, importance: #HIGH}
      WarehouseStockCategory,

      @UI.fieldGroup: [{ qualifier: 'EMCSStatus', position: 20, importance: #HIGH }]
      @ObjectModel.foreignKey.association: '_FieldLogisticsIndicator'
      @UI.hidden: #(FldLogsIsHidden)
      FldLogsStatus,

      @UI.hidden: true
      cast(
        case when FldLogsStatus = '' then 'X'
             else '' end
        as boole_d )                                                                                                         as FldLogsIsHidden,

      @ObjectModel.text.element    : ['FldLogsRefDocTypeText']
      @EndUserText.label: 'Reference Document Type'
      @UI.fieldGroup: [{qualifier: 'FieldLogistics-Block1', position: 10, importance: #HIGH, hidden: #(FldLogsIsHidden) }]
      _FldLogsDelivRefLinkInfo.FldLogsRefDocType,
      _FldLogsDelivRefLinkInfo._DelivRefDocTypeTxt.FldLogsRefDocTypeText,
      @Consumption.semanticObject:'PurchaseOrder'
      @EndUserText.label: 'Reference Document'
      @UI.fieldGroup: [{qualifier: 'FieldLogistics-Block1', position: 20, importance: #HIGH, hidden: #(FldLogsIsHidden) }]
      _FldLogsDelivRefLinkInfo.FldLogsDelivRefDocNumberInfo,

      @EndUserText.label: 'Reference Document Item'
      @UI.fieldGroup: [{qualifier: 'FieldLogistics-Block1', position: 30, importance: #HIGH, hidden: #(FldLogsIsHidden) }]
      _FldLogsDelivRefLinkInfo.FldLogsRefDocItem,

      @EndUserText.label: 'Cross Docking ID'
      @UI.fieldGroup: [{qualifier: 'FieldLogistics-Block1', position: 40, importance: #HIGH, hidden: #(FldLogsIsHidden) }]
      _FldLogsDelivRefLinkInfo.FldLogsCrossDockingInfo,

      cast ( case _FldLogsDelivRefLinkInfo.FldLogsRefDocType
                  when 'STO'  then 'PurchaseOrder'      //Stock Transport Order

                  when 'MO'   then 'MaintenanceOrder'   //Maintenance Order

                              else ''
             end        as /ui2/semantic_object )                                                                            as FldLogsRefDocSemanticObjName,


      // AVC Configuration

      @UI.hidden: true
      @ObjectModel.readOnly: true
      @Semantics.booleanIndicator: true
      @EndUserText.label: 'Configuration'
      @EndUserText.quickInfo: 'Configuration of the Delivery Item'
      case when ProductConfiguration is not initial then cast('X' as boole_d preserving type )
      else cast('' as boole_d preserving type )
      end                                                     as OrderItemHasConfiguration,


      @UI.hidden
      @UI.textArrangement: #TEXT_FIRST
      @ObjectModel.text.element: ['ShipToPartyFullName']
      _OutboundDelivery.ShipToParty,
      @UI.hidden
      @EndUserText.label: 'Full Name Ship-to Party'
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_PARTNER_FULLNAME_F0233A'
      cast('' as ad_namtext ) as ShipToPartyFullName,


      @UI.hidden: true
      ValueChainInstanceChar32UUID,

      @UI:{
        fieldGroup: { qualifier: 'GeneralInfoItemBlockCenter',
                            position: 50,
                           importance: #HIGH }
      }
      @ObjectModel.readOnly: true
      @ObjectModel.foreignKey.association: '_ValueChainType'
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_RETRIEVE_VCM_TYPE'
      cast( '' as vcm_value_chain_type )                                                                                     as ValueChainType,

      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_RETRIEVE_VCM_TYPE'
      @UI.hidden : true
      cast( '' as vcm_version_number )                                                                                       as ValueChainTypeVersion,

      @UI.fieldGroup: { qualifier: 'GeneralInfoItemBlockCenter',
                        position: 60,
                        importance: #HIGH }
      @ObjectModel.foreignKey.association: '_ValueChainCategory'
      ValueChainCategory,

      @UI.hidden:true
      cast(
          case  when ValueChainInstanceChar32UUID != '' then 'X'
                else ''
      end as boole_d )                                                                                                       as ItemIsValueChainRelevant,

      @UI.hidden: true
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_OUTPUT_ACTIVE'
      cast('' as char005)                                                                                                    as IsActive, //is active flag for output control



      @UI.hidden: true
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_EMCS_ACTIVE'
      cast('' as xfeld)                                                                                                     as ExciseMovementIsActive,

      @UI.hidden: true
      I_OutboundDeliveryItem.ReferenceSDDocument,

      @UI.hidden: true
      I_OutboundDeliveryItem.ReferenceSDDocumentItem                                                                        as JITCallComponentGrpItemNumber,

      @UI.hidden: true
      I_OutboundDeliveryItem.ReferenceSDDocumentCategory                                                                    as ReferenceSDDocumentCategory,

      @UI.hidden: true
      @Semantics.booleanIndicator: true
      cast(
        case when I_OutboundDeliveryItem.ReferenceSDDocumentCategory = 'JITC' then 'X'
             else '' end
        as boole_d )                                                                                                        as DeliveryPredecessorIsJITCall,

      @UI.hidden: true
      @Semantics.booleanIndicator: true
      cast(
        case when I_OutboundDeliveryItem.ReferenceSDDocumentCategory != 'JITC' then 'X'
             else '' end
        as boole_d )                                                                                                        as DelivPredecessorIsSalesOrder,

      // Associations

      _OutboundDelivery,
      _Material,
      _ItemCategory,
      _PickingStatus,
      _PickingConfirmationStatus,
      _WarehouseActivityStatus,
      _Warehouse,
      _WarehouseStagingArea,
      _Plant,
      _StorageLocation,
      _InventorySpecialStockType,
      _DeliveryRelatedBillingStatus,
      _PackingStatus,
      _ItemBillingBlockReason,
      _GoodsMovementType,
      _GoodsMovementStatus,
      _LoadingGroup,
      _TransportationGroup,
      _SalesOrder,
      _SerialNmbrEquipNmbrDelivery,
      _StockType_2,
      _StockCategory,
      _JITInbCallComponentGroupDet,

      _ChmlCmplncStatus,
      _DangerousGoodsStatus,
      _SafetyDataSheetStatus,
      _ExciseTaxStatus,
      _TrdCmplncLegalControlSts,
      _TrdCmplncEmbargoSts,
      _TrdCmplncSnctndListChkSts,

      _ValueChainCategory,
      _ValueChainType,
      _FieldLogisticsIndicator,
      _FldLogsDelivRefLinkInfo
}