P_CrExpFi

DDL: P_CREXPFI SQL: PCREXPFI Type: view COMPOSITE

P_CrExpFi is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, I_Customer) and exposes 17 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
[1..1] I_CreditExposureCategory _CreditExposureCategory $projection.CreditExposureCategory = _CreditExposureCategory.CreditExposureCategory

Annotations (6)

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

Fields (17)

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
CreditSegmentCurrency
trueasCreditExposure
trueasHedgedExposure
_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_CrExpFi.
-- 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: PCREXPFI
-- Parameters: P_ExchangeRateDate : vdm_v_exchange_rate_date, P_ExchangeRateType : kurst

CREATE VIEW P_CrExpFi 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,
  _CreditControlArea._CreditControlArea2Segment._CreditSegment.CreditSegmentCurrency AS CreditSegmentCurrency,
  currency_conversion( amount => AmountInTransactionCurrency, source_currency => TransactionCurrency, target_currency => _CreditControlArea._CreditControlArea2Segment._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 => _CreditControlArea._CreditControlArea2Segment._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_CreditExposureCategory AS _CreditExposureCategory ON CreditExposureCategory = _CreditExposureCategory.CreditExposureCategory  -- association [1..1]
;