P_RO_SAFTCActgJournalItemExc
P_RO_SAFTCActgJournalItemExc is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_RO_SAFTAccountMapping, P_RO_SAFTCActgJournalItemBase) and exposes 56 fields with key fields CompanyCode, CADocumentNumber, CAItemType, ItemNumber, SubItemNumber. It has 2 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_RO_SAFTAccountMapping | Account | inner |
| P_RO_SAFTCActgJournalItemBase | P_RO_SAFTCActgJournalItemBase | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_AlternativeGLAccountIsUsed | saft_ro_alt_gl_account_flag |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_RO_SAFTCActgSIHeader1 | _Header1 | _Header1.CompanyCode = Item.CompanyCode and _Header1.CASrcDocumentCat = Item.CASrcDocumentCat and _Header1.CASrcDocumentType = Item.CASrcDocumentType and _Header1.CASrcDocumentNumber = Item.CASrcDocumentNumber |
| [0..1] | P_RO_SAFTCActgSIHeader2 | _Header2 | _Header2.CompanyCode = Item.CompanyCode and _Header2.CASrcDocumentCat = Item.CASrcDocumentCat and _Header2.CASrcDocumentType = Item.CASrcDocumentType and _Header2.CASrcDocumentNumber = Item.CASrcDocumentNumber and _Header2.BusinessPartner = Item.CASrcBusinessPartner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view |
Fields (56)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | Item | CompanyCode | Receiver Company Code |
| KEY | CADocumentNumber | Item | CADocumentNumber | Document Number |
| KEY | CAItemType | Item | CAItemType | |
| KEY | ItemNumber | Item | ItemNumber | Item ID |
| KEY | SubItemNumber | Item | SubItemNumber | |
| KEY | ClearedDocumentNumber | Item | ClearedDocumentNumber | |
| CASrcDocumentCat | Item | CASrcDocumentCat | ||
| CASrcDocumentType | Item | CASrcDocumentType | ||
| CASrcDocumentNumber | Item | CASrcDocumentNumber | ||
| CASrcOfficialDocumentNumber | Item | CASrcOfficialDocumentNumber | ||
| CAInvcgProcess | Item | CAInvcgProcess | Invoicing Proc. | |
| CAInvcgType | Item | CAInvcgType | Invoicing Type | |
| CAInvcgCategory | Item | CAInvcgCategory | Invoicing Cat. | |
| CAInvcgCorrectionCategory | Item | CAInvcgCorrectionCategory | Invcg Correction Category | |
| ActiveGLAccountendasCASrcActiveGLAccount | ||||
| BusinessPartner | Item | BusinessPartner | Issuing Authority | |
| TaxCode | Item | TaxCode | Tax Code | |
| TaxItem | Item | TaxItem | Tax Item | |
| ChartOfAccounts | Item | ChartOfAccounts | Node Class | |
| ActiveChartOfAccounts | Item | ActiveChartOfAccounts | ||
| GLAccount | Item | GLAccount | General Ledger | |
| ActiveGLAccount | Item | ActiveGLAccount | ||
| CountryChartOfAccounts | Item | CountryChartOfAccounts | Chart of Accts | |
| AlternativeGLAccount | Item | AlternativeGLAccount | Group Account | |
| GLAccountType | Item | GLAccountType | G/L Account Type | |
| PostingDate | Item | PostingDate | Posting Date for GR | |
| DocumentDate | Item | DocumentDate | Journal Entry Date | |
| TaxReportingDate | Item | TaxReportingDate | Tax Reporting Date | |
| CADocumentType | Item | CADocumentType | Document Type | |
| CADocumentOriginCode | Item | CADocumentOriginCode | Document Origin | |
| ValueDate | Item | ValueDate | Value Date | |
| CreationDate | Item | CreationDate | Time Stamp | |
| CreatedByUser | Item | CreatedByUser | User Name | |
| CAReconciliationKey | Item | CAReconciliationKey | Reconcil. Key | |
| CARecnclnKeyIsTransferredToGL | Item | CARecnclnKeyIsTransferredToGL | ||
| CAReferenceDocument | Item | CAReferenceDocument | Reference | |
| RO_SAFTSourceDocument | Item | RO_SAFTSourceDocument | ||
| TransactionCurrency | Item | TransactionCurrency | Transaction Currency | |
| CompanyCodeCurrency | Item | CompanyCodeCurrency | Local Currency | |
| AmountInTransactionCurrency | Item | AmountInTransactionCurrency | Pt Crcy Amt | |
| DebitAmountInTransCrcy | Item | DebitAmountInTransCrcy | Debit Amt in DC | |
| CreditAmountInTransCrcy | Item | CreditAmountInTransCrcy | Credit Amt in DC | |
| AmountInCompanyCodeCurrency | Item | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| DebitAmountInCoCodeCrcy | Item | DebitAmountInCoCodeCrcy | Debit Amount in Company Code Currency | |
| CreditAmountInCoCodeCrcy | Item | CreditAmountInCoCodeCrcy | Credit Amount in Company Code Currency | |
| DocumentItemText | Item | DocumentItemText | Text | |
| CATransactionKeyAccountDetn | Item | CATransactionKeyAccountDetn | Autom. Posting | |
| ProfitCenter | Item | ProfitCenter | Profit Center | |
| Segment | Item | Segment | Segment number | |
| BaseUnit | Item | BaseUnit | Unit of Measure | |
| QuantityInBaseUnit | Item | QuantityInBaseUnit | Quantity | |
| CADocumentTypeForGLTransfer | Item | CADocumentTypeForGLTransfer | Tfr Doc. Type | |
| RO_SAFTSourceDocumentType | Item | RO_SAFTSourceDocumentType | ||
| RO_SAFTJournalTransDescription | Item | RO_SAFTJournalTransDescription | ||
| RO_SAFTStandardAccount | I_RO_SAFTAccountMapping | RO_SAFTStandardAccount | St. Account ID | |
| RO_SAFTIsDefaultZeroQuantity | I_RO_SAFTAccountMapping | RO_SAFTIsDefaultZeroQuantity | Def Zero Quantity |
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_RO_SAFTCActgJournalItemExc.
-- 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.
-- Parameters: P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag
CREATE VIEW P_RO_SAFTCActgJournalItemExc AS
SELECT
Item.CompanyCode AS CompanyCode,
Item.CADocumentNumber AS CADocumentNumber,
Item.CAItemType AS CAItemType,
Item.ItemNumber AS ItemNumber,
Item.SubItemNumber AS SubItemNumber,
Item.ClearedDocumentNumber AS ClearedDocumentNumber,
Item.CASrcDocumentCat AS CASrcDocumentCat,
Item.CASrcDocumentType AS CASrcDocumentType,
Item.CASrcDocumentNumber AS CASrcDocumentNumber,
Item.CASrcOfficialDocumentNumber AS CASrcOfficialDocumentNumber,
Item.CAInvcgProcess AS CAInvcgProcess,
Item.CAInvcgType AS CAInvcgType,
Item.CAInvcgCategory AS CAInvcgCategory,
Item.CAInvcgCorrectionCategory AS CAInvcgCorrectionCategory,
case Item.CASrcBusinessPartner when '' then _Header1(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed).ActiveGLAccount else _Header2(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed).ActiveGLAccount end as CASrcActiveGLAccount AS ActiveGLAccountendasCASrcActiveGLAccount,
Item.BusinessPartner AS BusinessPartner,
Item.TaxCode AS TaxCode,
Item.TaxItem AS TaxItem,
Item.ChartOfAccounts AS ChartOfAccounts,
Item.ActiveChartOfAccounts AS ActiveChartOfAccounts,
Item.GLAccount AS GLAccount,
Item.ActiveGLAccount AS ActiveGLAccount,
Item.CountryChartOfAccounts AS CountryChartOfAccounts,
Item.AlternativeGLAccount AS AlternativeGLAccount,
Item.GLAccountType AS GLAccountType,
Item.PostingDate AS PostingDate,
Item.DocumentDate AS DocumentDate,
Item.TaxReportingDate AS TaxReportingDate,
Item.CADocumentType AS CADocumentType,
Item.CADocumentOriginCode AS CADocumentOriginCode,
Item.ValueDate AS ValueDate,
Item.CreationDate AS CreationDate,
Item.CreatedByUser AS CreatedByUser,
Item.CAReconciliationKey AS CAReconciliationKey,
Item.CARecnclnKeyIsTransferredToGL AS CARecnclnKeyIsTransferredToGL,
Item.CAReferenceDocument AS CAReferenceDocument,
Item.RO_SAFTSourceDocument AS RO_SAFTSourceDocument,
Item.TransactionCurrency AS TransactionCurrency,
Item.CompanyCodeCurrency AS CompanyCodeCurrency,
Item.AmountInTransactionCurrency AS AmountInTransactionCurrency,
Item.DebitAmountInTransCrcy AS DebitAmountInTransCrcy,
Item.CreditAmountInTransCrcy AS CreditAmountInTransCrcy,
Item.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
Item.DebitAmountInCoCodeCrcy AS DebitAmountInCoCodeCrcy,
Item.CreditAmountInCoCodeCrcy AS CreditAmountInCoCodeCrcy,
Item.DocumentItemText AS DocumentItemText,
Item.CATransactionKeyAccountDetn AS CATransactionKeyAccountDetn,
Item.ProfitCenter AS ProfitCenter,
Item.Segment AS Segment,
Item.BaseUnit AS BaseUnit,
Item.QuantityInBaseUnit AS QuantityInBaseUnit,
Item.CADocumentTypeForGLTransfer AS CADocumentTypeForGLTransfer,
Item.RO_SAFTSourceDocumentType AS RO_SAFTSourceDocumentType,
Item.RO_SAFTJournalTransDescription AS RO_SAFTJournalTransDescription,
Account.RO_SAFTStandardAccount AS RO_SAFTStandardAccount,
Account.RO_SAFTIsDefaultZeroQuantity AS RO_SAFTIsDefaultZeroQuantity
FROM P_RO_SAFTCActgJournalItemBase
INNER JOIN I_RO_SAFTAccountMapping AS Account ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_RO_SAFTCActgSIHeader1 AS _Header1 ON _Header1.CompanyCode = Item.CompanyCode AND _Header1.CASrcDocumentCat = Item.CASrcDocumentCat AND _Header1.CASrcDocumentType = Item.CASrcDocumentType AND _Header1.CASrcDocumentNumber = Item.CASrcDocumentNumber -- association [0..1]
LEFT OUTER JOIN P_RO_SAFTCActgSIHeader2 AS _Header2 ON _Header2.CompanyCode = Item.CompanyCode AND _Header2.CASrcDocumentCat = Item.CASrcDocumentCat AND _Header2.CASrcDocumentType = Item.CASrcDocumentType AND _Header2.CASrcDocumentNumber = Item.CASrcDocumentNumber AND _Header2.BusinessPartner = Item.CASrcBusinessPartner -- 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