//@AbapCatalog.sqlViewName : 'CUST360BDRDEL'
//@AbapCatalog.compiler.compareFilter: true
//@AbapCatalog.preserveKey: true
@ObjectModel: {
// compositionRoot: true ,
// representativeKey: 'DeliveryDocument',
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XL
}
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label : 'Customer 360 Recent Delivery'
@VDM.viewType: #CONSUMPTION
define view entity C_Cust360RecentDeliveryDoc as select from I_DeliveryDocument as DeliveryDocument
inner join I_Customer360BusDocSetting as Customer360BusDocSetting on Customer360BusDocSetting.Cust360BusDocCategory = DeliveryDocument.SDDocumentCategory
// I_Customer360GeneralSetting as Customer360GeneralSetting on Customer360GeneralSetting.CustomerViewProfileName = 'CUSTPROFL'
{
@ObjectModel.foreignKey.association : '_SoldToParty'
@ObjectModel.text.element: ['CustomerName']
key DeliveryDocument.SoldToParty as SoldToParty,
@Consumption.semanticObject : 'OutboundDelivery'
key DeliveryDocument.DeliveryDocument as OutboundDelivery,
key DeliveryDocument.SDDocumentCategory,
@UI.hidden: true
DeliveryDocument._SoldToParty.CustomerName as CustomerName,
DeliveryDocument.DeliveryDocumentType,
DeliveryDocument._DeliveryDocumentType._Text[1:Language = $session.system_language].DeliveryDocumentTypeName as DeliveryDocumentTypeName,
@ObjectModel.foreignKey.association : '_OverallSDProcessStatus'
@UI.lineItem: [{criticality: 'DeliveryStatusCriticality' }]
DeliveryDocument.OverallSDProcessStatus,
DeliveryDocument._OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc as OverallSDProcessStatusDesc,
case DeliveryDocument.OverallSDProcessStatus
when 'C' then 3
when ' ' then 2
when 'A' then 0
end as DeliveryStatusCriticality,
@Semantics.amount.currencyCode : 'TransactionCurrency'
DeliveryDocument.TotalNetAmount,
DeliveryDocument.TransactionCurrency,
DeliveryDocument.CreationDate,
// DeliveryDocument.LastChangeDate,
//expose associations
DeliveryDocument._DeliveryDocumentType,
DeliveryDocument._OverallSDProcessStatus,
//For DCL
DeliveryDocument.SalesOrganization,
@ObjectModel.text.element: ['ShippingPointName']
@ObjectModel.foreignKey.association : '_ShippingPoint'
DeliveryDocument.ShippingPoint,
@UI.hidden: true
DeliveryDocument._ShippingPoint._Text[1:Language = $session.system_language].ShippingPointName as ShippingPointName,
DeliveryDocument._ShippingPoint,
DeliveryDocument._SoldToParty
}
where
DeliveryDocument.CreationDate > dats_add_days( tstmp_to_dats(tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL ' ), $session.client, 'NULL '), -Customer360BusDocSetting.RecentBusDocDurationInDays, 'INITIAL')
and DeliveryDocument.CreationDate <= $session.system_date
and DeliveryDocument.SDDocumentCategory = 'J'
Depth:
1
2
3
4
5
All
Reload
C_Cust360RecentDeliveryDoc view_entity