@AbapCatalog.sqlViewName: 'COUTBDELIVLIST'
@ClientHandling.algorithm:#SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck:#CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@Metadata.allowExtensions: true -- UI Annotations in the Metadata Extensions file
@AbapCatalog.viewEnhancementCategory: [#PROJECTION_LIST, #UNION] -- Enabled creating extension for UNION view
@ObjectModel: {
compositionRoot: true,
semanticKey: ['DeliveryDocument'],
representativeKey: 'DeliveryDocument',
usageType.dataClass: #MIXED,
usageType.serviceQuality: #D,
usageType.sizeCategory: #L,
updateEnabled: true
}
@UI.headerInfo: {
typeName: 'Manage Outbound Delivery',
typeNamePlural: 'Manage Outbound Deliveries', -- Object List Table Title
title: {
type: #STANDARD,
value: 'DeliveryDocument',
label: 'Outbound Delivery'
},
description: {
value: 'PickingDate'
}
}
@UI.presentationVariant:{
requestAtLeast: ['OverallPickingStatus', 'OverallPickingConfStatus', 'OverallGoodsMovementStatus',
'ActualGoodsMovementDate', 'SDDocumentCategory', 'OverallChmlCmplncStatus',
'OverallDangerousGoodsStatus', 'OverallSafetyDataSheetStatus',
'PostGoodsIssueIsEnabled', 'ReverseGoodsIssueIsEnabled']
}
define view C_OutboundDeliveryList
as select from I_DeliveryDocument as DeliveryDocument
association to I_LogProcgSts as _LogProcgStsPick on $projection.OverallPickingStatus = _LogProcgStsPick.ProcessingStatus
association to I_LogProcgSts as _LogProcgStsConf on $projection.OverallPickingConfStatus = _LogProcgStsConf.ProcessingStatus
association to I_LogProcgSts as _LogProcgStsMove on $projection.OverallGoodsMovementStatus = _LogProcgStsMove.ProcessingStatus
association [0..*] to C_DeliveryShipToPartyVH as _DlvShipToPartyVH on $projection.ShipToParty = _DlvShipToPartyVH.Customer
association [0..1] to I_DeliveryPriority as _DeliveryPriority on $projection.DeliveryPriority = _DeliveryPriority.DeliveryPriority
association [0..1] to C_ShippingPointVH as _ShippingPointVH on $projection.ShippingPoint = _ShippingPointVH.ShippingPoint
association [0..1] to C_OutboundDeliveryTypeVH as _DeliveryTypeVH on $projection.DeliveryDocumentType = _DeliveryTypeVH.DeliveryDocumentType
association [0..1] to I_User as _User on $projection.CreatedByUser = _User.UserID
association [0..1] to C_OutbDelivListCreatedByVH as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_OutbDelivFirstFreightOrd as _FreightOrder on $projection.DeliveryDocument = _FreightOrder.DeliveryDocument
association [1..1] to I_DeliveryStatusValuation as _StatusValuation on $projection.DeliveryDocument =_StatusValuation.DeliveryDocument
{
@EndUserText.label: 'Delivery Document'
@Consumption.semanticObject: #(SemanticObject)
key DeliveryDocument as DeliveryDocument,
@UI.hidden: true
case SDDocumentCategory
when 'J' then 'OutboundDelivery'
when 'T' then 'ReturnsDelivery'
end as SemanticObject,
@ObjectModel.foreignKey.association: '_DeliveryPriority'
case
when DeliveryPriority = '00' then ' '
else DeliveryPriority
end as DeliveryPriority,
PickingDate,
@EndUserText.label: 'Picking Status'
@ObjectModel.foreignKey.association:'_LogProcgStsPick'
OverallPickingStatus,
@UI.hidden
cast(
case OverallPickingStatus
when '' then 0
when 'A' then 1
when 'B' then 2
when 'C' then 3
else 0
end as abap.int1
) as PickingStatusCriticality,
@EndUserText.label: 'Confirmation Status'
@ObjectModel.foreignKey.association:'_LogProcgStsConf'
OverallPickingConfStatus,
@UI.hidden
cast(
case OverallPickingConfStatus
when '' then 0
when 'A' then 1
when 'B' then 2
when 'C' then 3
else 0
end as abap.int1
) as ConfirmationStatusCriticality,
@EndUserText.quickInfo: 'First Freight Order of Delivery'
@Consumption.valueHelpDefinition: [{entity: {name: 'C_OutbDelivFreightOrdVH',element: 'FreightOrder'} }]
_FreightOrder.FreightOrder as FreightOrder,
@EndUserText.label: 'GI Status'
@ObjectModel.foreignKey.association:'_LogProcgStsMove'
OverallGoodsMovementStatus,
@UI.hidden
cast(
case OverallGoodsMovementStatus
when '' then 0
when 'A' then 1
when 'B' then 2
when 'C' then 3
else 0
end as abap.int1
) as GoodsMovementStatusCriticality,
@Consumption.valueHelpDefinition: [ { entity: { name: 'D_CustomerCVH', element: 'Customer' } } ]
@ObjectModel.text.element: ['CustomerName']
@UI.textArrangement: #TEXT_FIRST
@Consumption.semanticObject: 'Customer'
ShipToParty,
@UI.hidden: true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_LE_PARTNER_FULLNAME_F0867A'
cast('' as ad_namtext ) as CustomerName,
@UI.textArrangement: #TEXT_FIRST
@Consumption.valueHelpDefinition: [{entity: {name: 'C_ShippingPointVH',element: 'ShippingPoint'} }]
@ObjectModel.text.association: '_ShippingPoint'
ShippingPoint,
@EndUserText.label: 'Actual Goods Movement Date'
ActualGoodsMovementDate,
cast (PlannedGoodsIssueDate as wadak_plan) as PlannedGoodsIssueDate,
LoadingDate,
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_OutbDelivListCreatedByVH', element: 'UserID' } } ]
@ObjectModel.foreignKey.association: '_CreatedByUser'
CreatedByUser,
@Consumption.valueHelpDefinition: [{entity: {name: 'C_OutboundDeliveryTypeVH',element: 'DeliveryDocumentType'} }]
@UI.textArrangement: #TEXT_FIRST
@ObjectModel.text.association:'_DeliveryDocumentType'
DeliveryDocumentType,
@Consumption.filter.selectionType:#INTERVAL
CreationDate,
@UI.hidden: true
SDDocumentCategory as SDDocumentCategory,
// Overall Marketability Check Status
@ObjectModel.foreignKey.association:'_OverallChmlCmplncStatus'
@EndUserText.label: 'Product Marketability Status'
OverallChmlCmplncStatus,
@UI.hidden
cast(
case OverallChmlCmplncStatus
when '' then 0
when 'A' then 3
when 'C' then 1
when 'D' then 1
else 0
end as abap.int1
) as OvrlChmlCmplncStsCriticality,
// Overall Dangerous Goods Status
@ObjectModel.foreignKey.association:'_OverallDangerousGoodsStatus'
@EndUserText.label: 'Dangerous Goods Status'
OverallDangerousGoodsStatus,
@UI.hidden
cast(
case OverallDangerousGoodsStatus
when '' then 0
when 'A' then 3
when 'B' then 2
when 'D' then 1
else 0
end as abap.int1
) as OvrlDngrsGdsStsCriticality,
// Overall Safety Data Sheet Status
@ObjectModel.foreignKey.association:'_OvrlSftyDataSheetSts'
@EndUserText.label: 'Safety Data Sheet Status'
OverallSafetyDataSheetStatus,
@UI.hidden
cast(
case OverallSafetyDataSheetStatus
when '' then 0
when 'A' then 3
when 'B' then 2
when 'D' then 1
else 0
end as abap.int1
) as OvrlSftyDataSheetStsCritlty,
@EndUserText.label: 'Warehouse Execution Status'
@Feature: 'LE_SHP_ASR_SHOW_FIELDS'
@ObjectModel.foreignKey.association: '_WarehouseExecutionStatus'
ReadyForWarehouseExecStatus,
@EndUserText.label: 'Adv. Ship. & Rec. Relevance'
@Feature: 'LE_SHP_ASR_SHOW_FIELDS'
@ObjectModel.foreignKey.association: '_DelivAdvncdShipgRcvgRlvnce'
DelivAdvncdShipgRcvgRlvnce,
// @ObjectModel.foreignKey.association: '_ProposedDeliveryRoute'
@Consumption.valueHelpDefinition: [ { entity: { name: 'C_OutbDelivListPrpsdDlvRouteVH', element: 'Route' } } ]
ProposedDeliveryRoute,
@UI.hidden: true
@EndUserText.label: 'PostGoodsIssue Is Enabled'
cast( case
when _StatusValuation.DeliveryStatusValuation like '3' then 'X'
when _StatusValuation.DeliveryStatusValuation not like '3' then ''
end as xfeld ) as PostGoodsIssueIsEnabled,
@UI.hidden: true
@EndUserText.label: 'ReverseGoodsIssue Is Enabled'
cast( case
when _StatusValuation.DeliveryStatusValuation like '4' then 'X'
when _StatusValuation.DeliveryStatusValuation not like '4' then ''
end as xfeld ) as ReverseGoodsIssueIsEnabled,
//Associations
@Consumption.filter.hidden: true
_DeliveryPriority,
@Consumption.filter.hidden: true
_ShipToParty,
@Consumption.filter.hidden: true
_ShippingPoint,
@Consumption.filter.hidden: true
_LogProcgStsPick,
@Consumption.filter.hidden: true
_LogProcgStsConf,
@Consumption.filter.hidden: true
_LogProcgStsMove,
@Consumption.filter.hidden: true
_DlvShipToPartyVH,
@Consumption.filter.hidden: true
_DeliveryTypeVH,
@Consumption.filter.hidden: true
_ShippingPointVH,
@Consumption.filter.hidden: true
_OverallChmlCmplncStatus,
@Consumption.filter.hidden: true
_OverallDangerousGoodsStatus,
@Consumption.filter.hidden: true
_OvrlSftyDataSheetSts,
@Consumption.filter.hidden: true
_User,
@Consumption.filter.hidden: true
_WarehouseExecutionStatus,
@Consumption.filter.hidden: true
_DelivAdvncdShipgRcvgRlvnce,
@Consumption.filter.hidden: true
_ProposedDeliveryRoute,
@Consumption.filter.hidden: true
_FreightOrder,
@Consumption.filter.hidden: true
_CreatedByUser,
@Consumption.filter.hidden: true
_DeliveryDocumentType,
@Consumption.filter.hidden: true
_StatusValuation
} where SDDocumentCategory = 'J' or SDDocumentCategory = 'T'