P_CrExpFiMain

DDL: P_CREXPFIMAIN SQL: PCREXPFIMAIN Type: view COMPOSITE

P_CrExpFiMain is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, I_Customer) and exposes 15 fields. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_OperationalAcctgDocItem _AccountingDocument from
I_Customer I_Customer inner

Parameters (2)

NameTypeDefault
P_ExchangeRateDate vdm_v_exchange_rate_date
P_ExchangeRateType kurst

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_CreditControlArea _CreditControlArea $projection.CreditControlArea = _CreditControlArea.CreditControlArea
[0..1] I_CreditManagementSegment _CreditSegment _CreditSegment.CrdtSgmtIsMainCreditSegment = 'X'

Annotations (6)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PCREXPFIMAIN view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.compiler.compareFilter true view

Fields (15)

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 FinancialAccountType Fin. Account Type
TransactionCurrency TransactionCurrency Transaction Currency
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
MainCreditSegmentCurrency _CreditSegment CreditSegmentCurrency Currency
trueasCreditExposure
trueasHedgedExposure

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_CrExpFiMain.
-- 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: PCREXPFIMAIN
-- Parameters: P_ExchangeRateDate : vdm_v_exchange_rate_date, P_ExchangeRateType : kurst

CREATE VIEW P_CrExpFiMain 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,
  FinancialAccountType,
  TransactionCurrency,
  AmountInTransactionCurrency,
  _CreditSegment.CreditSegmentCurrency AS MainCreditSegmentCurrency,
  currency_conversion( amount => AmountInTransactionCurrency, source_currency => TransactionCurrency, target_currency => _CreditSegment.CreditSegmentCurrency, exchange_rate_date => $parameters.P_ExchangeRateDate, exchange_rate_type => $parameters.P_ExchangeRateType, error_handling => 'FAIL_ON_ERROR', decimal_shift => #CDSBoolean.true, round => #CDSBoolean.true ) as CreditExposure AS trueasCreditExposure,
  currency_conversion( amount => HedgedAmount, source_currency => _AccountingDocument.CreditControlAreaCurrency, target_currency => _CreditSegment.CreditSegmentCurrency, exchange_rate_date => $parameters.P_ExchangeRateDate, exchange_rate_type => $parameters.P_ExchangeRateType, error_handling => 'FAIL_ON_ERROR', decimal_shift => #CDSBoolean.true, round => #CDSBoolean.true ) as HedgedExposure AS trueasHedgedExposure
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_CreditManagementSegment AS _CreditSegment ON _CreditSegment.CrdtSgmtIsMainCreditSegment = 'X'  -- association [0..1]
;