C_SlsDocItemTradeCmplncIssue

DDL: C_SLSDOCITEMTRADECMPLNCISSUE SQL: CSLSDOCITEMSO07 Type: view CONSUMPTION

Sales Doc Item Trade Compliance Issue

C_SlsDocItemTradeCmplncIssue is a Consumption CDS View that provides data about "Sales Doc Item Trade Compliance Issue" in SAP S/4HANA. It reads from 2 data sources (I_SalesOrderTradeCmplncIssue, I_SalesDocumentItem) and exposes 57 fields with key fields SalesDocument, SalesDocumentItem. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
I_SalesOrderTradeCmplncIssue Issue inner
I_SalesDocumentItem Item from

Associations (1)

CardinalityTargetAliasCondition
[0..1] E_SalesDocumentItemBasic _Extension $projection.SalesDocument = _Extension.SalesDocument and $projection.SalesDocumentItem = _Extension.SalesDocumentItem

Annotations (14)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.representativeKey SalesDocumentItem view
EndUserText.label Sales 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
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName CSLSDOCITEMSO07 view

Fields (57)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument I_SalesDocumentItem SalesDocument SD Document
KEY SalesDocumentItem
DueDays I_SalesOrderTradeCmplncIssue DueDays Processing Time
SalesDocumentItemCategory I_SalesDocumentItem SalesDocumentItemCategory Item Category
Material
MaterialName
MaterialGroup
Batch I_SalesDocumentItem Batch Lot No.
Plant I_SalesDocumentItem Plant Valuation Area
MaterialByCustomer I_SalesDocumentItem MaterialByCustomer Customer Mat.
SalesDocumentItemText I_SalesDocumentItem SalesDocumentItemText Item Descr.
RequestedQuantity I_SalesDocumentItem RequestedQuantity Requested Quantity
RequestedQuantityUnit I_SalesDocumentItem RequestedQuantityUnit Requested Quantity Unit
ConfdDelivQtyInOrderQtyUnit I_SalesDocumentItem ConfdDelivQtyInOrderQtyUnit Confd Quantity
OrderQuantityUnit I_SalesDocumentItem OrderQuantityUnit Sales Unit
NetAmount I_SalesDocumentItem NetAmount Stated Amount
TransactionCurrency I_SalesDocumentItem TransactionCurrency Transaction Currency
ShippingPoint I_SalesDocumentItem ShippingPoint Shipping Point
ShippingPointName
StorageLocation I_SalesDocumentItem StorageLocation StorageLocation
RequestedDeliveryDate
ShippingType I_SalesDocumentItem ShippingType Shipping Type
ShippingPointCountry
ShippingPointCountryName
ShipFromPartyCountry
ShipFromPartyCountryName
ShipToParty I_SalesDocumentItem ShipToParty Ship-To Party (obsolete)
ShipToPartyName
ShipToPartyCountry
ShipToPartyCountryName
DeliveryStatus I_SalesDocumentItem DeliveryStatus Delivery Status
SDProcessStatus I_SalesDocumentItem SDProcessStatus Overall Status
OrderRelatedBillingStatus I_SalesDocumentItem OrderRelatedBillingStatus
SDDocumentRejectionStatus I_SalesDocumentItem SDDocumentRejectionStatus Rejection Sts
TrdCmplncEmbargoSts
TrdCmplncSnctndListChkSts
OvrlTrdCmplncLegalCtrlChkSts
SalesDocumentType SalesDocumentType Sales Doc. Type
int1asTrdCmplncEmbargoStsCritlty
int1asTrdCmplncSnctndListCritlty
int1asOvrlTrdCmplncLglCtrlStsCritlty
_SalesDocument I_SalesDocumentItem _SalesDocument
_ItemCategory I_SalesDocumentItem _ItemCategory
_Plant I_SalesDocumentItem _Plant
_MaterialGroup I_SalesDocumentItem _MaterialGroup
_StorageLocation I_SalesDocumentItem _StorageLocation
_ShippingType I_SalesDocumentItem _ShippingType
_DeliveryStatus I_SalesDocumentItem _DeliveryStatus
_SDProcessStatus I_SalesDocumentItem _SDProcessStatus
_OrderRelatedBillingStatus I_SalesDocumentItem _OrderRelatedBillingStatus
_SDDocumentRejectionStatus _SDDocumentRejectionStatus
_TrdCmplncEmbargoSts I_SalesDocumentItem _TrdCmplncEmbargoSts
_TrdCmplncSnctndListChkSts I_SalesDocumentItem _TrdCmplncSnctndListChkSts
_OvrlTrdCmplncLegalCtrlChkSts I_SalesDocumentItem _OvrlTrdCmplncLegalCtrlChkSts
_TransactionCurrency I_SalesDocumentItem _TransactionCurrency
_RequestedQuantityUnit I_SalesDocumentItem _RequestedQuantityUnit
_OrderQuantityUnit I_SalesDocumentItem _OrderQuantityUnit

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_SlsDocItemTradeCmplncIssue.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CSLSDOCITEMSO07

CREATE VIEW C_SlsDocItemTradeCmplncIssue AS
SELECT
  Item.SalesDocument AS SalesDocument,
  cast(Item.SalesDocumentItem as sales_doc_item preserving type) AS SalesDocumentItem,
  Issue.DueDays AS DueDays,
  Item.SalesDocumentItemCategory AS SalesDocumentItemCategory,
  cast(Item.Material as productnumber preserving type ) AS Material,
  Item._MaterialText[1:Language=$session.system_language].MaterialName AS MaterialName,
  cast(Item.MaterialGroup as productgroup preserving type ) AS MaterialGroup,
  Item.Batch AS Batch,
  Item.Plant AS Plant,
  Item.MaterialByCustomer AS MaterialByCustomer,
  Item.SalesDocumentItemText AS SalesDocumentItemText,
  Item.RequestedQuantity AS RequestedQuantity,
  Item.RequestedQuantityUnit AS RequestedQuantityUnit,
  Item.ConfdDelivQtyInOrderQtyUnit AS ConfdDelivQtyInOrderQtyUnit,
  Item.OrderQuantityUnit AS OrderQuantityUnit,
  Item.NetAmount AS NetAmount,
  Item.TransactionCurrency AS TransactionCurrency,
  Item.ShippingPoint AS ShippingPoint,
  Item._ShippingPointText[1:Language=$session.system_language].ShippingPointName AS ShippingPointName,
  Item.StorageLocation AS StorageLocation,
  cast( Item._SlsDocItemEnhancedFields._RequestedDeliveryDate.RequestedDeliveryDate as reqd_deliv_date) AS RequestedDeliveryDate,
  Item.ShippingType AS ShippingType,
  cast(Item._ShippingPoint._ActiveDepartureCountry.Country as shippingpointcountry) AS ShippingPointCountry,
  cast(Item._ShippingPoint._ActiveDepartureCountry._Text[1:Language=$session.system_language].CountryName as shippingpointcountryname) AS ShippingPointCountryName,
  cast(Item._Plant._Address.Country as shipfrompartycountry) AS ShipFromPartyCountry,
  cast(Item._Plant._Address._Country._Text[1:Language=$session.system_language].CountryName as shipfrompartycountryname) AS ShipFromPartyCountryName,
  Item.ShipToParty AS ShipToParty,
  Item._ShipToParty.CustomerName AS ShipToPartyName,
  cast( '' as shiptopartycountry ) AS ShipToPartyCountry,
  cast( '' as shiptopartycountryname ) AS ShipToPartyCountryName,
  Item.DeliveryStatus AS DeliveryStatus,
  Item.SDProcessStatus AS SDProcessStatus,
  Item.OrderRelatedBillingStatus AS OrderRelatedBillingStatus,
  Item.SDDocumentRejectionStatus AS SDDocumentRejectionStatus,
  cast( Item.TrdCmplncEmbargoSts as embargochksts preserving type ) AS TrdCmplncEmbargoSts,
  cast( Item.TrdCmplncSnctndListChkSts as watchlistscrngchksts preserving type ) AS TrdCmplncSnctndListChkSts,
  cast( Item.OvrlTrdCmplncLegalCtrlChkSts as lglctrlchksts preserving type ) AS OvrlTrdCmplncLegalCtrlChkSts,
  SalesDocumentType,
  cast( case when Item.TrdCmplncEmbargoSts = 'A' then 3 when (Item.TrdCmplncEmbargoSts = 'B' or Item.TrdCmplncEmbargoSts = 'C' or Item.TrdCmplncEmbargoSts = 'D' ) and DueDays > 0 then 2 when (Item.TrdCmplncEmbargoSts = 'B' or Item.TrdCmplncEmbargoSts = 'C' or Item.TrdCmplncEmbargoSts = 'D' ) and DueDays <= 0 then 1 else 9 end as abap.int1 ) as TrdCmplncEmbargoStsCritlty AS int1asTrdCmplncEmbargoStsCritlty,
  cast( case when Item.TrdCmplncSnctndListChkSts = 'A' then 3 when (Item.TrdCmplncSnctndListChkSts = 'B' or Item.TrdCmplncSnctndListChkSts = 'C' or Item.TrdCmplncSnctndListChkSts = 'D') and DueDays > 0 then 2 when (Item.TrdCmplncSnctndListChkSts = 'B' or Item.TrdCmplncSnctndListChkSts = 'C' or Item.TrdCmplncSnctndListChkSts = 'D') and DueDays <= 0 then 1 else 9 end as abap.int1 ) as TrdCmplncSnctndListCritlty AS int1asTrdCmplncSnctndListCritlty,
  cast( case when Item.OvrlTrdCmplncLegalCtrlChkSts = 'A' then 3 when (Item.OvrlTrdCmplncLegalCtrlChkSts = 'B' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'C' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'D' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'E' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'F' ) and DueDays > 0 then 2 when (Item.OvrlTrdCmplncLegalCtrlChkSts = 'B' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'C' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'D' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'E' or Item.OvrlTrdCmplncLegalCtrlChkSts = 'F' ) and DueDays <= 0 then 1 else 9 end as abap.int1 ) as OvrlTrdCmplncLglCtrlStsCritlty AS int1asOvrlTrdCmplncLglCtrlStsCritlty,
  Item._SalesDocument AS _SalesDocument,
  Item._ItemCategory AS _ItemCategory,
  Item._Plant AS _Plant,
  Item._MaterialGroup AS _MaterialGroup,
  Item._StorageLocation AS _StorageLocation,
  Item._ShippingType AS _ShippingType,
  Item._DeliveryStatus AS _DeliveryStatus,
  Item._SDProcessStatus AS _SDProcessStatus,
  Item._OrderRelatedBillingStatus AS _OrderRelatedBillingStatus,
  Item._TrdCmplncEmbargoSts AS _TrdCmplncEmbargoSts,
  Item._TrdCmplncSnctndListChkSts AS _TrdCmplncSnctndListChkSts,
  Item._OvrlTrdCmplncLegalCtrlChkSts AS _OvrlTrdCmplncLegalCtrlChkSts,
  Item._TransactionCurrency AS _TransactionCurrency,
  Item._RequestedQuantityUnit AS _RequestedQuantityUnit,
  Item._OrderQuantityUnit AS _OrderQuantityUnit
FROM I_SalesDocumentItem AS Item
INNER JOIN I_SalesOrderTradeCmplncIssue AS Issue ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN E_SalesDocumentItemBasic AS _Extension ON SalesDocument = _Extension.SalesDocument AND SalesDocumentItem = _Extension.SalesDocumentItem  -- association [0..1]
;