C_DelivDocItemTrdCmplncIssue

DDL: C_DELIVDOCITEMTRDCMPLNCISSUE SQL: CDELIVDOCITMDE07 Type: view CONSUMPTION

Delivery Doc Item Trade Compliance Issue

C_DelivDocItemTrdCmplncIssue is a Consumption CDS View that provides data about "Delivery Doc Item Trade Compliance Issue" in SAP S/4HANA. It reads from 2 data sources (I_SalesOrdInDelivTrdCmplncIss, I_DeliveryDocumentItem) and exposes 66 fields with key fields DeliveryDocument, DeliveryDocumentItem. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
I_SalesOrdInDelivTrdCmplncIss Issue inner
I_DeliveryDocumentItem Item from

Associations (1)

CardinalityTargetAliasCondition
[0..1] E_DeliveryDocumentItem _Extension $projection.DeliveryDocument = _Extension.DeliveryDocument and $projection.DeliveryDocumentItem = _Extension.DeliveryDocumentItem

Annotations (13)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.representativeKey DeliveryDocumentItem view
EndUserText.label Delivery Doc Item Trade Compliance Issue view
VDM.viewType #CONSUMPTION view
AbapCatalog.compiler.compareFilter true view
Search.searchable false view
AccessControl.authorizationCheck #CHECK view
Metadata.allowExtensions true view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName CDELIVDOCITMDE07 view

Fields (66)

KeyFieldSource TableSource FieldDescription
KEY DeliveryDocument I_DeliveryDocumentItem DeliveryDocument
KEY DeliveryDocumentItem I_DeliveryDocumentItem DeliveryDocumentItem
DeliveryDocumentItemCategory I_DeliveryDocumentItem DeliveryDocumentItemCategory
DeliveryDocumentItemText I_DeliveryDocumentItem DeliveryDocumentItemText
DueDays I_SalesOrdInDelivTrdCmplncIss DueDays
Material
MaterialName
MaterialByCustomer I_DeliveryDocumentItem MaterialByCustomer
MaterialGroup
Batch I_DeliveryDocumentItem Batch
Plant I_DeliveryDocumentItem Plant
Warehouse I_DeliveryDocumentItem Warehouse
WarehouseName
StorageLocation I_DeliveryDocumentItem StorageLocation
ActualDeliveryQuantity I_DeliveryDocumentItem ActualDeliveryQuantity
DeliveryQuantityUnit I_DeliveryDocumentItem DeliveryQuantityUnit
ItemGrossWeight I_DeliveryDocumentItem ItemGrossWeight
ItemNetWeight I_DeliveryDocumentItem ItemNetWeight
ItemWeightUnit I_DeliveryDocumentItem ItemWeightUnit
ItemVolume I_DeliveryDocumentItem ItemVolume
ItemVolumeUnit I_DeliveryDocumentItem ItemVolumeUnit
LoadingGroup I_DeliveryDocumentItem LoadingGroup
TransportationGroup I_DeliveryDocumentItem TransportationGroup
GoodsMovementType I_DeliveryDocumentItem GoodsMovementType
InventorySpecialStockType I_DeliveryDocumentItem InventorySpecialStockType
StockType I_DeliveryDocumentItem StockType
WarehouseStagingArea I_DeliveryDocumentItem WarehouseStagingArea
WarehouseStagingAreaName
OverdelivTolrtdLmtRatioInPct I_DeliveryDocumentItem OverdelivTolrtdLmtRatioInPct
UnderdelivTolrtdLmtRatioInPct I_DeliveryDocumentItem UnderdelivTolrtdLmtRatioInPct
ItemBillingBlockReason I_DeliveryDocumentItem ItemBillingBlockReason
PickingStatus I_DeliveryDocumentItem PickingStatus
DeliveryRelatedBillingStatus I_DeliveryDocumentItem DeliveryRelatedBillingStatus
PackingStatus I_DeliveryDocumentItem PackingStatus
PickingConfirmationStatus I_DeliveryDocumentItem PickingConfirmationStatus
WarehouseActivityStatus I_DeliveryDocumentItem WarehouseActivityStatus
GoodsMovementStatus I_DeliveryDocumentItem GoodsMovementStatus
TrdCmplncEmbargoSts
TrdCmplncSnctndListChkSts
TrdCmplncLegalControlSts
DeliveryDocumentType _DeliveryDocument DeliveryDocumentType
int1asTrdCmplncEmbargoStsCritlty
int1asTrdCmplncSnctndListCritlty
int1asTrdCmplncLglCtrlStsCritlty
_DeliveryDocument _DeliveryDocument
_ItemCategory _ItemCategory
_MaterialGroup _MaterialGroup
_Plant _Plant
_StorageLocation _StorageLocation
_DeliveryQuantityUnit _DeliveryQuantityUnit
_ItemWeightUnit _ItemWeightUnit
_ItemVolumeUnit _ItemVolumeUnit
_LoadingGroup _LoadingGroup
_TransportationGroup _TransportationGroup
_GoodsMovementType _GoodsMovementType
_InventorySpecialStockType _InventorySpecialStockType
_ItemBillingBlockReason _ItemBillingBlockReason
_PickingStatus _PickingStatus
_DeliveryRelatedBillingStatus _DeliveryRelatedBillingStatus
_PackingStatus _PackingStatus
_PickingConfirmationStatus _PickingConfirmationStatus
_WarehouseActivityStatus _WarehouseActivityStatus
_GoodsMovementStatus _GoodsMovementStatus
_TrdCmplncEmbargoSts _TrdCmplncEmbargoSts
_TrdCmplncSnctndListChkSts _TrdCmplncSnctndListChkSts
_TrdCmplncLegalControlSts _TrdCmplncLegalControlSts
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED 
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #S
@ObjectModel.semanticKey: ['DeliveryDocument', 'DeliveryDocumentItem']
@ObjectModel.representativeKey: 'DeliveryDocumentItem'

@EndUserText.label: 'Delivery Doc Item Trade Compliance Issue'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@Search.searchable: false
@AccessControl.authorizationCheck: #CHECK
@Metadata.allowExtensions: true
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'CDELIVDOCITMDE07'

define view C_DelivDocItemTrdCmplncIssue 

as select from I_DeliveryDocumentItem as Item

inner join I_SalesOrdInDelivTrdCmplncIss as Issue
  on  Item.DeliveryDocument     = Issue.DeliveryDocument  
  and Item.DeliveryDocumentItem = Issue.DeliveryDocumentItem

//Extensibility 

  association [0..1] to E_DeliveryDocumentItem as _Extension on  $projection.DeliveryDocument     = _Extension.DeliveryDocument
                                                             and $projection.DeliveryDocumentItem = _Extension.DeliveryDocumentItem   

{
 //Key

  @Consumption.valueHelpDefinition: [{ entity:  { name: 'I_DeliveryDocumentStdVH', element: 'DeliveryDocument' }}]
  @ObjectModel.foreignKey.association: '_DeliveryDocument'
  key Item.DeliveryDocument,
  key Item.DeliveryDocumentItem,
    
  //Category 

  Item.DeliveryDocumentItemCategory,
  Item.DeliveryDocumentItemText,
  
  //DueDays

  @DefaultAggregation: #NONE
  Issue.DueDays,
    
  //Product

  @Consumption.valueHelpDefinition: [{ entity:  { name: 'I_ProductStdVH', element: 'Product' }}]
  @ObjectModel.text.element: [ 'MaterialName' ]
  @Consumption.semanticObject: 'Material'
  cast(Item.Material as productnumber preserving type ) as Material,
  @UI.hidden: true
  Item._Material._Text[1:Language=$session.system_language].MaterialName,
  Item.MaterialByCustomer,
  cast(Item.MaterialGroup as productgroup preserving type ) as MaterialGroup, 
  @Consumption.semanticObject: 'Batch'
  Item.Batch,                                 
  Item.Plant, 
  @Consumption.valueHelpDefinition: [{ entity:  { name: 'I_WarehouseStdVH', element: 'Warehouse' }}]
  @ObjectModel.text.element: 'WarehouseName'
  Item.Warehouse,
  @UI.hidden: true
  Item._Warehouse._Text[1:Language=$session.system_language].WarehouseName,
  Item.StorageLocation,
     
  //Delivery

  @DefaultAggregation: #NONE
  Item.ActualDeliveryQuantity,
  Item.DeliveryQuantityUnit,
  @DefaultAggregation: #NONE
  Item.ItemGrossWeight,
  @DefaultAggregation: #NONE
  Item.ItemNetWeight,
  Item.ItemWeightUnit,
  @DefaultAggregation: #NONE    
  Item.ItemVolume,
  Item.ItemVolumeUnit,
  Item.LoadingGroup,
  Item.TransportationGroup,
  Item.GoodsMovementType,
  Item.InventorySpecialStockType,
  Item.StockType,
  @Consumption.valueHelpDefinition: [{ entity:  { name: 'I_WarehouseStagingAreaStdVH', element: 'WarehouseStagingArea' },
                                       additionalBinding: [{ localElement: 'Warehouse', element: 'Warehouse' }]}]
  @ObjectModel.text.element: 'WarehouseStagingAreaName'
  Item.WarehouseStagingArea,
  @UI.hidden: true
  Item._WarehouseStagingArea._Text[1:Language=$session.system_language].WarehouseStagingAreaName,
  Item.OverdelivTolrtdLmtRatioInPct,   
  Item.UnderdelivTolrtdLmtRatioInPct,
    
  //Billing

  Item.ItemBillingBlockReason,
  
  //Status

  Item.PickingStatus,
  Item.DeliveryRelatedBillingStatus,
  Item.PackingStatus,
  Item.PickingConfirmationStatus,
  Item.WarehouseActivityStatus,
  Item.GoodsMovementStatus,
  @ObjectModel.foreignKey.association: '_TrdCmplncEmbargoSts'
  cast( Item.TrdCmplncEmbargoSts as embargochksts preserving type ) as TrdCmplncEmbargoSts,
  @ObjectModel.foreignKey.association: '_TrdCmplncSnctndListChkSts'
  cast( Item.TrdCmplncSnctndListChkSts as watchlistscrngchksts preserving type ) as TrdCmplncSnctndListChkSts,
  @ObjectModel.foreignKey.association: '_TrdCmplncLegalControlSts'
  cast( Item.TrdCmplncLegalControlSts as trdcmplnclglctrlchksts preserving type ) as TrdCmplncLegalControlSts,
  
  // Delivery

  @UI.hidden: true
  _DeliveryDocument.DeliveryDocumentType, //for reading GTS customizing

  
   //Criticality 

  @UI.hidden: true      
  cast(
  case
  when Item.TrdCmplncEmbargoSts  = 'A'                                                                                        then 3 //Released                              

  when (Item.TrdCmplncEmbargoSts = 'B' or Item.TrdCmplncEmbargoSts = 'C' or Item.TrdCmplncEmbargoSts = 'D' ) and DueDays > 0  then 2 //Pending, Blocked  

  when (Item.TrdCmplncEmbargoSts = 'B' or Item.TrdCmplncEmbargoSts = 'C' or Item.TrdCmplncEmbargoSts = 'D')  and DueDays <= 0 then 1 //Pending, Blocked  

                                                                                                                              else 9 //Not relevant for Checks, no Icon                                       

  end as abap.int1
  )   as TrdCmplncEmbargoStsCritlty, 
    
  @UI.hidden: true      
  cast(
  case
  when Item.TrdCmplncSnctndListChkSts  = 'A'                                                                                                     then 3 // Released                              

  when (Item.TrdCmplncSnctndListChkSts = 'B' or Item.TrdCmplncSnctndListChkSts = 'C' or Item.TrdCmplncSnctndListChkSts = 'D'  ) and DueDays > 0  then 2 //Pending, Blocked  

  when (Item.TrdCmplncSnctndListChkSts = 'B' or Item.TrdCmplncSnctndListChkSts = 'C' or Item.TrdCmplncSnctndListChkSts = 'D'  ) and DueDays <= 0 then 1 //Pending, Blocked  

                                                                                                                                                 else 9 // Not relevant for Checks, no Icon                                     

  end as abap.int1
  )   as TrdCmplncSnctndListCritlty, 
 
  @UI.hidden: true      
  cast(
  case
  when Item.TrdCmplncLegalControlSts  = 'A'                                                                                                  then 3 // Released                              

  when (Item.TrdCmplncLegalControlSts = 'B' or Item.TrdCmplncLegalControlSts = 'C' or Item.TrdCmplncLegalControlSts = 'D' ) and DueDays > 0  then 2 //Pending, Blocked  

  when (Item.TrdCmplncLegalControlSts = 'B' or Item.TrdCmplncLegalControlSts = 'C' or Item.TrdCmplncLegalControlSts = 'D' ) and DueDays <= 0 then 1 //Pending, Blocked  

                                                                                                                                             else 9 // Not relevant for Checks, no Icon                                           

  end as abap.int1
  )   as TrdCmplncLglCtrlStsCritlty,   
  
         
  //Associations 

  @Consumption.filter.hidden: true
  _DeliveryDocument,
  @Consumption.filter.hidden: true
  _ItemCategory,
  @Consumption.filter.hidden: true 
  _MaterialGroup,
  @Consumption.filter.hidden: true 
  _Plant,
  @Consumption.filter.hidden: true 
  _StorageLocation,
  @Consumption.filter.hidden: true
  _DeliveryQuantityUnit,
  @Consumption.filter.hidden: true
  _ItemWeightUnit,
  @Consumption.filter.hidden: true
  _ItemVolumeUnit,
  @Consumption.filter.hidden: true
  _LoadingGroup,
  @Consumption.filter.hidden: true
  _TransportationGroup,
  @Consumption.filter.hidden: true
  _GoodsMovementType,
  @Consumption.filter.hidden: true
  _InventorySpecialStockType,
  @Consumption.filter.hidden: true
  _ItemBillingBlockReason,
  @Consumption.filter.hidden: true
  _PickingStatus,
  @Consumption.filter.hidden: true
  _DeliveryRelatedBillingStatus,
  @Consumption.filter.hidden: true
  _PackingStatus,
  @Consumption.filter.hidden: true
  _PickingConfirmationStatus,
  @Consumption.filter.hidden: true
  _WarehouseActivityStatus,
  @Consumption.filter.hidden: true
  _GoodsMovementStatus,
  @Consumption.filter.hidden: true
  _TrdCmplncEmbargoSts,
  @Consumption.filter.hidden: true
  _TrdCmplncSnctndListChkSts,
  @Consumption.filter.hidden: true 
  _TrdCmplncLegalControlSts  
   };   
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DELIVERYDOCUMENT",
"I_DELIVERYDOCUMENTITEM",
"I_MATERIAL",
"I_MATERIALTEXT",
"I_SALESORDINDELIVTRDCMPLNCISS",
"I_WAREHOUSE",
"I_WAREHOUSESTAGINGAREA",
"I_WAREHOUSESTAGINGAREATEXT",
"I_WAREHOUSETEXT"
],
"ASSOCIATED":
[
"E_DELIVERYDOCUMENTITEM",
"I_BILLINGBLOCKREASON",
"I_DELIVERYDOCUMENT",
"I_DELIVERYRELATEDBILLGSTATUS",
"I_GOODSMOVEMENTSTATUS",
"I_GOODSMOVEMENTTYPE",
"I_INVENTORYSPECIALSTOCKTYPE",
"I_LOADINGGROUP",
"I_MATERIALGROUP",
"I_PACKINGSTATUS",
"I_PICKINGCONFIRMATIONSTATUS",
"I_PICKINGSTATUS",
"I_PLANT",
"I_SALESDOCUMENTITEMCATEGORY",
"I_STORAGELOCATION",
"I_TRANSPORTATIONGROUP",
"I_TRDCMPLNCCHECKSTATUS",
"I_UNITOFMEASURE",
"I_WAREHOUSEACTIVITYSTATUS"
],
"BASE":
[
"I_DELIVERYDOCUMENTITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/