P_MY_CREDITMEMO

DDL: P_MY_CREDITMEMO Type: view_entity COMPOSITE

P_MY_CREDITMEMO is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, I_Withholdingtaxitem) and exposes 14 fields with key fields CompanyCode, FiscalYear, InvoiceReference, WithholdingTaxType.

Data Sources (2)

SourceAliasJoin Type
I_OperationalAcctgDocItem doc inner
I_Withholdingtaxitem wht from

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_OperationalAcctgDocItem CompanyCode Receiver Company Code
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear G/L Fiscal Year
KEY InvoiceReference I_OperationalAcctgDocItem InvoiceReference Invoice Reference
KEY WithholdingTaxType I_Withholdingtaxitem WithholdingTaxType WTax Type
BusinessPlace I_OperationalAcctgDocItem BusinessPlace Business place
CompanyCodeCurrency I_OperationalAcctgDocItem CompanyCodeCurrency Local Currency
FinancialAccountType I_OperationalAcctgDocItem FinancialAccountType Fin. Account Type
SpecialGLTransactionType I_OperationalAcctgDocItem SpecialGLTransactionType Transact.Type
SpecialGLCode I_OperationalAcctgDocItem SpecialGLCode Special G/L Ind
IsUsedInPaymentTransaction I_OperationalAcctgDocItem IsUsedInPaymentTransaction Is Used In Payment Transaction
DebitCreditCode I_OperationalAcctgDocItem DebitCreditCode Single-Character Flag
WhldgTaxAmtInCoCodeCrcy
WhldgTaxBaseAmtInCoCodeCrcy
_CompanyCode I_OperationalAcctgDocItem _CompanyCode

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_MY_CREDITMEMO.
-- 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.

CREATE VIEW P_MY_CREDITMEMO AS
SELECT
  doc.CompanyCode AS CompanyCode,
  doc.FiscalYear AS FiscalYear,
  doc.InvoiceReference AS InvoiceReference,
  wht.WithholdingTaxType AS WithholdingTaxType,
  doc.BusinessPlace AS BusinessPlace,
  doc.CompanyCodeCurrency AS CompanyCodeCurrency,
  doc.FinancialAccountType AS FinancialAccountType,
  doc.SpecialGLTransactionType AS SpecialGLTransactionType,
  doc.SpecialGLCode AS SpecialGLCode,
  doc.IsUsedInPaymentTransaction AS IsUsedInPaymentTransaction,
  doc.DebitCreditCode AS DebitCreditCode,
  sum(wht.WhldgTaxAmtInCoCodeCrcy) AS WhldgTaxAmtInCoCodeCrcy,
  sum(wht.WhldgTaxBaseAmtInCoCodeCrcy) AS WhldgTaxBaseAmtInCoCodeCrcy,
  doc._CompanyCode AS _CompanyCode
FROM I_Withholdingtaxitem AS wht
INNER JOIN I_OperationalAcctgDocItem AS doc ON /* join condition not captured in parsed metadata */
;