R_TrdgDocReltdAssocdItmBasic
Associated Item for Trading Document
R_TrdgDocReltdAssocdItmBasic is a Basic CDS View that provides data about "Associated Item for Trading Document" in SAP S/4HANA. It reads from 1 data source (wbit) and exposes 53 fields with key field TrdgReltdDocumentUUID. It has 11 associations to related views. Part of development package VDM_LO_GT.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| wbit | wbit | from |
Associations (11)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | R_TrdgDocProcCompltnCat | _TrdgDocPrevStepCompltnCat | $projection.TrdgDocPrevStepCompltnCat = _TrdgDocPrevStepCompltnCat.TrdgDocProcCompltnCat |
| [0..1] | R_TrdgDocAssocdQtyAvailInd | _TrdgDocAssocdQtyAvailInd | $projection.TrdgDocAssocdQtyIsAvail = _TrdgDocAssocdQtyAvailInd.TrdgDocAssocdQtyIsAvail |
| [0..1] | R_TrdgDocReltdDocDeltnCat | _TrdgDocReltdDocDeltnCat | $projection.TrdgDocReltdDocDeltnCat = _TrdgDocReltdDocDeltnCat.TrdgDocReltdDocDeltnCat |
| [0..1] | R_TrdgDocReltdDocOpnQtyCat | _TrdgDocReltdDocOpnQtyCat | $projection.TrdgDocReltdDocOpnQtyCat = _TrdgDocReltdDocOpnQtyCat.TrdgDocReltdDocOpnQtyCat |
| [0..1] | R_TrdgDocItemIsComplete | _TrdgDocItemIsComplete | $projection.TrdgDocItemIsComplete = _TrdgDocItemIsComplete.TrdgDocItemIsComplete |
| [0..1] | R_TrdgDocReltdSideCat | _TrdgDocReltdSideCat | $projection.TrdgDocReltdSideCat = _TrdgDocReltdSideCat.TrdgDocReltdSideCat |
| [0..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_StorageLocation | _StorageLocation | $projection.StorageLocation = _StorageLocation.StorageLocation and $projection.Plant = _StorageLocation.Plant |
| [0..1] | I_Product | _Product | $projection.Product = _Product.Product |
| [0..1] | I_ProductGroup_2 | _ProductGroup | $projection.ProductGroup = _ProductGroup.ProductGroup |
| [0..1] | I_Batch | _Batch | $projection.Batch = _Batch.Batch and $projection.Plant = _Batch.Plant and $projection.Product = _Batch.Material |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Associated Item for Trading Document | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| ObjectModel.compositionRoot | false | view | |
| ObjectModel.representativeKey | TrdgReltdDocumentUUID | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| Analytics.dataExtraction.enabled | false | view | |
| Analytics.internalName | #LOCAL | view |
Fields (53)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | TrdgReltdDocumentUUID | ruuid | SM Doc Rel UUID | |
| TrdgReltdDocCategory | VAT Document Type | |||
| TrdgDocRelatedDocument | doc_nr | Document Number | ||
| TrdgDocReltdDocumentYear | doc_year | Mat. Doc. Year | ||
| TrdgDocReltdDocCoCode | doc_bukrs | General Doc CoCode | ||
| TrdgDocItmInGeneralDocument | item | Task ID | ||
| TrdgDocReltdDocumentSubItem | SubItemNumber | |||
| TradingProcessVariantType | tew_type | TEW Type | ||
| TradingProcessBusinessStep | bus_step | Step | ||
| TrdgDocReltdDocOpnQtyCat | open_quan_flag | Open Quantity? | ||
| TradingDocument | tkonn | Trading Contract | ||
| TradingDocumentItem | Item Number | |||
| TradingDocumentSubItem | Subitem | |||
| TrdgPortfolioInternalID | portfolio | Portfolio | ||
| TrdgDocAssocdUoM | unit_of_quan | Association UoM | ||
| TradingDocumentSide | base_side | Side | ||
| TrdgDocReltdSideCat | Side | |||
| Product | matnr | Vehicle Model | ||
| ProductGroup | matkl | Product Sold Group | ||
| TrdgDocReltdDocUoM | unit_doc | Current Doc UoM | ||
| TrdgDocRlvtItmProgressedQty | progressed_quan | Transferred Qty | ||
| TrdgDocReltdItmAssociatedQty | act_asso_quan | Assoc.Quantity | ||
| TrdgDocItmAssocdCmpltdQty | completed_quan | Closed Quantity | ||
| TrdgDocAssocdQtyIsAvail | pos_quan_flag | Item Quantity? | ||
| TrdgDocReltdPrecdgSubItem | Subitem | |||
| TrdgDocPrevStepCompltnCat | send_compl | Send Completion | ||
| CreationDate | erdat | Entered On | ||
| CreationTime | erzet | Time | ||
| TrdgDocBusinessScenario | scenario | VAT Scenario | ||
| TrdgDocExternalIdentifier | tkonn_ex | Ext. Identifier | ||
| TrdgDocItemIsComplete | complete | Totals status | ||
| TrdgDocReltdDocDeltnCat | del_flag | Deletion Ind. | ||
| TrdgDocRlvtPrecdgDocType | Document Type | |||
| TrdgDocReltdPrecdgDocument | pred_doc_nr | Pred. Gen. Doc. | ||
| TrdgDocReltdPrecdgDocYear | pred_doc_year | Pred. Gen. Doc. Year | ||
| TrdgDocReltdPrecdgDocCoCode | pred_doc_bukrs | Pred.Gen.Doc.CoCode | ||
| TrdgDocReltdPrecdgItem | Item Number | |||
| Plant | werks | Receiving Plant | ||
| StorageLocation | lgort | Sublocation | ||
| Batch | charg | Chargeable Proc. | ||
| TrdgDocReltdDocBaseQtyNmrtr | umz | Qty Conv. | ||
| TrdgDocQtnDnmntr | umn | Qty Conv. Denomin. | ||
| _TrdgDocPrevStepCompltnCat | _TrdgDocPrevStepCompltnCat | |||
| _TrdgDocAssocdQtyAvailInd | _TrdgDocAssocdQtyAvailInd | |||
| _TrdgDocReltdDocDeltnCat | _TrdgDocReltdDocDeltnCat | |||
| _TrdgDocReltdDocOpnQtyCat | _TrdgDocReltdDocOpnQtyCat | |||
| _TrdgDocItemIsComplete | _TrdgDocItemIsComplete | |||
| _TrdgDocReltdSideCat | _TrdgDocReltdSideCat | |||
| _Plant | _Plant | |||
| _StorageLocation | _StorageLocation | |||
| _Product | _Product | |||
| _ProductGroup | _ProductGroup | |||
| _Batch | _Batch |
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 R_TrdgDocReltdAssocdItmBasic.
-- 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.
CREATE VIEW R_TrdgDocReltdAssocdItmBasic AS
SELECT
ruuid AS TrdgReltdDocumentUUID,
cast(doc_type as wb2_reltd_doc_type preserving type ) AS TrdgReltdDocCategory,
doc_nr AS TrdgDocRelatedDocument,
doc_year AS TrdgDocReltdDocumentYear,
doc_bukrs AS TrdgDocReltdDocCoCode,
item AS TrdgDocItmInGeneralDocument,
cast(sub_item as wb2_reltd_doc_sub_item preserving type ) AS TrdgDocReltdDocumentSubItem,
tew_type AS TradingProcessVariantType,
bus_step AS TradingProcessBusinessStep,
open_quan_flag AS TrdgDocReltdDocOpnQtyCat,
tkonn AS TradingDocument,
cast(tposn as wb2_doc_tposn preserving type ) AS TradingDocumentItem,
cast(tposn_sub as wb2_doc_tposn_sub preserving type ) AS TradingDocumentSubItem,
portfolio AS TrdgPortfolioInternalID,
unit_of_quan AS TrdgDocAssocdUoM,
base_side AS TradingDocumentSide,
cast(side as wb2_doc_side preserving type ) AS TrdgDocReltdSideCat,
matnr AS Product,
matkl AS ProductGroup,
unit_doc AS TrdgDocReltdDocUoM,
progressed_quan AS TrdgDocRlvtItmProgressedQty,
act_asso_quan AS TrdgDocReltdItmAssociatedQty,
completed_quan AS TrdgDocItmAssocdCmpltdQty,
pos_quan_flag AS TrdgDocAssocdQtyIsAvail,
cast(pred_sub_item as wb2_reltd_precdg_sub_item preserving type ) AS TrdgDocReltdPrecdgSubItem,
send_compl AS TrdgDocPrevStepCompltnCat,
erdat AS CreationDate,
erzet AS CreationTime,
scenario AS TrdgDocBusinessScenario,
tkonn_ex AS TrdgDocExternalIdentifier,
complete AS TrdgDocItemIsComplete,
del_flag AS TrdgDocReltdDocDeltnCat,
cast(pred_doc_type as wb2_rlvt_precdg_doc_type preserving type) AS TrdgDocRlvtPrecdgDocType,
pred_doc_nr AS TrdgDocReltdPrecdgDocument,
pred_doc_year AS TrdgDocReltdPrecdgDocYear,
pred_doc_bukrs AS TrdgDocReltdPrecdgDocCoCode,
cast(pred_item as wb2_precdg_item preserving type ) AS TrdgDocReltdPrecdgItem,
werks AS Plant,
lgort AS StorageLocation,
charg AS Batch,
umz AS TrdgDocReltdDocBaseQtyNmrtr,
umn AS TrdgDocQtnDnmntr
FROM wbit
LEFT OUTER JOIN R_TrdgDocProcCompltnCat AS _TrdgDocPrevStepCompltnCat ON TrdgDocPrevStepCompltnCat = _TrdgDocPrevStepCompltnCat.TrdgDocProcCompltnCat -- association [0..1]
LEFT OUTER JOIN R_TrdgDocAssocdQtyAvailInd AS _TrdgDocAssocdQtyAvailInd ON TrdgDocAssocdQtyIsAvail = _TrdgDocAssocdQtyAvailInd.TrdgDocAssocdQtyIsAvail -- association [0..1]
LEFT OUTER JOIN R_TrdgDocReltdDocDeltnCat AS _TrdgDocReltdDocDeltnCat ON TrdgDocReltdDocDeltnCat = _TrdgDocReltdDocDeltnCat.TrdgDocReltdDocDeltnCat -- association [0..1]
LEFT OUTER JOIN R_TrdgDocReltdDocOpnQtyCat AS _TrdgDocReltdDocOpnQtyCat ON TrdgDocReltdDocOpnQtyCat = _TrdgDocReltdDocOpnQtyCat.TrdgDocReltdDocOpnQtyCat -- association [0..1]
LEFT OUTER JOIN R_TrdgDocItemIsComplete AS _TrdgDocItemIsComplete ON TrdgDocItemIsComplete = _TrdgDocItemIsComplete.TrdgDocItemIsComplete -- association [0..1]
LEFT OUTER JOIN R_TrdgDocReltdSideCat AS _TrdgDocReltdSideCat ON TrdgDocReltdSideCat = _TrdgDocReltdSideCat.TrdgDocReltdSideCat -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _StorageLocation ON StorageLocation = _StorageLocation.StorageLocation AND Plant = _StorageLocation.Plant -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON Product = _Product.Product -- association [0..1]
LEFT OUTER JOIN I_ProductGroup_2 AS _ProductGroup ON ProductGroup = _ProductGroup.ProductGroup -- association [0..1]
LEFT OUTER JOIN I_Batch AS _Batch ON Batch = _Batch.Batch AND Plant = _Batch.Plant AND Product = _Batch.Material -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA