P_BG_SAFTPAYMENTITEM
P_BG_SAFTPAYMENTITEM is a Consumption CDS View in SAP S/4HANA. It reads from 4 data sources (I_JournalEntry, I_OperationalAcctgDocItem, I_JournalEntryItem, I_BG_SAFTPaymentMethod) and exposes 21 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_JournalEntry | Bkpf | inner |
| I_OperationalAcctgDocItem | Bseg | inner |
| I_JournalEntryItem | Item | from |
| I_BG_SAFTPaymentMethod | PaymentMethod | inner |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_AlternativeGLAccountIsUsed | saft_bg_alt_gl_account_flag |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (21)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | I_JournalEntryItem | SourceLedger | Source Ledger |
| KEY | CompanyCode | I_JournalEntryItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | I_JournalEntryItem | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | I_JournalEntryItem | AccountingDocument | Journal Entry |
| KEY | LedgerGLLineItem | I_JournalEntryItem | LedgerGLLineItem | Journal Entry Item |
| KEY | Ledger | I_JournalEntryItem | Ledger | Ledger |
| AccountingDocumentItem | I_JournalEntryItem | AccountingDocumentItem | Posting View Item | |
| Customer | I_JournalEntryItem | Customer | Sold-to Party | |
| Supplier | I_JournalEntryItem | Supplier | Supplier | |
| DebitCreditCode | I_JournalEntryItem | DebitCreditCode | Single-Character Flag | |
| FinancialAccountType | I_JournalEntryItem | FinancialAccountType | Fin. Account Type | |
| GLAccountendasActiveGLAccount | ||||
| PostingDate | I_JournalEntryItem | PostingDate | Posting Date for GR | |
| DocumentDate | I_JournalEntryItem | DocumentDate | Journal Entry Date | |
| AccountingDocCreatedByUser | I_JournalEntryItem | AccountingDocCreatedByUser | User which created overhead document | |
| AccountingDocumentType | I_JournalEntryItem | AccountingDocumentType | Journal Entry Type | |
| CompanyCodeCurrency | I_JournalEntryItem | CompanyCodeCurrency | Local Currency | |
| TransactionCurrency | I_JournalEntryItem | TransactionCurrency | Transaction Currency | |
| BG_SAFTPaymentMethod | I_BG_SAFTPaymentMethod | BG_SAFTPaymentMethod | Payment Method | |
| TaxReportingDate | I_JournalEntry | TaxReportingDate | Tax Reporting Date | |
| ExchangeRate |
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_BG_SAFTPAYMENTITEM.
-- 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_AlternativeGLAccountIsUsed : saft_bg_alt_gl_account_flag
CREATE VIEW P_BG_SAFTPAYMENTITEM AS
SELECT
Item.SourceLedger AS SourceLedger,
Item.CompanyCode AS CompanyCode,
Item.FiscalYear AS FiscalYear,
Item.AccountingDocument AS AccountingDocument,
Item.LedgerGLLineItem AS LedgerGLLineItem,
Item.Ledger AS Ledger,
Item.AccountingDocumentItem AS AccountingDocumentItem,
Item.Customer AS Customer,
Item.Supplier AS Supplier,
Item.DebitCreditCode AS DebitCreditCode,
Item.FinancialAccountType AS FinancialAccountType,
case when $parameters.P_AlternativeGLAccountIsUsed = 'X' then Item.AlternativeGLAccount else Item.GLAccount end as ActiveGLAccount AS GLAccountendasActiveGLAccount,
Item.PostingDate AS PostingDate,
Item.DocumentDate AS DocumentDate,
Item.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
Item.AccountingDocumentType AS AccountingDocumentType,
Item.CompanyCodeCurrency AS CompanyCodeCurrency,
Item.TransactionCurrency AS TransactionCurrency,
PaymentMethod.BG_SAFTPaymentMethod AS BG_SAFTPaymentMethod,
Bkpf.TaxReportingDate AS TaxReportingDate,
cast (Bkpf.ExchangeRate as bgsaft_exchange_rate) AS ExchangeRate
FROM I_JournalEntryItem AS Item
INNER JOIN I_OperationalAcctgDocItem AS Bseg ON /* join condition not captured in parsed metadata */
INNER JOIN I_JournalEntry AS Bkpf ON /* join condition not captured in parsed metadata */
INNER JOIN I_BG_SAFTPaymentMethod AS PaymentMethod ON /* join condition not captured in parsed metadata */
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA