@EndUserText.label : 'Requested Product Allocation Sales Order Schedule Lines'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
define view entity P_ReqdProdAllocSalesSchedLine
as select from P_AllocQtyAssgmtOrdItmValCombn as QA
inner join I_SalesDocumentScheduleLine as SL
on QA.ProdAllocAssignedOrder = SL.SalesDocument
and QA.ProdAllocAssignedOrderItem = SL.SalesDocumentItem
and QA.ProdAllocAssignedOrderType = '01'
{
//Key
key SL.SalesDocument as ProdAllocAssignedOrder,
key SL.SalesDocumentItem as ProdAllocAssignedOrderItem,
key QA.CharcValueCombinationUUID,
key SL.RequestedDeliveryDate,
key SL.RequestedDeliveryTime,
//SL._SalesDocumentItem._SalesDocument._SoldToParty._StandardAddress.AddressTimeZone as AddressTimeZone,
//SL._SalesDocumentItem._Plant._Address.AddressTimeZone as AddressTimeZone,
dats_tims_to_tstmp(SL.RequestedDeliveryDate, SL.RequestedDeliveryTime,
SL._SalesDocument._SoldToParty._AddressDefaultRepresentation.AddressTimeZone,
$session.client , 'INITIAL') as ProdAllocReqdDelivUTCDateTime,
@Semantics.quantity.unitOfMeasure : 'OrderQuantityUnit'
sum(SL.ScheduleLineOrderQuantity) as ScheduleLineOrderQuantity,
//SL._SalesDocumentItem.BaseUnit as BaseUnit,
SL.OrderQuantityUnit as OrderQuantityUnit /*,
min(SL.DeliveryDate) as RequestedDeliveryDate ,
sum( case when SL.ConfdOrderQtyByMatlAvailCheck < SL.ScheduleLineOrderQuantity
then 1
else 0
end )
as NrOfNotFullyConfdSchedLines */
}
where SL.OrderQuantityUnit <> ''
and SL.RequestedDeliveryDate <> '00000000'
and SL.RequirementsClass <> ''
group by
SL.SalesDocument,
SL.SalesDocumentItem,
QA.CharcValueCombinationUUID,
SL.RequestedDeliveryDate,
SL.RequestedDeliveryTime,
SL._SalesDocument._SoldToParty._AddressDefaultRepresentation.AddressTimeZone,
//SL._SalesDocumentItem._Plant._Address.AddressTimeZone,
//SL._SalesDocumentItem.BaseUnit
SL.OrderQuantityUnit
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_CUSTOMER",
"I_ORGANIZATIONADDRESS",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTSCHEDULELINE",
"P_ALLOCQTYASSGMTORDITMVALCOMBN"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_ReqdProdAllocSalesSchedLine view_entity