P_ACMTrdgContrToInvcLink
Contract Invoice Link
P_ACMTrdgContrToInvcLink is a Basic CDS View that provides data about "Contract Invoice Link" in SAP S/4HANA. It reads from 5 data sources (/accgo/t_stlctnr, /accgo/t_grp_hdr, /accgo/t_stlinv, /accgo/t_stlitem, /accgo/t_stlhead) and exposes 21 fields with key fields SettlementUnitUUID, TradingContractNumber, TradingContractItem.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| /accgo/t_stlctnr | _StlDocContainer | inner |
| /accgo/t_grp_hdr | _StlGroupHeader | inner |
| /accgo/t_stlinv | _StlInv | inner |
| /accgo/t_stlitem | _StlUnitItem | inner |
| /accgo/t_stlhead | StlUnitHead | from |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCONTRINVLINKDET | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| EndUserText.label | Contract Invoice Link | view |
Fields (21)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SettlementUnitUUID | /accgo/t_stlhead | stl_header_guid | STL Hdr GUID |
| KEY | TradingContractNumber | /accgo/t_stlhead | tkonn | Trading Contract |
| KEY | TradingContractItem | /accgo/t_stlhead | tposn | Item Number |
| ContractApplicationUUID | /accgo/t_stlhead | appl_guid | GUID (Hex) Specified by the Application | |
| ContractApplicationVersion | /accgo/t_stlhead | appl_version | Application Version | |
| ACMSettlementCreationDateTime | ||||
| SettlmtCat | /accgo/t_stlhead | settl_cat | Document Category | |
| SettlementStatusObject | ||||
| ContractApplicationDocument | /accgo/t_stlhead | appldoc | Appl. Document No. | |
| ApplicationDocumentItem | /accgo/t_stlhead | appldoc_item | Item No. | |
| SettlmtDoc | /accgo/t_stlhead | settl_doc | Settlement Unit | |
| SettlementScenario | /accgo/t_stlhead | settl_scenario | Settl Scenario | |
| CndnContrSettlmtType | /accgo/t_stlhead | settl_type | Settlement Type | |
| SettlmtDocYear | /accgo/t_stlhead | settl_yr | Setl Unit Year | |
| Side | /accgo/t_stlhead | side | Side | |
| SettlementDocGroupUUID | /accgo/t_grp_hdr | guid | UUID 22 char. | |
| SettlementGroupId | /accgo/t_grp_hdr | group_id | UUID | |
| SettlmtQuantity | /accgo/t_stlitem | unit_quantity | Quantity in Base UoM | |
| SettlmtQuantityUnit | /accgo/t_stlitem | unit_uom | Per Unit UoM | |
| SettlementDocInvoiceNumber | /accgo/t_stlinv | invoice_doc | Inv. Doc. No. | |
| SettlementDocInvoiceYear | /accgo/t_stlinv | invoice_doc_yr | Fiscal Year |
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 P_ACMTrdgContrToInvcLink.
-- 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: PCONTRINVLINKDET
CREATE VIEW P_ACMTrdgContrToInvcLink AS
SELECT
StlUnitHead.stl_header_guid AS SettlementUnitUUID,
StlUnitHead.tkonn AS TradingContractNumber,
StlUnitHead.tposn AS TradingContractItem,
StlUnitHead.appl_guid AS ContractApplicationUUID,
StlUnitHead.appl_version AS ContractApplicationVersion,
cast( StlUnitHead.created_on as timestamp preserving type ) AS ACMSettlementCreationDateTime,
StlUnitHead.settl_cat AS SettlmtCat,
concat('XS', concat(StlUnitHead.settl_doc, StlUnitHead.settl_yr) ) AS SettlementStatusObject,
StlUnitHead.appldoc AS ContractApplicationDocument,
StlUnitHead.appldoc_item AS ApplicationDocumentItem,
StlUnitHead.settl_doc AS SettlmtDoc,
StlUnitHead.settl_scenario AS SettlementScenario,
StlUnitHead.settl_type AS CndnContrSettlmtType,
StlUnitHead.settl_yr AS SettlmtDocYear,
StlUnitHead.side AS Side,
_StlGroupHeader.guid AS SettlementDocGroupUUID,
_StlGroupHeader.group_id AS SettlementGroupId,
_StlUnitItem.unit_quantity AS SettlmtQuantity,
_StlUnitItem.unit_uom AS SettlmtQuantityUnit,
_StlInv.invoice_doc AS SettlementDocInvoiceNumber,
_StlInv.invoice_doc_yr AS SettlementDocInvoiceYear
FROM /accgo/t_stlhead AS StlUnitHead
INNER JOIN /accgo/t_stlitem AS _StlUnitItem ON /* join condition not captured in parsed metadata */
INNER JOIN /accgo/t_stlctnr AS _StlDocContainer ON /* join condition not captured in parsed metadata */
INNER JOIN /accgo/t_grp_hdr AS _StlGroupHeader ON /* join condition not captured in parsed metadata */
INNER JOIN /accgo/t_stlinv AS _StlInv ON /* join condition not captured in parsed metadata */
;
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