P_CrExp
P_CrExp is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, I_Customer) and exposes 18 fields. It has 3 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_OperationalAcctgDocItem | _AccountingDocument | from |
| I_Customer | I_Customer | inner |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CreditControlArea | _CreditControlArea | $projection.CreditControlArea = _CreditControlArea.CreditControlArea |
| [1..1] | I_CreditExposureCategory | _CreditExposureCategory | $projection.CreditExposureCategory = _CreditExposureCategory.CreditExposureCategory |
| [0..1] | I_CrdtMgmtGLAccountExclusion | _ExcludedGL | _AccountingDocument.GLAccount = _ExcludedGL.GLAccount and _AccountingDocument.CompanyCode = _ExcludedGL.CompanyCode |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PCREXP | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.compiler.compareFilter | true | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| BusinessPartner | ||||
| CreditSegment | ||||
| xBseg | ||||
| CreditControlArea | I_OperationalAcctgDocItem | CreditControlArea | Credit Control Area | |
| Customer | I_OperationalAcctgDocItem | Customer | Sold-to Party | |
| AccountingDocument | I_OperationalAcctgDocItem | AccountingDocument | Journal Entry | |
| FiscalYear | I_OperationalAcctgDocItem | FiscalYear | G/L Fiscal Year | |
| SpecialGLCode | I_OperationalAcctgDocItem | SpecialGLCode | Special G/L Ind | |
| CreditLimitIsChecked | ||||
| FinancialAccountType | I_OperationalAcctgDocItem | FinancialAccountType | Fin. Account Type | |
| TransactionCurrency | I_OperationalAcctgDocItem | TransactionCurrency | Transaction Currency | |
| AmountInTransactionCurrency | I_OperationalAcctgDocItem | AmountInTransactionCurrency | Pt Crcy Amt | |
| CreditControlAreaCurrency | I_OperationalAcctgDocItem | CreditControlAreaCurrency | Credit Control Area Currency | |
| HedgedAmount | I_OperationalAcctgDocItem | HedgedAmount | ||
| CreditSegmentCurrency | ||||
| CrdtSgmtIsAddedToMainSgmt | ||||
| _CreditExposureCategory | _CreditExposureCategory | |||
| _CreditControlArea | _CreditControlArea |
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_CrExp.
-- 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: PCREXP
CREATE VIEW P_CrExp AS
SELECT
I_Customer._CustomerToBusinessPartner._BusinessPartner.BusinessPartner AS BusinessPartner,
_CreditControlArea._CreditControlArea2Segment.CreditSegment AS CreditSegment,
'Y' AS xBseg,
_AccountingDocument.CreditControlArea AS CreditControlArea,
_AccountingDocument.Customer AS Customer,
_AccountingDocument.AccountingDocument AS AccountingDocument,
_AccountingDocument.FiscalYear AS FiscalYear,
_AccountingDocument.SpecialGLCode AS SpecialGLCode,
_AccountingDocument._SpecialGLCode.CreditLimitIsChecked AS CreditLimitIsChecked,
_AccountingDocument.FinancialAccountType AS FinancialAccountType,
_AccountingDocument.TransactionCurrency AS TransactionCurrency,
_AccountingDocument.AmountInTransactionCurrency AS AmountInTransactionCurrency,
_AccountingDocument.CreditControlAreaCurrency AS CreditControlAreaCurrency,
_AccountingDocument.HedgedAmount AS HedgedAmount,
_CreditControlArea._CreditControlArea2Segment._CreditSegment.CreditSegmentCurrency AS CreditSegmentCurrency,
_CreditControlArea._CreditControlArea2Segment._CreditSegment.CrdtSgmtIsAddedToMainSgmt AS CrdtSgmtIsAddedToMainSgmt
FROM I_OperationalAcctgDocItem AS _AccountingDocument
INNER JOIN I_Customer ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CreditControlArea AS _CreditControlArea ON CreditControlArea = _CreditControlArea.CreditControlArea -- association [0..1]
LEFT OUTER JOIN I_CreditExposureCategory AS _CreditExposureCategory ON CreditExposureCategory = _CreditExposureCategory.CreditExposureCategory -- association [1..1]
LEFT OUTER JOIN I_CrdtMgmtGLAccountExclusion AS _ExcludedGL ON _AccountingDocument.GLAccount = _ExcludedGL.GLAccount AND _AccountingDocument.CompanyCode = _ExcludedGL.CompanyCode -- 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