P_CACUSTTRIALBALITEM1
P_CACUSTTRIALBALITEM1 is a Composite CDS View in SAP S/4HANA. It reads from 18 data sources and exposes 101 fields with key fields CompanyCode, FiscalYear, CADocumentNumber, CARepetitionItemNumber, CABPItemNumber. It has 1 association to related views.
Data Sources (18)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | _CompCode | inner |
| I_CompanyCode | _CompCode | inner |
| I_FiscalYearVariant | _FiscalYearVariant | inner |
| I_FiscalYearVariant | _FiscalYearVariant | inner |
| I_CADocumentBPItem | bpitem | inner |
| I_CADocumentBPItem | bpitem | inner |
| I_FiscalCalendarDate | FiscalYear | inner |
| I_FiscalCalendarDate | FiscalYear | inner |
| I_GLAccountText | glaccounttext | inner |
| I_GLAccountText | glaccounttext | inner |
| I_GLAccountText | glaccounttext | inner |
| I_GLAccountText | glaccounttext | inner |
| I_CADocument | header | inner |
| I_CADocument | header | inner |
| P_CACUSTTRIALBALCARFWD | P_CACUSTTRIALBALCARFWD | union_all |
| P_CACUSTTRIALBALCARFWD | P_CACUSTTRIALBALCARFWD | union_all |
| I_CAReconciliationKey | reconkey | from |
| I_CAReconciliationKey | reconkey | union_all |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_FiscalYear | fis_gjahr |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_BusinessPartner | _BusinessPartner | $projection.BusinessPartner = _BusinessPartner.BusinessPartner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (101)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_CADocumentBPItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | I_FiscalCalendarDate | FiscalYear | G/L Fiscal Year |
| KEY | CADocumentNumber | I_CADocumentBPItem | CADocumentNumber | Document Number |
| KEY | CARepetitionItemNumber | I_CADocumentBPItem | CARepetitionItemNumber | Repetition Item |
| KEY | CABPItemNumber | I_CADocumentBPItem | CABPItemNumber | Item |
| KEY | CASubItemNumber | I_CADocumentBPItem | CASubItemNumber | Subitem |
| KEY | GLAccount | I_CADocumentBPItem | CAReconciliationAccount | General Ledger |
| KEY | AccountingDocument | |||
| KEY | AccountingDocumentItem | |||
| KEY | BusinessPartner | |||
| KEY | TransactionCurrency | |||
| KEY | CompanyCodeCurrency | |||
| FiscalPeriod | I_FiscalCalendarDate | FiscalPeriod | Tax period | |
| PostingDate | I_CADocumentBPItem | CAPostingDate | Clearing | |
| DocumentDate | I_CADocument | DocumentDate | Journal Entry Date | |
| BusinessPartnerName | _BusinessPartner | BusinessPartnerName | Extracted Customer Name | |
| ChartOfAccounts | I_CADocumentBPItem | ChartOfAccounts | Node Class | |
| CreatedByUser | I_CADocument | CreatedByUser | User Name | |
| CAReferenceDocument | I_CADocument | CAReferenceDocument | Reference | |
| FinancialAccountType | ||||
| PostingKey | ||||
| CAAmountInTransactionCurrency | I_CADocumentBPItem | CAAmountInTransactionCurrency | Amount | |
| CAAmountInLocalCurrency | I_CADocumentBPItem | CAAmountInLocalCurrency | Local Crcy Amt | |
| DocumentCategory | ||||
| BusinessPartnerCountry | ||||
| CompanyCodeasCompanyCode | ||||
| KEY | FiscalYear | I_FiscalCalendarDate | FiscalYear | G/L Fiscal Year |
| KEY | CADocumentNumber | I_CADocument | CADocumentNumber | Document Number |
| KEY | CARepetitionItemNumber | I_CADocumentBPItem | CARepetitionItemNumber | Repetition Item |
| KEY | CABPItemNumber | I_CADocumentBPItem | CABPItemNumber | Item |
| KEY | CASubItemNumber | I_CADocumentBPItem | CASubItemNumber | Subitem |
| KEY | GLAccount | I_CADocumentBPItem | CAReconciliationAccount | General Ledger |
| KEY | AccountingDocument | |||
| KEY | AccountingDocumentItem | |||
| KEY | BusinessPartner | |||
| KEY | TransactionCurrency | |||
| KEY | CompanyCodeCurrency | |||
| FiscalPeriod | I_FiscalCalendarDate | FiscalPeriod | Tax period | |
| PostingDate | I_CADocumentBPItem | CAClearingDate | Clearing | |
| DocumentDate | I_CADocument | DocumentDate | Journal Entry Date | |
| BusinessPartnerName | _BusinessPartner | BusinessPartnerName | Extracted Customer Name | |
| ChartOfAccounts | I_CADocumentBPItem | ChartOfAccounts | Node Class | |
| CreatedByUser | I_CADocument | CreatedByUser | User Name | |
| CAReferenceDocument | I_CADocument | CAReferenceDocument | Reference | |
| FinancialAccountType | ||||
| PostingKey | ||||
| CAAmountInTransactionCurrency | Amount | |||
| CAAmountInLocalCurrency | Local Crcy Amt | |||
| DocumentCategory | ||||
| BusinessPartnerCountry | ||||
| KEY | FiscalYear | G/L Fiscal Year | ||
| KEY | CADocumentNumber | Document Number | ||
| KEY | CARepetitionItemNumber | Repetition Item | ||
| KEY | CABPItemNumber | Item | ||
| KEY | CASubItemNumber | Subitem | ||
| KEY | GLAccount | _BP_bal | GLAccount | General Ledger |
| KEY | AccountingDocument | |||
| KEY | AccountingDocumentItem | |||
| KEY | BusinessPartner | |||
| KEY | TransactionCurrency | |||
| KEY | CompanyCodeCurrency | |||
| FiscalPeriod | Tax period | |||
| PostingDate | Clearing | |||
| DocumentDate | Journal Entry Date | |||
| BusinessPartnerName | _BusinessPartner | BusinessPartnerName | Extracted Customer Name | |
| ChartOfAccounts | Node Class | |||
| CreatedByUser | User Name | |||
| CAReferenceDocument | Reference | |||
| FinancialAccountType | ||||
| PostingKey | ||||
| DebitCreditCode | ||||
| CAAmountInTransactionCurrency | Amount | |||
| CAAmountInLocalCurrency | Local Crcy Amt | |||
| DocumentCategory | ||||
| BusinessPartnerCountry | ||||
| KEY | FiscalYear | G/L Fiscal Year | ||
| KEY | CADocumentNumber | Document Number | ||
| KEY | CARepetitionItemNumber | Repetition Item | ||
| KEY | CABPItemNumber | Item | ||
| KEY | CASubItemNumber | Subitem | ||
| KEY | GLAccount | _BP_bal | GLAccount | General Ledger |
| KEY | AccountingDocument | |||
| KEY | AccountingDocumentItem | |||
| KEY | BusinessPartner | |||
| KEY | TransactionCurrency | |||
| KEY | CompanyCodeCurrency | |||
| FiscalPeriod | Tax period | |||
| PostingDate | Clearing | |||
| DocumentDate | Journal Entry Date | |||
| BusinessPartnerName | _BusinessPartner | BusinessPartnerName | Extracted Customer Name | |
| ChartOfAccounts | Node Class | |||
| CreatedByUser | User Name | |||
| CAReferenceDocument | Reference | |||
| FinancialAccountType | ||||
| PostingKey | ||||
| DebitCreditCode | ||||
| CAAmountInTransactionCurrency | Amount | |||
| CAAmountInLocalCurrency | Local Crcy Amt | |||
| DocumentCategory | ||||
| BusinessPartnerCountry | ||||
| GLAccountLongName | I_GLAccountText | GLAccountLongName | Long Text |
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_CACUSTTRIALBALITEM1.
-- 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_FiscalYear : fis_gjahr
CREATE VIEW P_CACUSTTRIALBALITEM1 AS
SELECT
bpitem.CompanyCode AS CompanyCode,
FiscalYear.FiscalYear AS FiscalYear,
bpitem.CADocumentNumber AS CADocumentNumber,
bpitem.CARepetitionItemNumber AS CARepetitionItemNumber,
bpitem.CABPItemNumber AS CABPItemNumber,
bpitem.CASubItemNumber AS CASubItemNumber,
bpitem.CAReconciliationAccount AS GLAccount,
cast( '0' as farp_belnr_d ) AS AccountingDocument,
cast( '000' as fis_buzei ) AS AccountingDocumentItem,
cast ( bpitem.BusinessPartner as bu_partner preserving type ) AS BusinessPartner,
cast(bpitem.TransactionCurrency as fis_rwcur preserving type ) AS TransactionCurrency,
cast(bpitem.CompanyCodeCurrency as fis_hwaer preserving type ) AS CompanyCodeCurrency,
FiscalYear.FiscalPeriod AS FiscalPeriod,
bpitem.CAPostingDate AS PostingDate,
header.DocumentDate AS DocumentDate,
_BusinessPartner.BusinessPartnerName AS BusinessPartnerName,
bpitem.ChartOfAccounts AS ChartOfAccounts,
header.CreatedByUser AS CreatedByUser,
header.CAReferenceDocument AS CAReferenceDocument,
cast('D' as farp_koart) AS FinancialAccountType,
cast(concat( bpitem.CAMainTransaction , bpitem.CASubTransaction ) as fis_bschl ) AS PostingKey,
bpitem.CAAmountInTransactionCurrency AS CAAmountInTransactionCurrency,
bpitem.CAAmountInLocalCurrency AS CAAmountInLocalCurrency,
cast ( ' ' as fis_bstat ) AS DocumentCategory,
_BusinessPartner._CurrentDefaultAddress._Address.Country AS BusinessPartnerCountry,
glaccounttext.GLAccountLongName as GLAccountLongName AS CompanyCodeasCompanyCode,
cast ( 'S' as fis_shkzg preserving type ) AS DebitCreditCode,
glaccounttext.GLAccountLongName AS GLAccountLongName
FROM I_CAReconciliationKey AS reconkey
INNER JOIN I_CADocument AS header ON /* join condition not captured in parsed metadata */
INNER JOIN I_CADocumentBPItem AS bpitem ON /* join condition not captured in parsed metadata */
INNER JOIN I_CompanyCode AS _CompCode ON /* join condition not captured in parsed metadata */
INNER JOIN I_FiscalYearVariant AS _FiscalYearVariant ON /* join condition not captured in parsed metadata */
INNER JOIN I_FiscalCalendarDate AS FiscalYear ON /* join condition not captured in parsed metadata */
INNER JOIN I_GLAccountText AS glaccounttext ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON BusinessPartner = _BusinessPartner.BusinessPartner -- association [1..1]
-- UNION ALL with additional select branch(es): I_CAReconciliationKey, P_CACUSTTRIALBALCARFWD
;
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