Output Field | Field Desc | FieldPath |
DeliveryDocument | Delivery | I_DeliveryDocumentItem.DeliveryDocument |
DeliveryDocumentItem | Item | I_DeliveryDocumentItem.DeliveryDocumentItem |
ActualDeliveredQtyInBaseUnit | Sales Quantity | I_DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit |
BaseUnit | Unit of Measure | I_DeliveryDocumentItem.BaseUnit |
Product | Material Number | I_DeliveryDocumentItem.Product |
ActualGoodsMovementDate | Actual Goods Movement Date | I_DeliveryDocumentItem._DeliveryDocument.ActualGoods MovementDate |
SoldToParty | Customer (External) | I_DeliveryDocumentItem._DeliveryDocument.SoldToParty |
DeliveryDocumentType | Delivery Type | I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType |
ReferenceSDDocumentItem | Reference Item | I_DeliveryDocumentItem.ReferenceSDDocumentItem |
ReferenceSDDocument | Reference Document | I_DeliveryDocumentItem.ReferenceSDDocument |
CustomerName_Sold | Customer Name (External) | I_DeliveryDocumentItem._DeliveryDocument._SoldToParty.CustomerName |
ReferenceSDDocumentCategory | Reference Document Category | I_DeliveryDocumentItem.ReferenceSDDocumentCategory |
SalesDocumentDate | Document Date | I_DeliveryDocumentItem._ReferenceSDDocument.SalesDocumentDate |
CompanyCode | Company Code | I_DeliveryDocumentItem._DeliveryDocument._SalesOrganization.CompanyCode |
SalesOrganization | Sales Organization | I_DeliveryDocumentItem._DeliveryDocument.SalesOrganization |
ValuationArea | Valuation Area | I_DeliveryDocumentItem._Plant.ValuationArea |
Currency | Company Code Currency | I_DeliveryDocumentItem._DeliveryDocument._SalesOrganization._ CompanyCode.Currency |
CustomerName_Ship | Account Name (Intercompany) | I_DeliveryDocumentItem._DeliveryDocument._ShipToParty.CustomerName |
ShipToParty | Customer (Intercompany) | I_DeliveryDocumentItem._DeliveryDocument.ShipToParty |
TransactionCurrency | Document Currency | I_DeliveryDocumentItem._ReferenceSalesDocumentItem.TransactionCurrency |
Field | Field Desc | Formula |
Customer | Customer | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF' OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' then I_DeliveryDocumentItem._DeliveryDocument.SoldToParty else I_DeliveryDocumentItem._DeliveryDocument.ShipToParty end |
CustomerName | Customer Name | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF' OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' then I_DeliveryDocumentItem._DeliveryDocument._SoldToParty.CustomerName else I_DeliveryDocumentItem._DeliveryDocument._ShipToParty.CustomerName end |
SO | Sales Order | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF' OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' then I_DeliveryDocumentItem.ReferenceSDDocument else '' end |
SOITEM | Sales Order Line Item | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF' OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' then I_DeliveryDocumentItem.ReferenceSDDocumentItem else '' end |
PO | Purchase Order | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF' OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' then '' else I_DeliveryDocumentItem.ReferenceSDDocument end |
POITEM | Purchase Order Line Item | case when ` I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'` OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'` then ''`else I_DeliveryDocumentItem.ReferenceSDDocumentItem` end |
QuantitySold | Sales quantity (with sign) | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' or I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LLR' then -1 * I_DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit else I_DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit end |
Sign | Sales Quantity Sign | case when I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR' or I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LLR' then -1 else 1 end |
I_DeliveryDocumentItem._DeliveryDocument.ActualGoodsMovementDate >= $parameters.P_MONTH_STARTDATE
AND I_DeliveryDocumentItem._DeliveryDocument.ActualGoodsMovementDate <= $parameters.P_MONTH_ENDDATE
AND(
I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'NLCC'
OR I_DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LLR'
)
AND I_DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit > 0
define view entity ZZA3002620_BaseDelivDoc
with parameters
P_MONTH_STARTDATE : abap.dats,
P_MONTH_ENDDATE : abap.dats
as select from I_DeliveryDocumentItem as DeliveryDocumentItem
{
key DeliveryDocumentItem.DeliveryDocument,
key DeliveryDocumentItem.DeliveryDocumentItem,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@Aggregation.default: #SUM
DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit,
DeliveryDocumentItem.BaseUnit as BaseUnit,
DeliveryDocumentItem.Product as Product,
DeliveryDocumentItem._DeliveryDocument.ActualGoodsMovementDate as ActualGoodsMovementDate,
DeliveryDocumentItem._DeliveryDocument.SoldToParty as SoldToParty,
DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType as DeliveryDocumentType,
DeliveryDocumentItem.ReferenceSDDocumentItem as ReferenceSDDocumentItem,
DeliveryDocumentItem.ReferenceSDDocument as ReferenceSDDocument,
@Semantics.text:true
DeliveryDocumentItem._DeliveryDocument._SoldToParty.CustomerName as CustomerName_Sold,
DeliveryDocumentItem.ReferenceSDDocumentCategory as ReferenceSDDocumentCategory,
DeliveryDocumentItem._ReferenceSDDocument.SalesDocumentDate as SalesDocumentDate,
DeliveryDocumentItem._DeliveryDocument._SalesOrganization.CompanyCode as CompanyCode,
DeliveryDocumentItem._DeliveryDocument.SalesOrganization as SalesOrganization,
DeliveryDocumentItem._Plant.ValuationArea as ValuationArea,
DeliveryDocumentItem._DeliveryDocument._SalesOrganization._CompanyCode.Currency as Currency,
@Semantics.text:true
DeliveryDocumentItem._DeliveryDocument._ShipToParty.CustomerName as CustomerName_Ship,
DeliveryDocumentItem._DeliveryDocument.ShipToParty as ShipToParty,
DeliveryDocumentItem._ReferenceSalesDocumentItem.TransactionCurrency as TransactionCurrency,
...
}
...
/* Calcution */
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
then DeliveryDocumentItem._DeliveryDocument.SoldToParty
else DeliveryDocumentItem._DeliveryDocument.ShipToParty
end as Customer,
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
then DeliveryDocumentItem._DeliveryDocument._SoldToParty.CustomerName
else DeliveryDocumentItem._DeliveryDocument._ShipToParty.CustomerName
end as CustomerName,
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
then DeliveryDocumentItem.ReferenceSDDocument
else ''
end as SO,
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
then DeliveryDocumentItem.ReferenceSDDocumentItem
else '000000'
end as SOITEM,
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
then ''
else DeliveryDocumentItem.ReferenceSDDocument
end as po,
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
then '000000'
else DeliveryDocumentItem.ReferenceSDDocumentItem
end as poitem,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LLR'
then -1 * DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit
else DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit
end as QuantitySold,
case when DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LLR'
then -1
else 1
end as Sign,
select from I_DeliveryDocumentItem as DeliveryDocumentItem
{
...
}
where
DeliveryDocumentItem._DeliveryDocument.ActualGoodsMovementDate >= $parameters.P_MONTH_STARTDATE
and DeliveryDocumentItem._DeliveryDocument.ActualGoodsMovementDate <= $parameters.P_MONTH_ENDDATE
and(
DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LF'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LR'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'NLCC'
or DeliveryDocumentItem._DeliveryDocument.DeliveryDocumentType = 'LLR'
)
and DeliveryDocumentItem.ActualDeliveredQtyInBaseUnit > 0
Based on the entered date criteria, the eligible data is displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |