P_LogcDocFreightOrder

DDL: P_LOGCDOCFREIGHTORDER Type: view_entity CONSUMPTION

P_LogcDocFreightOrder is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_TransportationOrder) and exposes 8 fields with key field TransportationOrderUUID.

Data Sources (1)

SourceAliasJoin Type
I_TransportationOrder I_TransportationOrder from

Annotations (3)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY TransportationOrderUUID TransportationOrderUUID
TransportationOrder TransportationOrder
TranspOrdResponsiblePerson TranspOrdResponsiblePerson
TransportationMode TransportationMode
TransportationOrderCategory TransportationOrderCategory
TransportationOrderType TransportationOrderType
PurchasingOrgExternalID PurchasingOrgExternalID
PurchasingGroupExternalID PurchasingGroupExternalID
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: {
  private: true,
  viewType: #CONSUMPTION
}
define view entity P_LogcDocFreightOrder
  as select from I_TransportationOrder

{
  key TransportationOrderUUID,
      TransportationOrder,
      //  TransportationOrderCategory


      // map to the defined logistic document categories of pc if_ehfnd_logistic_comn_c

      cast (
          case
            when TransportationOrderCategory = 'TO'
              then 'FO' // Freight Order (EHFND_LOG_DOC_CATEGORY)

            when TransportationOrderCategory = 'FU'
              then 'FU' // Freight Unit (EHFND_LOG_DOC_CATEGORY)

            when TransportationOrderCategory = 'BO'
              then 'FB' // Freight Booking (EHFND_LOG_DOC_CATEGORY)

          end
           as ehfnd_log_doc_category) as ProdCmplncLogsDocumentCategory,

      //Needed for Authorization check

      @ObjectModel.readOnly: true
      @Consumption.hidden: true
      TranspOrdResponsiblePerson,

      @ObjectModel.readOnly: true
      @Consumption.hidden: true
      TransportationMode,

      @ObjectModel.readOnly: true
      @Consumption.hidden: true
      TransportationOrderCategory,

      @ObjectModel.readOnly: true
      @Consumption.hidden: true
      TransportationOrderType,

      @ObjectModel.readOnly: true
      @Consumption.hidden: true
      PurchasingOrgExternalID,

      @ObjectModel.readOnly: true
      @Consumption.hidden: true
      PurchasingGroupExternalID
      
}
where
  (
       TransportationOrderCategory = 'TO' // Freight Order

    or TransportationOrderCategory = 'FU' // Freight Unit

    or TransportationOrderCategory = 'BO' // Freight Booking

  )
// filter blocked logistic document

//  and(

//        TranspOrderDngrsGdsSts      <> 'F' // /scmtms/dg_status - Blocked – Transport Forbidden

//    and TranspOrderDngrsGdsSts      <> 'G' // /scmtms/dg_status - Blocked – Decision Pending

//  )

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_TRANSPORTATIONORDER"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/