C_SlsDocScheduleLineTP

DDL: C_SLSDOCSCHEDULELINETP Type: view_entity CONSUMPTION Package: RAP_SD_SLS_SLSDOC

Sales Document Schedule Line - TP

C_SlsDocScheduleLineTP is a Consumption CDS View that provides data about "Sales Document Schedule Line - TP" in SAP S/4HANA. It reads from 1 data source (I_SalesDocumentScheduleLine) and exposes 275 fields with key fields SalesDocument, SalesDocumentItem, ScheduleLine. It has 2 associations to related views. Part of development package RAP_SD_SLS_SLSDOC.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocumentScheduleLine SalesDocumentScheduleLine from

Associations (2)

CardinalityTargetAliasCondition
[0..1] C_SlsDocOfOneTimeCustVH_F8712 _OneTimeCustomer $projection.SalesDocument = _OneTimeCustomer.SalesDocument and _OneTimeCustomer.PartnerFunction = 'AG'
[1..1] C_SalesDocumentTP _SalesDocument $projection.SalesDocument = _SalesDocument.SalesDocument

Annotations (7)

NameValueLevelField
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Sales Document Schedule Line - TP view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (275)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument I_SalesDocumentScheduleLine SalesDocument
KEY SalesDocumentItem I_SalesDocumentScheduleLine SalesDocumentItem
KEY ScheduleLine I_SalesDocumentScheduleLine ScheduleLine
ScheduleLineForEdit I_SalesDocumentScheduleLine ScheduleLine
ScheduleLineCategory I_SalesDocumentScheduleLine ScheduleLineCategory
OrderQuantityUnit I_SalesDocumentScheduleLine OrderQuantityUnit
OrderQuantitySAPUnit
ScheduleLineOrderQuantity I_SalesDocumentScheduleLine ScheduleLineOrderQuantity
ConfdOrderQtyByMatlAvailCheck
DeliveredQtyInOrderQtyUnit I_SalesDocumentScheduleLine DeliveredQtyInOrderQtyUnit
OpenConfdDelivQtyInOrdQtyUnit I_SalesDocumentScheduleLine OpenConfdDelivQtyInOrdQtyUnit
CorrectedQtyInOrderQtyUnit I_SalesDocumentScheduleLine CorrectedQtyInOrderQtyUnit
DeliveryDate I_SalesDocumentScheduleLine DeliveryDate
RequestedDeliveryDate I_SalesDocumentScheduleLine RequestedDeliveryDate
ConfirmedDeliveryDate I_SalesDocumentScheduleLine ConfirmedDeliveryDate
GoodsIssueDate I_SalesDocumentScheduleLine GoodsIssueDate
TransportationPlanningDate I_SalesDocumentScheduleLine TransportationPlanningDate
ProductAvailabilityDate I_SalesDocumentScheduleLine ProductAvailabilityDate
LoadingDate I_SalesDocumentScheduleLine LoadingDate
DelivBlockReasonForSchedLine
GoodsMovementType I_SalesDocumentScheduleLine GoodsMovementType
PurchaseRequisition I_SalesDocumentScheduleLine PurchaseRequisition
PurchaseRequisitionItem I_SalesDocumentScheduleLine PurchaseRequisitionItem
TransactionCurrency I_SalesDocumentScheduleLine TransactionCurrency
Product _Item Product
ProductName _Item ProductName
PurchaseOrderByCustomer _Item PurchaseOrderByCustomer
RequestedQuantity _Item RequestedQuantity
RequestedQuantityUnit _Item RequestedQuantityUnit
NetAmount _Item NetAmount
ConfdDelivQtyInOrderQtyUnit _Item ConfdDelivQtyInOrderQtyUnit
MaterialByCustomer _Item MaterialByCustomer
HigherLevelItem _Item HigherLevelItem
Batch _Item Batch
SalesDocumentItemText _Item SalesDocumentItemText
IncotermsLocation1 _Item IncotermsLocation1
IncotermsLocation2 _Item IncotermsLocation2
ItemGrossWeight _Item ItemGrossWeight
ItemWeightUnit _Item ItemWeightUnit
ItemNetWeight _Item ItemNetWeight
TaxAmount _Item TaxAmount
ItemVolume _Item ItemVolume
ServicesRenderedDate _Item ServicesRenderedDate
PricingDate _Item PricingDate
BillingDocumentDate _Item BillingDocumentDate
DeliveryDateQuantityIsFixed _Item DeliveryDateQuantityIsFixed
UnderlyingPurchaseOrderItem _Item UnderlyingPurchaseOrderItem
ReceivingPoint _Item ReceivingPoint
ReferenceSDDocument _Item ReferenceSDDocument
ReferenceSDDocumentItem _Item ReferenceSDDocumentItem
InternationalArticleNumber _Item InternationalArticleNumber
DeliveryGroup _Item DeliveryGroup
MaxNmbrOfPartialDelivery _Item MaxNmbrOfPartialDelivery
OrderCombinationIsAllowed _Item OrderCombinationIsAllowed
BusinessSolutionOrderItem _Item BusinessSolutionOrderItem
BusSolnOrdItemBundleItem _Item BusSolnOrdItemBundleItem
BusinessSolutionOrder _Item BusinessSolutionOrder
BillToParty _Item BillToParty
ShipToParty _Item ShipToParty
PayerParty _Item PayerParty
SalesEmployee _Item SalesEmployee
ResponsibleEmployee _Item ResponsibleEmployee
Plant _Item Plant
DeliveryDateTypeRule _Item DeliveryDateTypeRule
DeliveryBlockStatus _Item DeliveryBlockStatus
DeliveryPriority _Item DeliveryPriority
DeliveryStatus _Item DeliveryStatus
DeliveryConfirmationStatus
Route _Item Route
ShippingPoint _Item ShippingPoint
StorageLocation _Item StorageLocation
TrdCmplncEmbargoSts _Item TrdCmplncEmbargoSts
TrdCmplncSnctndListChkSts _Item TrdCmplncSnctndListChkSts
OvrlTrdCmplncLegalCtrlChkSts _Item OvrlTrdCmplncLegalCtrlChkSts
ItemTrdCmplncLegalCtrlChkSts _Item ItemTrdCmplncLegalCtrlChkSts
DangerousGoodsStatus _Item DangerousGoodsStatus
SafetyDataSheetStatus _Item SafetyDataSheetStatus
ChmlCmplncStatus _Item ChmlCmplncStatus
ItemBillingBlockReason _Item ItemBillingBlockReason
BillingBlockStatus _Item BillingBlockStatus
OrderRelatedBillingStatus _Item OrderRelatedBillingStatus
ContractDownPaymentStatus _Item ContractDownPaymentStatus
ItemDownPaymentStatus _Item ItemDownPaymentStatus
BusinessArea _Item BusinessArea
ControllingArea _Item ControllingArea
ProfitCenter _Item ProfitCenter
CustomerPaymentTerms _Item CustomerPaymentTerms
SalesDocumentItemCategory _Item SalesDocumentItemCategory
ProductGroup _Item ProductGroup
MaterialPricingGroup _Item MaterialPricingGroup
OriginallyRequestedMaterial _Item OriginallyRequestedMaterial
AdditionalMaterialGroup1 _Item AdditionalMaterialGroup1
AdditionalMaterialGroup2 _Item AdditionalMaterialGroup2
AdditionalMaterialGroup3 _Item AdditionalMaterialGroup3
AdditionalMaterialGroup4 _Item AdditionalMaterialGroup4
AdditionalMaterialGroup5 _Item AdditionalMaterialGroup5
SDProcessStatus _Item SDProcessStatus
ItemGeneralIncompletionStatus _Item ItemGeneralIncompletionStatus
SDDocumentRejectionStatus _Item SDDocumentRejectionStatus
SalesDocumentRjcnReason _Item SalesDocumentRjcnReason
ReferenceSDDocumentCategory _Item ReferenceSDDocumentCategory
PartialDeliveryIsAllowed _Item PartialDeliveryIsAllowed
CustomerGroup _Item CustomerGroup
CustomerPriceGroup _Item CustomerPriceGroup
IncotermsClassification _Item IncotermsClassification
IncotermsVersion _Item IncotermsVersion
MatlAccountAssignmentGroup _Item MatlAccountAssignmentGroup
ItemVolumeUnit _Item ItemVolumeUnit
MRPArea _Item MRPArea
SDPricingProcedure _SalesDocument SDPricingProcedure
PriceListType _SalesDocument PriceListType
CustomerPurchaseOrderType _SalesDocument CustomerPurchaseOrderType
DeliveryBlockReason _SalesDocument DeliveryBlockReason
HeaderDeliveryBlockStatus _SalesDocument HeaderDeliveryBlockStatus
_HeaderDeliveryBlockStatus _SalesDocument _HeaderDeliveryBlockStatus
SalesDocApprovalStatus _SalesDocument SalesDocApprovalStatus
TotalCreditCheckStatus _SalesDocument TotalCreditCheckStatus
TotalBlockStatus _SalesDocument TotalBlockStatus
HeaderBillingBlockStatus _SalesDocument HeaderBillingBlockStatus
HeaderBillingBlockReason _SalesDocument HeaderBillingBlockReason
CustomerAccountAssignmentGroup _SalesDocument CustomerAccountAssignmentGroup
SDDocumentCategory _SalesDocument SDDocumentCategory
SDDocumentReason _SalesDocument SDDocumentReason
HdrGeneralIncompletionStatus _SalesDocument HdrGeneralIncompletionStatus
AdditionalCustomerGroup1 _SalesDocument AdditionalCustomerGroup1
AdditionalCustomerGroup2 _SalesDocument AdditionalCustomerGroup2
AdditionalCustomerGroup3 _SalesDocument AdditionalCustomerGroup3
AdditionalCustomerGroup4 _SalesDocument AdditionalCustomerGroup4
AdditionalCustomerGroup5 _SalesDocument AdditionalCustomerGroup5
SalesDistrict _SalesDocument SalesDistrict
SalesGroup _SalesDocument SalesGroup
SalesOffice _SalesDocument SalesOffice
ShippingCondition _SalesDocument ShippingCondition
ShippingType _SalesDocument ShippingType
TaxDepartureCountry _SalesDocument TaxDepartureCountry
VATRegistrationCountry _SalesDocument VATRegistrationCountry
SalesDocApprovalReason _SalesDocument SalesDocApprovalReason
CreatedByUser _SalesDocument CreatedByUser
LastChangedByUser _SalesDocument LastChangedByUser
SoldToParty _SalesDocument SoldToParty
SalesDocumentDate _SalesDocument SalesDocumentDate
TotalNetAmount _SalesDocument TotalNetAmount
SalesDocumentCreationDateTime _SalesDocument SalesDocumentCreationDateTime
AssignmentReference _SalesDocument AssignmentReference
LastChangeDate _SalesDocument LastChangeDate
LastChangeDateTime _SalesDocument LastChangeDateTime
CompleteDeliveryIsDefined _SalesDocument CompleteDeliveryIsDefined
CreationDate _SalesDocument CreationDate
PurchaseOrderByShipToParty _SalesDocument PurchaseOrderByShipToParty
CustomerPurchaseOrderDate _SalesDocument CustomerPurchaseOrderDate
IsEUTriangularDeal _SalesDocument IsEUTriangularDeal
FixedValueDate _SalesDocument FixedValueDate
PaymentMethod _SalesDocument PaymentMethod
AccountingDocExternalReference _SalesDocument AccountingDocExternalReference
SlsDocIsRlvtForProofOfDeliv _SalesDocument SlsDocIsRlvtForProofOfDeliv
BillingCompanyCode _SalesDocument BillingCompanyCode
_Item _Item
_SalesDocument _SalesDocument
_ScheduleLineCategory I_SalesDocumentScheduleLine _ScheduleLineCategory
_OrderQuantityUnit I_SalesDocumentScheduleLine _OrderQuantityUnit
_DelivBlockReasonForSchedLine I_SalesDocumentScheduleLine _DelivBlockReasonForSchedLine
_GoodsMovementType I_SalesDocumentScheduleLine _GoodsMovementType
_Plant _Item _Plant
_DeliveryDateTypeRule _Item _DeliveryDateTypeRule
_DeliveryBlockStatus _Item _DeliveryBlockStatus
_DeliveryPriority _Item _DeliveryPriority
_DeliveryStatus _Item _DeliveryStatus
_DeliveryConfirmationStatus _Item _DeliveryConfirmationStatus
_Route _Item _Route
_ShippingPoint _Item _ShippingPoint
_StorageLocation _Item _StorageLocation
_TrdCmplncEmbargoSts _Item _TrdCmplncEmbargoSts
_TrdCmplncSnctndListChkSts _Item _TrdCmplncSnctndListChkSts
_OvrlTrdCmplncLegalCtrlChkSts _Item _OvrlTrdCmplncLegalCtrlChkSts
_ItemTrdCmplncLegalCtrlChkSts _Item _ItemTrdCmplncLegalCtrlChkSts
_DangerousGoodsStatus _Item _DangerousGoodsStatus
_SafetyDataSheetStatus _Item _SafetyDataSheetStatus
_ChmlCmplncStatus _Item _ChmlCmplncStatus
_ItemBillingBlockReason _Item _ItemBillingBlockReason
_BillingBlockStatus _Item _BillingBlockStatus
_OrderRelatedBillingStatus _Item _OrderRelatedBillingStatus
_BusinessArea _Item _BusinessArea
_ControllingArea _Item _ControllingArea
_ProfitCenter _Item _ProfitCenter
_CustomerPaymentTerms _Item _CustomerPaymentTerms
_ItemCategory _Item _ItemCategory
_ProductGroup _Item _ProductGroup
_MaterialPricingGroup _Item _MaterialPricingGroup
_OriginallyRequestedMaterial _Item _OriginallyRequestedMaterial
_AdditionalMaterialGroup1 _Item _AdditionalMaterialGroup1
_AdditionalMaterialGroup2 _Item _AdditionalMaterialGroup2
_AdditionalMaterialGroup3 _Item _AdditionalMaterialGroup3
_AdditionalMaterialGroup4 _Item _AdditionalMaterialGroup4
_AdditionalMaterialGroup5 _Item _AdditionalMaterialGroup5
_SDProcessStatus _Item _SDProcessStatus
_ItemGeneralIncompletionStatus _Item _ItemGeneralIncompletionStatus
_SDDocumentRejectionStatus _Item _SDDocumentRejectionStatus
_SalesDocumentRjcnReason _Item _SalesDocumentRjcnReason
_ReferenceSDDocumentCategory _Item _ReferenceSDDocumentCategory
_PartialDeliveryItem _Item _PartialDeliveryItem
_CustomerGroup _Item _CustomerGroup
_CustomerPriceGroup _Item _CustomerPriceGroup
_IncotermsClassification _Item _IncotermsClassification
_IncotermsVersion _Item _IncotermsVersion
_MatlAccountAssignmentGroup _Item _MatlAccountAssignmentGroup
_ItemVolumeUnit _Item _ItemVolumeUnit
_MRPArea _Item _MRPArea
_ResponsibleEmployee _Item _ResponsibleEmployee
_SalesEmployee _Item _SalesEmployee
_PayerParty _Item _PayerParty
_ShipToParty _Item _ShipToParty
_BillToParty _Item _BillToParty
_Product _Item _Product
_DownPaymentStatus _Item _DownPaymentStatus
_ItemDownPaymentStatus _Item _ItemDownPaymentStatus
_RequestedQuantityUnit _Item _RequestedQuantityUnit
_ItemWeightUnit _Item _ItemWeightUnit
_SDPricingProcedure _SalesDocument _SDPricingProcedure
_PriceListType _SalesDocument _PriceListType
_CustomerPurchaseOrderType _SalesDocument _CustomerPurchaseOrderType
_DeliveryBlockReason _SalesDocument _DeliveryBlockReason
_SalesDocApprovalStatus _SalesDocument _SalesDocApprovalStatus
_TotalCreditCheckStatus _SalesDocument _TotalCreditCheckStatus
_TotalBlockStatus _SalesDocument _TotalBlockStatus
_HeaderBillingBlockStatus _SalesDocument _HeaderBillingBlockStatus
_HeaderBillingBlockReason _SalesDocument _HeaderBillingBlockReason
_CustomerAccountAssgmtGroup _SalesDocument _CustomerAccountAssgmtGroup
_SDDocumentCategory _SalesDocument _SDDocumentCategory
_SDDocumentReason _SalesDocument _SDDocumentReason
_HdrGeneralIncompletionStatus _SalesDocument _HdrGeneralIncompletionStatus
_AdditionalCustomerGroup1 _SalesDocument _AdditionalCustomerGroup1
_AdditionalCustomerGroup2 _SalesDocument _AdditionalCustomerGroup2
_AdditionalCustomerGroup3 _SalesDocument _AdditionalCustomerGroup3
_AdditionalCustomerGroup4 _SalesDocument _AdditionalCustomerGroup4
_AdditionalCustomerGroup5 _SalesDocument _AdditionalCustomerGroup5
_SalesDistrict _SalesDocument _SalesDistrict
_SalesGroup _SalesDocument _SalesGroup
_SalesOffice _SalesDocument _SalesOffice
_ShippingCondition _SalesDocument _ShippingCondition
_ShippingType _SalesDocument _ShippingType
_TaxDepartureCountry _SalesDocument _TaxDepartureCountry
_VATRegistrationCountry _SalesDocument _VATRegistrationCountry
_SalesDocApprovalReason _SalesDocument _SalesDocApprovalReason
_CreatedByUser _SalesDocument _CreatedByUser
_LastChangedByUser _SalesDocument _LastChangedByUser
_SoldToParty _SalesDocument _SoldToParty
_OrganizationDivision _SalesDocument _OrganizationDivision
_SalesOrganization _SalesDocument _SalesOrganization
_DistributionChannel _SalesDocument _DistributionChannel
_SalesDocumentType _SalesDocument _SalesDocumentType
_PaymentMethodVH _SalesDocument _PaymentMethodVH
_OneTimeCustomer _OneTimeCustomer
_TransactionCurrency _TransactionCurrency
OverallSDProcessStatus _SalesDocument OverallSDProcessStatus
_OverallSDProcessStatus _SalesDocument _OverallSDProcessStatus
OverallDangerousGoodsStatus _SalesDocument OverallDangerousGoodsStatus
_OverallDangerousGoodsStatus _SalesDocument _OverallDangerousGoodsStatus
OverallDeliveryStatus _SalesDocument OverallDeliveryStatus
_OverallDeliveryStatus _SalesDocument _OverallDeliveryStatus
OverallTrdCmplncEmbargoSts _SalesDocument OverallTrdCmplncEmbargoSts
_OvrlTradeCmplncEmbargoStatus _SalesDocument _OvrlTradeCmplncEmbargoStatus
OverallOrdReltdBillgStatus _SalesDocument OverallOrdReltdBillgStatus
_OverallOrdReltdBillgStatus _SalesDocument _OverallOrdReltdBillgStatus
OverallChmlCmplncStatus _SalesDocument OverallChmlCmplncStatus
_OverallChmlCmplncStatus _SalesDocument _OverallChmlCmplncStatus
OverallSDDocumentRejectionSts _SalesDocument OverallSDDocumentRejectionSts
_OverallSDDocumentRejectionSts _SalesDocument _OverallSDDocumentRejectionSts
OverallSafetyDataSheetStatus _SalesDocument OverallSafetyDataSheetStatus
_OvrlSftyDataSheetSts _SalesDocument _OvrlSftyDataSheetSts
OvrlTrdCmplncSnctndListChkSts _SalesDocument OvrlTrdCmplncSnctndListChkSts
_OvTrdCmplncSnctndListChkSts _SalesDocument _OvTrdCmplncSnctndListChkSts
SalesDocumentType _SalesDocument SalesDocumentType
OrganizationDivision _SalesDocument OrganizationDivision
SalesOrganization _SalesDocument SalesOrganization
DistributionChannel _SalesDocument DistributionChannel
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@AccessControl.privilegedAssociations : [ '_CreatedByUser', '_LastChangedByUser' ]
@EndUserText.label: 'Sales Document Schedule Line - TP'

@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType: { serviceQuality: #C, sizeCategory: #XL, dataClass: #TRANSACTIONAL }

define view entity C_SlsDocScheduleLineTP
  as select from I_SalesDocumentScheduleLine as SalesDocumentScheduleLine

  association        to parent C_SalesDocumentItemTP  as _Item            on  $projection.SalesDocument     = _Item.SalesDocument
                                                                          and $projection.SalesDocumentItem = _Item.SalesDocumentItem

  association [0..1] to C_SlsDocOfOneTimeCustVH_F8712 as _OneTimeCustomer on  $projection.SalesDocument        = _OneTimeCustomer.SalesDocument
                                                                          and _OneTimeCustomer.PartnerFunction = 'AG'
  association [1..1] to C_SalesDocumentTP             as _SalesDocument   on  $projection.SalesDocument = _SalesDocument.SalesDocument

{
      // Keys (source: Schedule Line)

  key SalesDocumentScheduleLine.SalesDocument,
  key SalesDocumentScheduleLine.SalesDocumentItem,
  key SalesDocumentScheduleLine.ScheduleLine,

      // Schedule Line: Identification

      @ObjectModel.editableFieldFor: 'ScheduleLine'
      SalesDocumentScheduleLine.ScheduleLine                                                                        as ScheduleLineForEdit,
      @ObjectModel.foreignKey.association: '_ScheduleLineCategory'
      SalesDocumentScheduleLine.ScheduleLineCategory,

      // Schedule Line: Quantities & Units

      @ObjectModel.foreignKey.association: '_OrderQuantityUnit'
      SalesDocumentScheduleLine.OrderQuantityUnit,
      cast(SalesDocumentScheduleLine._OrderQuantityUnit.UnitOfMeasureSAPCode as sd_ord_qty_sapunit preserving type) as OrderQuantitySAPUnit,
      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      SalesDocumentScheduleLine.ScheduleLineOrderQuantity,
      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      cast( SalesDocumentScheduleLine.ConfdOrderQtyByMatlAvailCheck as sline_confirmed_quantity preserving type )   as ConfdOrderQtyByMatlAvailCheck,
      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      SalesDocumentScheduleLine.DeliveredQtyInOrderQtyUnit,
      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      SalesDocumentScheduleLine.OpenConfdDelivQtyInOrdQtyUnit,
      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      SalesDocumentScheduleLine.CorrectedQtyInOrderQtyUnit,

      // Schedule Line: Dates

      SalesDocumentScheduleLine.DeliveryDate,
      SalesDocumentScheduleLine.RequestedDeliveryDate,
      SalesDocumentScheduleLine.ConfirmedDeliveryDate,
      SalesDocumentScheduleLine.GoodsIssueDate,
      SalesDocumentScheduleLine.TransportationPlanningDate,
      SalesDocumentScheduleLine.ProductAvailabilityDate,
      SalesDocumentScheduleLine.LoadingDate,

      // Schedule Line: Blocking & Movement

      @ObjectModel.foreignKey.association: '_DelivBlockReasonForSchedLine'
      cast( SalesDocumentScheduleLine.DelivBlockReasonForSchedLine as sline_delivery_block_reason preserving type ) as DelivBlockReasonForSchedLine,
      @ObjectModel.foreignKey.association: '_GoodsMovementType'
      SalesDocumentScheduleLine.GoodsMovementType,

      // Schedule Line: Procurement References

      SalesDocumentScheduleLine.PurchaseRequisition,
      SalesDocumentScheduleLine.PurchaseRequisitionItem,
      
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      SalesDocumentScheduleLine.TransactionCurrency,
           

      // Item-level: Commercial & Quantities

      @ObjectModel.foreignKey.association: '_Product'
      _Item.Product,
      _Item.ProductName,
      _Item.PurchaseOrderByCustomer,
      @Semantics.quantity.unitOfMeasure: 'RequestedQuantityUnit'
      _Item.RequestedQuantity,
      @ObjectModel.foreignKey.association: '_RequestedQuantityUnit'
      _Item.RequestedQuantityUnit,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      _Item.NetAmount,
      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      _Item.ConfdDelivQtyInOrderQtyUnit,

      // Item-level: Identification & Texts

      _Item.MaterialByCustomer,
      _Item.HigherLevelItem,
      _Item.Batch,
      _Item.SalesDocumentItemText,
      _Item.IncotermsLocation1,
      _Item.IncotermsLocation2,

      // Item-level: Weights & Volumes

      @Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
      _Item.ItemGrossWeight,
      @ObjectModel.foreignKey.association: '_ItemWeightUnit'
      _Item.ItemWeightUnit,
      @Semantics.quantity.unitOfMeasure: 'ItemWeightUnit'
      _Item.ItemNetWeight,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      _Item.TaxAmount,
      @Semantics.quantity.unitOfMeasure: 'ItemVolumeUnit'
      _Item.ItemVolume,

      // Item-level: Dates

      _Item.ServicesRenderedDate,
      _Item.PricingDate,
      _Item.BillingDocumentDate,
      _Item.DeliveryDateQuantityIsFixed,

      // Item-level: References & Cross-document

      _Item.UnderlyingPurchaseOrderItem,
      _Item.ReceivingPoint,
      _Item.ReferenceSDDocument,
      _Item.ReferenceSDDocumentItem,
      _Item.InternationalArticleNumber,

      // Item-level: Delivery groups & partial delivery

      _Item.DeliveryGroup,
      _Item.MaxNmbrOfPartialDelivery,
      _Item.OrderCombinationIsAllowed,

      // Item-level: Business Solution

      _Item.BusinessSolutionOrderItem,
      _Item.BusSolnOrdItemBundleItem,
      _Item.BusinessSolutionOrder,

      // Item-level: Partners

      _Item.BillToParty,
      _Item.ShipToParty,
      _Item.PayerParty,
      _Item.SalesEmployee,
      _Item.ResponsibleEmployee,

      // Item-level: Logistics & Delivery (associations/FK)

      @ObjectModel.foreignKey.association: '_Plant'
      _Item.Plant,
      @ObjectModel.foreignKey.association: '_DeliveryDateTypeRule'
      _Item.DeliveryDateTypeRule,
      @ObjectModel.foreignKey.association: '_DeliveryBlockStatus'
      _Item.DeliveryBlockStatus,
      @ObjectModel.foreignKey.association: '_DeliveryPriority'
      _Item.DeliveryPriority,
      @ObjectModel.foreignKey.association: '_DeliveryStatus'
      _Item.DeliveryStatus,
      @ObjectModel.foreignKey.association: '_DeliveryConfirmationStatus'
//      _Item.DeliveryConfirmationStatus,

      cast(_Item.DeliveryConfirmationStatus  as delivery_confirmation_status preserving type )                              as DeliveryConfirmationStatus,
      
      @ObjectModel.foreignKey.association: '_Route'
      _Item.Route,
      @ObjectModel.foreignKey.association: '_ShippingPoint'
      _Item.ShippingPoint,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      _Item.StorageLocation,

      // Item-level: Compliance & Trade (associations/FK)

      @ObjectModel.foreignKey.association: '_TrdCmplncEmbargoSts'
      _Item.TrdCmplncEmbargoSts,
      @ObjectModel.foreignKey.association: '_TrdCmplncSnctndListChkSts'
      _Item.TrdCmplncSnctndListChkSts,
      @ObjectModel.foreignKey.association: '_OvrlTrdCmplncLegalCtrlChkSts'
      _Item.OvrlTrdCmplncLegalCtrlChkSts,
      @ObjectModel.foreignKey.association: '_ItemTrdCmplncLegalCtrlChkSts'
      _Item.ItemTrdCmplncLegalCtrlChkSts,
      @ObjectModel.foreignKey.association: '_DangerousGoodsStatus'
      _Item.DangerousGoodsStatus,
      @ObjectModel.foreignKey.association: '_SafetyDataSheetStatus'
      _Item.SafetyDataSheetStatus,
      @ObjectModel.foreignKey.association: '_ChmlCmplncStatus'
      _Item.ChmlCmplncStatus,

      // Item-level: Billing, Finance & Account Assignment (associations/FK)

      @ObjectModel.foreignKey.association: '_ItemBillingBlockReason'
      _Item.ItemBillingBlockReason,
      @ObjectModel.foreignKey.association: '_BillingBlockStatus'
      _Item.BillingBlockStatus,
      @ObjectModel.foreignKey.association: '_OrderRelatedBillingStatus'
      _Item.OrderRelatedBillingStatus,
      @ObjectModel.foreignKey.association: '_DownPaymentStatus'
      //      _Item.DownPaymentStatus,

      _Item.ContractDownPaymentStatus,
      @ObjectModel.foreignKey.association: '_ItemDownPaymentStatus'
      _Item.ItemDownPaymentStatus,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      _Item.BusinessArea,
      @ObjectModel.foreignKey.association: '_ControllingArea'
      _Item.ControllingArea,
      @ObjectModel.foreignKey.association: '_ProfitCenter'
      _Item.ProfitCenter,
      @ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
      _Item.CustomerPaymentTerms,

      // Item-level: Categorization & Material Attributes (associations/FK)

      @ObjectModel.foreignKey.association: '_ItemCategory'
      _Item.SalesDocumentItemCategory,
      @ObjectModel.foreignKey.association: '_ProductGroup'
      _Item.ProductGroup,
      @ObjectModel.foreignKey.association: '_MaterialPricingGroup'
      _Item.MaterialPricingGroup,
      @ObjectModel.foreignKey.association: '_OriginallyRequestedMaterial'
      _Item.OriginallyRequestedMaterial,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup1'
      _Item.AdditionalMaterialGroup1,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup2'
      _Item.AdditionalMaterialGroup2,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup3'
      _Item.AdditionalMaterialGroup3,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup4'
      _Item.AdditionalMaterialGroup4,
      @ObjectModel.foreignKey.association: '_AdditionalMaterialGroup5'
      _Item.AdditionalMaterialGroup5,

      // Item-level: Status & Rejection (associations/FK)

      @ObjectModel.foreignKey.association: '_SDProcessStatus'
      _Item.SDProcessStatus,
      @ObjectModel.foreignKey.association: '_ItemGeneralIncompletionStatus'
      _Item.ItemGeneralIncompletionStatus,
      @ObjectModel.foreignKey.association: '_SDDocumentRejectionStatus'
      _Item.SDDocumentRejectionStatus,
      @ObjectModel.foreignKey.association: '_SalesDocumentRjcnReason'
      _Item.SalesDocumentRjcnReason,
      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      _Item.ReferenceSDDocumentCategory,
      @ObjectModel.foreignKey.association: '_PartialDeliveryItem'
      _Item.PartialDeliveryIsAllowed,
      
      // Item-level: Customer Segmentation & Pricing (associations/FK)

      @ObjectModel.foreignKey.association: '_CustomerGroup'
      _Item.CustomerGroup,
      @ObjectModel.foreignKey.association: '_CustomerPriceGroup'
      _Item.CustomerPriceGroup,

      // Item-level: Incoterms (associations/FK)

      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      _Item.IncotermsClassification,
      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      _Item.IncotermsVersion,

      // Item-level: Misc Logistics & Planning (associations/FK)

      @ObjectModel.foreignKey.association: '_MatlAccountAssignmentGroup'
      _Item.MatlAccountAssignmentGroup,
      @ObjectModel.foreignKey.association: '_ItemVolumeUnit'
      _Item.ItemVolumeUnit,
      @ObjectModel.foreignKey.association: '_MRPArea'
      _Item.MRPArea,

      // Header-level (Sales Document): Pricing & Order Control (associations/FK)

      @ObjectModel.foreignKey.association: '_SDPricingProcedure'
      _SalesDocument.SDPricingProcedure,
      @ObjectModel.foreignKey.association: '_PriceListType'
      _SalesDocument.PriceListType,
      @ObjectModel.foreignKey.association: '_CustomerPurchaseOrderType'
      _SalesDocument.CustomerPurchaseOrderType,

      // Header-level: Delivery & Blocking (associations/FK)

      @ObjectModel.foreignKey.association: '_DeliveryBlockReason'
      _SalesDocument.DeliveryBlockReason,
      @ObjectModel.foreignKey.association: '_HeaderDeliveryBlockStatus'
      _SalesDocument.HeaderDeliveryBlockStatus,
      _SalesDocument._HeaderDeliveryBlockStatus,

      // Header-level: Approval, Credit & Overall Block (associations/FK)

      @ObjectModel.foreignKey.association: '_SalesDocApprovalStatus'
      _SalesDocument.SalesDocApprovalStatus,
      @ObjectModel.foreignKey.association: '_TotalCreditCheckStatus'
      _SalesDocument.TotalCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_TotalBlockStatus'
      _SalesDocument.TotalBlockStatus,

      // Header-level: Billing & Account Assignment (associations/FK)

      @ObjectModel.foreignKey.association: '_HeaderBillingBlockStatus'
      _SalesDocument.HeaderBillingBlockStatus,
      @ObjectModel.foreignKey.association: '_HeaderBillingBlockReason'
      _SalesDocument.HeaderBillingBlockReason,
      @ObjectModel.foreignKey.association: '_CustomerAccountAssgmtGroup'
      _SalesDocument.CustomerAccountAssignmentGroup,

      // Header-level: Document Categorization & Reasons (associations/FK)

      @ObjectModel.foreignKey.association: '_SDDocumentCategory'
      _SalesDocument.SDDocumentCategory,
      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      _SalesDocument.SDDocumentReason,

      // Header-level: Incompletion Statuses (associations/FK)

      @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus'
      _SalesDocument.HdrGeneralIncompletionStatus,

      // Header-level: Segmentation & Org Details (associations/FK)

      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup1'
      _SalesDocument.AdditionalCustomerGroup1,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup2'
      _SalesDocument.AdditionalCustomerGroup2,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup3'
      _SalesDocument.AdditionalCustomerGroup3,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup4'
      _SalesDocument.AdditionalCustomerGroup4,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup5'
      _SalesDocument.AdditionalCustomerGroup5,
      @ObjectModel.foreignKey.association: '_SalesDistrict'
      _SalesDocument.SalesDistrict,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      _SalesDocument.SalesGroup,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      _SalesDocument.SalesOffice,

      // Header-level: Shipping & Tax/VAT (associations/FK)

      @ObjectModel.foreignKey.association: '_ShippingCondition'
      _SalesDocument.ShippingCondition,
      @ObjectModel.foreignKey.association: '_ShippingType'
      _SalesDocument.ShippingType,
      @ObjectModel.foreignKey.association: '_TaxDepartureCountry'
      _SalesDocument.TaxDepartureCountry,
      @ObjectModel.foreignKey.association: '_VATRegistrationCountry'
      _SalesDocument.VATRegistrationCountry,

      // Header-level: Approval Reasons (associations/FK)

      @ObjectModel.foreignKey.association: '_SalesDocApprovalReason'
      _SalesDocument.SalesDocApprovalReason,

      // Header-level: Audit (users) (associations/FK)

      @ObjectModel.foreignKey.association: '_CreatedByUser'
      _SalesDocument.CreatedByUser,
      @ObjectModel.foreignKey.association: '_LastChangedByUser'
      _SalesDocument.LastChangedByUser,

      // Header-level: Master data & transactional attributes

      _SalesDocument.SoldToParty,
      _SalesDocument.SalesDocumentDate,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      _SalesDocument.TotalNetAmount,
//      _SalesDocument.TransactionCurrency,

      _SalesDocument.SalesDocumentCreationDateTime,
      _SalesDocument.AssignmentReference,
      _SalesDocument.LastChangeDate,
      _SalesDocument.LastChangeDateTime,
      _SalesDocument.CompleteDeliveryIsDefined,
      _SalesDocument.CreationDate,
      _SalesDocument.PurchaseOrderByShipToParty,
      _SalesDocument.CustomerPurchaseOrderDate,
      _SalesDocument.IsEUTriangularDeal,
      _SalesDocument.FixedValueDate,
      @ObjectModel.foreignKey.association: '_PaymentMethodVH'            
      _SalesDocument.PaymentMethod,
      _SalesDocument.AccountingDocExternalReference,
      _SalesDocument.SlsDocIsRlvtForProofOfDeliv,
      _SalesDocument.BillingCompanyCode,
      // Parent exposures (source: Item / Sales Document / Extensions)

      _Item,
      _SalesDocument,

      // Association exposures aligned to field sources

      // From Schedule Line

      SalesDocumentScheduleLine._ScheduleLineCategory,
      SalesDocumentScheduleLine._OrderQuantityUnit,
      SalesDocumentScheduleLine._DelivBlockReasonForSchedLine,
      SalesDocumentScheduleLine._GoodsMovementType,

      // From Item

      _Item._Plant,
      _Item._DeliveryDateTypeRule,
      _Item._DeliveryBlockStatus,
      _Item._DeliveryPriority,
      _Item._DeliveryStatus,
      _Item._DeliveryConfirmationStatus,
      _Item._Route,
      _Item._ShippingPoint,
      _Item._StorageLocation,
      _Item._TrdCmplncEmbargoSts,
      _Item._TrdCmplncSnctndListChkSts,
      _Item._OvrlTrdCmplncLegalCtrlChkSts,
      _Item._ItemTrdCmplncLegalCtrlChkSts,
      _Item._DangerousGoodsStatus,
      _Item._SafetyDataSheetStatus,
      _Item._ChmlCmplncStatus,
      _Item._ItemBillingBlockReason,
      _Item._BillingBlockStatus,
      _Item._OrderRelatedBillingStatus,
      _Item._BusinessArea,
      _Item._ControllingArea,
      _Item._ProfitCenter,
      _Item._CustomerPaymentTerms,
      _Item._ItemCategory,
      _Item._ProductGroup,
      _Item._MaterialPricingGroup,
      _Item._OriginallyRequestedMaterial,
      _Item._AdditionalMaterialGroup1,
      _Item._AdditionalMaterialGroup2,
      _Item._AdditionalMaterialGroup3,
      _Item._AdditionalMaterialGroup4,
      _Item._AdditionalMaterialGroup5,
      _Item._SDProcessStatus,
      _Item._ItemGeneralIncompletionStatus,
      _Item._SDDocumentRejectionStatus,
      _Item._SalesDocumentRjcnReason,
      _Item._ReferenceSDDocumentCategory,
      _Item._PartialDeliveryItem,
      _Item._CustomerGroup,
      _Item._CustomerPriceGroup,
      _Item._IncotermsClassification,
      _Item._IncotermsVersion,
      _Item._MatlAccountAssignmentGroup,
      _Item._ItemVolumeUnit,
      _Item._MRPArea,
      _Item._ResponsibleEmployee,
      _Item._SalesEmployee,
      _Item._PayerParty,
      _Item._ShipToParty,
      _Item._BillToParty,
      _Item._Product,
      _Item._DownPaymentStatus,
      _Item._ItemDownPaymentStatus,
      _Item._RequestedQuantityUnit,
      _Item._ItemWeightUnit,

      // From Sales Document

      _SalesDocument._SDPricingProcedure,
      _SalesDocument._PriceListType,
      _SalesDocument._CustomerPurchaseOrderType,
      _SalesDocument._DeliveryBlockReason,
      _SalesDocument._SalesDocApprovalStatus,
      _SalesDocument._TotalCreditCheckStatus,
      _SalesDocument._TotalBlockStatus,
      _SalesDocument._HeaderBillingBlockStatus,
      _SalesDocument._HeaderBillingBlockReason,
      _SalesDocument._CustomerAccountAssgmtGroup,
      _SalesDocument._SDDocumentCategory,
      _SalesDocument._SDDocumentReason,
      _SalesDocument._HdrGeneralIncompletionStatus,
      _SalesDocument._AdditionalCustomerGroup1,
      _SalesDocument._AdditionalCustomerGroup2,
      _SalesDocument._AdditionalCustomerGroup3,
      _SalesDocument._AdditionalCustomerGroup4,
      _SalesDocument._AdditionalCustomerGroup5,
      _SalesDocument._SalesDistrict,
      _SalesDocument._SalesGroup,
      _SalesDocument._SalesOffice,
      _SalesDocument._ShippingCondition,
      _SalesDocument._ShippingType,
      _SalesDocument._TaxDepartureCountry,
      _SalesDocument._VATRegistrationCountry,
      _SalesDocument._SalesDocApprovalReason,
      _SalesDocument._CreatedByUser,
      _SalesDocument._LastChangedByUser,
      _SalesDocument._SoldToParty,
      _SalesDocument._OrganizationDivision,
      _SalesDocument._SalesOrganization,
      _SalesDocument._DistributionChannel,
      _SalesDocument._SalesDocumentType,
      _SalesDocument._PaymentMethodVH,
      
      _OneTimeCustomer,
      _TransactionCurrency,

      ////////////////////////////////////////////////////////////////////////

      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      _SalesDocument.OverallSDProcessStatus,
      _SalesDocument._OverallSDProcessStatus,
      @ObjectModel.foreignKey.association: '_OverallDangerousGoodsStatus'
      _SalesDocument.OverallDangerousGoodsStatus,
      _SalesDocument._OverallDangerousGoodsStatus,
      @ObjectModel.foreignKey.association: '_OverallDeliveryStatus'
      _SalesDocument.OverallDeliveryStatus,
      _SalesDocument._OverallDeliveryStatus,
      @ObjectModel.foreignKey.association: '_OvrlTradeCmplncEmbargoStatus'
      _SalesDocument.OverallTrdCmplncEmbargoSts,
      _SalesDocument._OvrlTradeCmplncEmbargoStatus,
      @ObjectModel.foreignKey.association: '_OverallOrdReltdBillgStatus'
      _SalesDocument.OverallOrdReltdBillgStatus,
      _SalesDocument._OverallOrdReltdBillgStatus,
      @ObjectModel.foreignKey.association: '_OverallChmlCmplncStatus'
      _SalesDocument.OverallChmlCmplncStatus,
      _SalesDocument._OverallChmlCmplncStatus,
      @ObjectModel.foreignKey.association: '_OverallSDDocumentRejectionSts'
      _SalesDocument.OverallSDDocumentRejectionSts,
      _SalesDocument._OverallSDDocumentRejectionSts,
      @ObjectModel.foreignKey.association: '_OvrlSftyDataSheetSts'
      _SalesDocument.OverallSafetyDataSheetStatus,
      _SalesDocument._OvrlSftyDataSheetSts,
      @ObjectModel.foreignKey.association: '_OvTrdCmplncSnctndListChkSts'
      _SalesDocument.OvrlTrdCmplncSnctndListChkSts,
      _SalesDocument._OvTrdCmplncSnctndListChkSts,

      // DCL helper exposures

      @Consumption.hidden: true
      _SalesDocument.SalesDocumentType,
      @Consumption.hidden: true
      _SalesDocument.OrganizationDivision,
      @Consumption.hidden: true
      _SalesDocument.SalesOrganization,
      @Consumption.hidden: true
      _SalesDocument.DistributionChannel
}

where
     _SalesDocument.SDDocumentCategory = 'C'
  or _SalesDocument.SDDocumentCategory = 'I'