C_BG_SAFTPaymentItemC

DDL: C_BG_SAFTPAYMENTITEMC Type: view_entity CONSUMPTION Package: GLO_FIN_IS_SAFT_BG

Payment Data for BG SAFT - Cube

C_BG_SAFTPaymentItemC is a Consumption CDS View (Cube) that provides data about "Payment Data for BG SAFT - Cube" in SAP S/4HANA. It reads from 2 data sources (I_BG_SAFTAccountMapping, P_BG_SAFTPAYMENTITEM) and exposes 27 fields with key fields SourceLedger, CompanyCode, AccountingDocument, FiscalYear, LedgerGLLineItem. Part of development package GLO_FIN_IS_SAFT_BG.

Data Sources (2)

SourceAliasJoin Type
I_BG_SAFTAccountMapping accmap inner
P_BG_SAFTPAYMENTITEM P_BG_SAFTPAYMENTITEM from

Parameters (3)

NameTypeDefault
P_VATRegistration stceg
P_UserSystemIdentifier sysid
P_AlternativeGLAccountIsUsed saft_bg_alt_gl_account_flag

Annotations (10)

NameValueLevelField
VDM.viewType #CONSUMPTION view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
AccessControl.authorizationCheck #MANDATORY view
Metadata.allowExtensions true view
EndUserText.label Payment Data for BG SAFT - Cube view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger Item SourceLedger Source Ledger
KEY CompanyCode Item CompanyCode Receiver Company Code
KEY AccountingDocument Item AccountingDocument Journal Entry
KEY FiscalYear Item FiscalYear G/L Fiscal Year
KEY LedgerGLLineItem Item LedgerGLLineItem Journal Entry Item
KEY Ledger Item Ledger Ledger
AccountingDocumentType Item AccountingDocumentType Journal Entry Type
PostingDate Item PostingDate Posting Date for GR
DocumentDate Item DocumentDate Journal Entry Date
TaxReportingDate Item TaxReportingDate Tax Reporting Date
AccountingDocumentHeaderText Item AccountingDocumentHeaderText Doc.Header Text
Customer Item Customer Sold-to Party
CustomerTaxID5endendasCustomerTaxID5
Supplier Item Supplier Supplier
SupplierTaxID5endendasSupplierTaxID5
DebitCreditCodeIsChanged
BG_SAFTStandardAccount I_BG_SAFTAccountMapping BG_SAFTStandardAccount St. Account ID
BG_SAFTPaymentMethod Item BG_SAFTPaymentMethod
AmountInCompanyCodeCurrency Item AmountInCompanyCodeCurrency Local Crcy Amt
CompanyCodeCurrency Item CompanyCodeCurrency Local Currency
AmountInTransactionCurrency Item AmountInTransactionCurrency Pt Crcy Amt
ReportingCurrency Item ReportingCurrency Currency
AmountInReportingCurrency Item AmountInReportingCurrency
TransactionCurrency Item TransactionCurrency Transaction Currency
DocumentId Item DocumentId Routing slip doc. ID
AccountingDocCreatedByUser Item AccountingDocCreatedByUser User which created overhead document
UserSystemIdentifier

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 C_BG_SAFTPaymentItemC.
-- 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.
-- Parameters: P_VATRegistration : stceg, P_UserSystemIdentifier : sysid, P_AlternativeGLAccountIsUsed : saft_bg_alt_gl_account_flag

CREATE VIEW C_BG_SAFTPaymentItemC AS
SELECT
  Item.SourceLedger AS SourceLedger,
  Item.CompanyCode AS CompanyCode,
  Item.AccountingDocument AS AccountingDocument,
  Item.FiscalYear AS FiscalYear,
  Item.LedgerGLLineItem AS LedgerGLLineItem,
  Item.Ledger AS Ledger,
  Item.AccountingDocumentType AS AccountingDocumentType,
  Item.PostingDate AS PostingDate,
  Item.DocumentDate AS DocumentDate,
  Item.TaxReportingDate AS TaxReportingDate,
  Item.AccountingDocumentHeaderText AS AccountingDocumentHeaderText,
  Item.Customer AS Customer,
  case when Item.Customer is initial and Item.Supplier is initial and Item.DebitCreditCode = 'S' then cast( $parameters.P_VATRegistration as stceg ) else case when Item.CustomerTaxID5 = '0' and Item.SupplierTaxID5 = '0' then cast( $parameters.P_VATRegistration as stcd5 ) else Item.CustomerTaxID5 end end as CustomerTaxID5 AS CustomerTaxID5endendasCustomerTaxID5,
  Item.Supplier AS Supplier,
  case when Item.Customer is initial and Item.Supplier is initial and Item.DebitCreditCode = 'H' then cast( $parameters.P_VATRegistration as stceg ) else case when Item.CustomerTaxID5 = '0' and Item.SupplierTaxID5 = '0' then cast( $parameters.P_VATRegistration as stcd5 ) else Item.SupplierTaxID5 end end as SupplierTaxID5 AS SupplierTaxID5endendasSupplierTaxID5,
  coalesce(PayMapNoGL.DebitCreditCodeIsChanged, PayMapGL.DebitCreditCodeIsChanged) AS DebitCreditCodeIsChanged,
  accmap.BG_SAFTStandardAccount AS BG_SAFTStandardAccount,
  Item.BG_SAFTPaymentMethod AS BG_SAFTPaymentMethod,
  Item.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  Item.CompanyCodeCurrency AS CompanyCodeCurrency,
  Item.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  Item.ReportingCurrency AS ReportingCurrency,
  Item.AmountInReportingCurrency AS AmountInReportingCurrency,
  Item.TransactionCurrency AS TransactionCurrency,
  Item.DocumentId AS DocumentId,
  Item.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
  cast(concat( $parameters.P_UserSystemIdentifier, concat( concat( concat( '/', cast( $session.client as char3 )), '/' ) , Item.AccountingDocument ) ) as text30) AS UserSystemIdentifier
FROM P_BG_SAFTPAYMENTITEM
INNER JOIN I_BG_SAFTAccountMapping AS accmap ON /* join condition not captured in parsed metadata */
;