C_ESJISalesOrderItemQuery

DDL: C_ESJISALESORDERITEMQUERY SQL: CESJISLSODRITMQ Type: view CONSUMPTION Package: ESJI_SD_JAM_INTEG_CDS_CONT

Sales Order Item

C_ESJISalesOrderItemQuery is a Consumption CDS View that provides data about "Sales Order Item" in SAP S/4HANA. It reads from 1 data source (I_SalesDocumentItem) and exposes 63 fields with key fields SalesOrder, SalesOrderItem. Part of development package ESJI_SD_JAM_INTEG_CDS_CONT.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocumentItem SalesDocumentItem from

Parameters (1)

NameTypeDefault
P_Language sylangu

Annotations (6)

NameValueLevelField
EndUserText.label Sales Order Item view
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName CESJISLSODRITMQ view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.sizeCategory #XL view

Fields (63)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder SalesDocument
KEY SalesOrderItem SalesDocumentItem
ObjectType
SalesOrderType _SalesOrder SalesOrderType
SalesOrderItemCategory SalesDocumentItemCategory
CreatedByUser CreatedByUser
CreationDate CreationDate
CreationTime CreationTime
LastChangeDate LastChangeDate
Material Material
ProductionPlant Plant
SalesOrderItemText SalesDocumentItemText
OrderQuantity OrderQuantity
ConfdDelivQtyInOrderQtyUnit ConfdDelivQtyInOrderQtyUnit
OrderQuantityUnit OrderQuantityUnit
BaseUnit BaseUnit
OrderToBaseQuantityDnmntr OrderToBaseQuantityDnmntr
OrderToBaseQuantityNmrtr OrderToBaseQuantityNmrtr
SalesOrganization _SalesOrder SalesOrganization
DistributionChannel _SalesOrder DistributionChannel
OrganizationDivision _SalesOrder OrganizationDivision
NetAmount NetAmount
PricingDate PricingDate
NetPriceAmount NetPriceAmount
NetPriceQuantity NetPriceQuantity
NetPriceQuantityUnit NetPriceQuantityUnit
TaxAmount TaxAmount
TransactionCurrency TransactionCurrency
ShippingPoint ShippingPoint
ShippingType ShippingType
DeliveryPriority DeliveryPriority
PartialDeliveryIsAllowed PartialDeliveryIsAllowed
IncotermsClassification IncotermsClassification
IncotermsTransferLocation IncotermsTransferLocation
UnderdelivTolrtdLmtRatioInPct UnderdelivTolrtdLmtRatioInPct
OverdelivTolrtdLmtRatioInPct OverdelivTolrtdLmtRatioInPct
BillingDocumentDate BillingDocumentDate
ItemBillingBlockReason ItemBillingBlockReason
ItemIsBillingRelevant ItemIsBillingRelevant
CustomerPaymentTerms CustomerPaymentTerms
BusinessArea BusinessArea
WBSElement WBSElement
DeliveryStatus DeliveryStatus
SDDocumentRejectionStatus SDDocumentRejectionStatus
SalesDocumentRjcnReason I_SalesDocumentItem SalesDocumentRjcnReason
SalesDocumentRjcnReasonName
RequestedDeliveryDate _SOItemDeliveryDate RequestedDeliveryDate
_SalesOrder _SalesOrder
_Partner _Partner
_CreatedByUser _CreatedByUser
_Material _Material
_OrderQuantityUnit _OrderQuantityUnit
_BaseUnit _BaseUnit
_NetPriceQuantityUnit _NetPriceQuantityUnit
_TransactionCurrency _TransactionCurrency
_ShippingType _ShippingType
_IncotermsClassification _IncotermsClassification
_ItemBillingBlockReason _ItemBillingBlockReason
_CustomerPaymentTerms _CustomerPaymentTerms
_DeliveryStatus _DeliveryStatus
_SDDocumentRejectionStatus _SDDocumentRejectionStatus
DeliveryStatusDescription
SDDocumentRejectionStatusDesc
@EndUserText.label: 'Sales Order Item'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'CESJISLSODRITMQ'
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.sizeCategory: #XL
define view C_ESJISalesOrderItemQuery
with parameters
    P_Language : sylangu
as select from 
I_SalesDocumentItem as SalesDocumentItem

association[1]    to I_SalesOrder                  as _SalesOrder            on $projection.SalesOrder                = _SalesOrder.SalesOrder
association[0..1] to C_ESJISOScheduleLineDelivDate as _SOItemDeliveryDate    on $projection.SalesOrder                = _SOItemDeliveryDate.SalesOrder and $projection.SalesOrderItem = _SOItemDeliveryDate.SalesOrderItem

{

    // Key

    key SalesDocument as SalesOrder,
    key SalesDocumentItem as SalesOrderItem,

    'BUS2032' as ObjectType,
    _SalesOrder.SalesOrderType,

    // Category

    SalesDocumentItemCategory as SalesOrderItemCategory,

    // Admin

    CreatedByUser,
    @Semantics.businessDate.createdAt: true
    CreationDate,
    CreationTime,
    @Semantics.businessDate.lastChangedAt: true
    LastChangeDate,

    // Product

    Material,
    Plant   as  ProductionPlant,

    // Sales

    SalesDocumentItemText as SalesOrderItemText,
    @DefaultAggregation: #SUM
    @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
    OrderQuantity,
    @DefaultAggregation: #SUM
    @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
    ConfdDelivQtyInOrderQtyUnit,
    @Semantics.unitOfMeasure: true
    OrderQuantityUnit,
    @Semantics.unitOfMeasure: true
    BaseUnit,
    OrderToBaseQuantityDnmntr,
    OrderToBaseQuantityNmrtr,

    _SalesOrder.SalesOrganization,
    _SalesOrder.DistributionChannel,
    _SalesOrder.OrganizationDivision,
    
    // Pricing

    @DefaultAggregation: #SUM
    @Semantics.amount.currencyCode: 'TransactionCurrency'
    NetAmount,
    PricingDate,
    @DefaultAggregation: #NONE
    @Semantics.amount.currencyCode: 'TransactionCurrency'
    NetPriceAmount,
    @DefaultAggregation: #NONE
    @Semantics.quantity.unitOfMeasure: 'NetPriceQuantityUnit'
    NetPriceQuantity,
    @Semantics.unitOfMeasure: true
    NetPriceQuantityUnit,
    @DefaultAggregation: #SUM
    @Semantics.amount.currencyCode: 'TransactionCurrency'
    TaxAmount,
    @Semantics.currencyCode: true
    TransactionCurrency,

    //Shipping

    ShippingPoint,
    ShippingType,
    DeliveryPriority,
    PartialDeliveryIsAllowed,
    IncotermsClassification,
    IncotermsTransferLocation,
    UnderdelivTolrtdLmtRatioInPct,
    OverdelivTolrtdLmtRatioInPct,

    //Billing

    BillingDocumentDate,
    ItemBillingBlockReason,
    ItemIsBillingRelevant,

    //Payment

    CustomerPaymentTerms,
    BusinessArea,
    WBSElement,

    //Status

    DeliveryStatus,
    SDDocumentRejectionStatus,
    
    SalesDocumentItem.SalesDocumentRjcnReason,
    SalesDocumentItem._SalesDocumentRjcnReason._Text[1: Language = $parameters.P_Language].SalesDocumentRjcnReasonName, 

    _SOItemDeliveryDate.RequestedDeliveryDate as RequestedDeliveryDate,

    _SalesOrder,
    _Partner,
    _CreatedByUser,
    _Material,
    _OrderQuantityUnit,
    _BaseUnit,
    _NetPriceQuantityUnit,
    _TransactionCurrency,
    _ShippingType,
    _IncotermsClassification,
    _ItemBillingBlockReason,
    _CustomerPaymentTerms,

    _DeliveryStatus,
    _SDDocumentRejectionStatus,

    _DeliveryStatus._Text[1: Language=$parameters.P_Language].DeliveryStatusDescription as DeliveryStatusDescription,
    _SDDocumentRejectionStatus._Text[1: Language=$parameters.P_Language].SDDocumentRejectionStatusDesc
}