P_CrExp

DDL: P_CREXP SQL: PCREXP Type: view COMPOSITE

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)

SourceAliasJoin Type
I_OperationalAcctgDocItem _AccountingDocument from
I_Customer I_Customer inner

Associations (3)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;