A_FreightUnit

DDL: A_FREIGHTUNIT Type: view_entity CONSUMPTION Package: ODATA_TM_FU_API

Freight Unit

A_FreightUnit is a Consumption CDS View that provides data about "Freight Unit" in SAP S/4HANA. It reads from 1 data source (R_TransportationOrderTP) and exposes 27 fields with key field TransportationOrderUUID. It is exposed through 1 OData service (API_FREIGHTUNIT). Part of development package ODATA_TM_FU_API.

Data Sources (1)

SourceAliasJoin Type
R_TransportationOrderTP R_TransportationOrderTP projection

Annotations (9)

NameValueLevelField
EndUserText.label Freight Unit view
AccessControl.authorizationCheck #MANDATORY view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #CONSUMPTION view
OData.entityType.name FreightUnit_Type view
Metadata.ignorePropagatedAnnotations true view

OData Services (1)

ServiceBindingVersionContractRelease
API_FREIGHTUNIT API_FREIGHTUNIT V4 C2 C1

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY TransportationOrderUUID TransportationOrderUUID
TransportationOrder TransportationOrder
TransportationOrderType TransportationOrderType
TransportationOrderCategory TransportationOrderCategory
TransportationMode TransportationMode
TransportationModeCategory TransportationModeCategory
ShipperUUID ShipperUUID
Shipper Shipper
ShipperAddressID ShipperAddressID
ConsigneeUUID ConsigneeUUID
Consignee Consignee
ConsigneeAddressID ConsigneeAddressID
TranspOrdResponsiblePerson TranspOrdResponsiblePerson
TranspOrdLifeCycleStatus TranspOrdLifeCycleStatus
TranspOrderDngrsGdsSts TranspOrderDngrsGdsSts
TranspOrdPlanningBlock TranspOrdPlanningBlock
TranspOrdExecutionIsBlocked TranspOrdExecutionIsBlocked
TranspOrdGoodsMovementStatus TranspOrdGoodsMovementStatus
TranspOrdPlanningStatus TranspOrdPlanningStatus
TranspOrdWhseProcessingStatus TranspOrdWhseProcessingStatus
TransportationOrderCrtnType TransportationOrderCrtnType
CreatedByUser CreatedByUser
CreationDateTime CreationDateTime
LastChangedByUser LastChangedByUser
ChangedDateTime ChangedDateTime
TranspPurgOrgExtID TranspPurgOrgExtID
TranspPurgGroupExtID TranspPurgGroupExtID
@EndUserText.label: 'Freight Unit'
@AccessControl.authorizationCheck: #MANDATORY
@VDM.lifecycle.contract.type: #PUBLIC_REMOTE_API
@VDM.usage.type:[#TRANSACTIONAL_PROCESSING_SERVICE]
@ObjectModel: {
    usageType: {
        sizeCategory: #L,
        serviceQuality: #C,
        dataClass: #TRANSACTIONAL
    }}
@VDM.viewType: #CONSUMPTION
@OData.entityType.name: 'FreightUnit_Type'
@Metadata.ignorePropagatedAnnotations: true

define root view entity A_FreightUnit
  provider contract transactional_query
  as projection on R_TransportationOrderTP as FreightUnit
  
{
      /* Attributes */
      // Identification

  key TransportationOrderUUID,
      TransportationOrder,
      
      // Key Characteristics

      @ObjectModel.sapObjectNodeTypeReference: 'TransportationOrderType'       
      TransportationOrderType,
      @ObjectModel.sapObjectNodeTypeReference: 'TransportationOrderCategory'      
      TransportationOrderCategory,
      @ObjectModel.sapObjectNodeTypeReference: 'TransportationMode'      
      TransportationMode,
      @ObjectModel.sapObjectNodeTypeReference: 'TransportationModeCategory'      
      TransportationModeCategory,
      
      // Parties

      //CarrierUUID,  // Carrier and Executing Carrier is currently not used in Freight Units

      //Carrier,

      //StandardCarrierAlphaCode,

      //TranspOrdExecutingCarrierUUID,

      //TranspOrdExecutingCarrier,

      ShipperUUID,
      Shipper,
      ShipperAddressID,
      ConsigneeUUID,
      Consignee,
      ConsigneeAddressID,
      
      //PlngAndExecOrganization,  // Planning and Execution Organization and Group is currently not used in Freight Units

      //PlngAndExecGroup,

      
      // Further Attributes

      //TranspOrdMeansOfTransport,  // Means of Transport is currently not used in Freight Units

      //TranspOrdPartnerReference,  // Partner Reference is currently not used in Freight Units

      //MasterBillOfLading,  // Master Bill of Lading is currently not used in Freight Orders

      TranspOrdResponsiblePerson,  // Responsible Person is currently not used in Freight Orders

      
      // Status

      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrderLifecycleStatus'      
      TranspOrdLifeCycleStatus,
      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrdDangerousGoodsStatus'      
      TranspOrderDngrsGdsSts,
      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrderPlanningBlock'      
      TranspOrdPlanningBlock,
      @Semantics.booleanIndicator
      TranspOrdExecutionIsBlocked,
      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrdGoodsMovementStatus'       
      TranspOrdGoodsMovementStatus,
      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrdPlanningStatus'       
      TranspOrdPlanningStatus,
      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrdWhseProcessingStatus'
      TranspOrdWhseProcessingStatus,
      
      // Administrative Data

      @ObjectModel.sapObjectNodeTypeReference: 'TranspOrderCreationType'      
      TransportationOrderCrtnType,
      CreatedByUser,
      CreationDateTime,
      LastChangedByUser,
      ChangedDateTime,

      /* The (generic) access control definition of R_TransportationOrderTP uses the (generic) authorization object
       * T_TOR_PUR which contains the authorization fields TranspPurgOrgExtID and TranspPurgGroupExtID.
       * The projection views shall inherit the access control definition of the underlying transactional processing
       * view and it is (currently) not possible to declare elements as optional which are part of a path expression
       * such as such as _TransportationOrder.TranspPurgOrgExtID
       * This requires, that the elements TranspPurgOrgExtID and TranspPurgGroupExtID must be (technically) defined on 
       * A_FreightUnit and at the same time hidden from the consumer
       */
      @Consumption.hidden:true       
      TranspPurgOrgExtID,
      @Consumption.hidden:true       
      TranspPurgGroupExtID,

      /* Redirections */
      FreightUnit._TransportationOrderBP       as _FreightUnitBusinessPartner   : redirected to composition child A_FreightUnitBusinessPartner,
      FreightUnit._TranspOrdDocumentReference  as _FreightUnitDocumentReference : redirected to composition child A_FreightUnitDocumentReference,
      FreightUnit._TransportationOrderItem     as _FreightUnitItem              : redirected to composition child A_FreightUnitItem,
      FreightUnit._TransportationOrderStop     as _FreightUnitStop              : redirected to composition child A_FreightUnitStop,
      FreightUnit._TrOrdMainBPAddrDfltRprstn   as _FrtUnitMainBPAddrDfltRprstn  : redirected to composition child A_FrtUnitMainBPAddrDfltRprstn,
      FreightUnit._ShipperAddrDfltRprstn       as _ShipperAddrDfltRprstn        : redirected to A_FrtUnitMainBPAddrDfltRprstn,
      FreightUnit._ConsigneeAddrDfltRprstn     as _ConsigneeAddrDfltRprstn      : redirected to A_FrtUnitMainBPAddrDfltRprstn
}
where
  TransportationOrderCategory = 'FU'