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.
@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: truedefine root viewentity 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 andGroupis 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
* viewand 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'