CDS View Sales Order Information
@AbapCatalog.sqlViewName: 'ZSALESORDER'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Sales Order Information'
define view ZTest1 as select from afko as salesOrderHeader
inner join afpo as salesOrderItem on salesOrderHeader.aufnr = salesOrderItem.aufnr
inner join resb as reservation on salesOrderHeader.rsnum = reservation.rsnum
inner join mara as materialMaster on reservation.matnr = materialMaster.matnr
inner join marc as plantSpecific on reservation.matnr = plantSpecific.matnr and salesOrderItem.dwerk = plantSpecific.werks
inner join mara as materialMasterPlanned on salesOrderHeader.plnbez = materialMasterPlanned.matnr
inner join t023t as materialTypeDescription on materialMasterPlanned.matkl = materialTypeDescription.matkl
{
key salesOrderHeader.aufnr as SalesOrderNumber,
salesOrderHeader.plnbez as PlannedMaterialNumber,
salesOrderHeader.gamng as TotalOrderQuantity,
salesOrderHeader.gmein as OrderQuantityUnit,
salesOrderHeader.gstri as OrderStart,
salesOrderHeader.dispo as MRPController,
salesOrderHeader.aprio as MRPPriority,
salesOrderItem.ltrmi as VendorConfirmationDate,
salesOrderItem.ablad as UnloadingPoint,
salesOrderItem.charg as Batch,
salesOrderItem.wempf as ShippingPoint,
salesOrderItem.kdauf as SalesDocument,
salesOrderItem.kdpos as SalesDocumentItem,
reservation.matnr as ReservationMaterialNumber,
reservation.bdmng as ReservationQuantity,
reservation.meins as ReservationUnit,
reservation.xloek as MaterialDeletionIndicator,
salesOrderHeader.gstrp as OrderStartPlanned,
salesOrderHeader.gltrp as OrderEndPlanned,
salesOrderItem.wemng as GoodsMovementQuantity,
salesOrderItem.lgort as StorageLocation,
salesOrderHeader.cy_seqnr as CycleSequenceNumber,
salesOrderHeader.aufpl as PlannedOrderNumber,
materialMasterPlanned.bismt as AssemblyMaterial
}
Comments
Post a Comment