C_BG_SAFTSalesInvoiceHeader
Sales invoice header for BG SAFT
C_BG_SAFTSalesInvoiceHeader is a Consumption CDS View that provides data about "Sales invoice header for BG SAFT" in SAP S/4HANA. It reads from 2 data sources (I_BG_SAFTAccountMapping, P_BG_SAFTSALESINVOICEHEADER) and exposes 31 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, Ledger. Part of development package GLO_FIN_IS_SAFT_BG.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_BG_SAFTAccountMapping | accmap | inner |
| P_BG_SAFTSALESINVOICEHEADER | P_BG_SAFTSALESINVOICEHEADER | from |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_AlternativeGLAccountIsUsed | saft_bg_alt_gl_account_flag | |
| P_UserSystemIdentifier | sysid | |
| P_VATRegistration | stceg |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | Sales invoice header for BG SAFT | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | Header | SourceLedger | Source Ledger |
| KEY | CompanyCode | Header | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | Header | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | Header | AccountingDocument | Journal Entry |
| KEY | Ledger | Header | Ledger | Ledger |
| AccountingDocumentItem | Header | AccountingDocumentItem | Posting View Item | |
| FiscalPeriod | Header | FiscalPeriod | Tax period | |
| PostingDate | Header | PostingDate | Posting Date for GR | |
| InvoiceDate | Header | InvoiceDate | Run On | |
| TaxReportingDate | Header | TaxReportingDate | Tax Reporting Date | |
| AccountingDocumentType | Header | AccountingDocumentType | Journal Entry Type | |
| AccountingDocCreatedByUser | Header | AccountingDocCreatedByUser | User which created overhead document | |
| Customer | Header | Customer | Sold-to Party | |
| CustomerStreetName | Header | CustomerStreetName | ||
| CustomerCityName | Header | CustomerCityName | ||
| CustomerPostalCode | Header | CustomerPostalCode | ||
| CustomerCountry | Header | CustomerCountry | ||
| Supplier | Header | Supplier | Supplier | |
| SupplierStreetName | Header | SupplierStreetName | Arrival Street | |
| SupplierCityName | Header | SupplierCityName | Supplier City | |
| SupplierPostalCode | Header | SupplierPostalCode | Arrival Postal Code | |
| SupplierCountry | Header | SupplierCountry | ||
| BG_SAFTInvoiceType | Header | BG_SAFTInvoiceType | ||
| CustomerTaxID5 | Header | CustomerTaxID5 | ||
| SupplierTaxID5 | Header | SupplierTaxID5 | ||
| BG_SAFTStandardAccount | I_BG_SAFTAccountMapping | BG_SAFTStandardAccount | St. Account ID | |
| BG_SAFTSystemID | Header | BG_SAFTSystemID | ||
| PaymentTermsName | Header | PaymentTermsName | Description | |
| SelfBillingValueItemDesc | Header | SelfBillingValueItemDesc | ||
| BusinessTransactionTypeName | Header | BusinessTransactionTypeName | ||
| AlternativeReferenceDocument | Header | AlternativeReferenceDocument | Alternative Reference Document |
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_SAFTSalesInvoiceHeader.
-- 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, P_UserSystemIdentifier : sysid, P_VATRegistration : stceg
CREATE VIEW C_BG_SAFTSalesInvoiceHeader AS
SELECT
Header.SourceLedger AS SourceLedger,
Header.CompanyCode AS CompanyCode,
Header.FiscalYear AS FiscalYear,
Header.AccountingDocument AS AccountingDocument,
Header.Ledger AS Ledger,
Header.AccountingDocumentItem AS AccountingDocumentItem,
Header.FiscalPeriod AS FiscalPeriod,
Header.PostingDate AS PostingDate,
Header.InvoiceDate AS InvoiceDate,
Header.TaxReportingDate AS TaxReportingDate,
Header.AccountingDocumentType AS AccountingDocumentType,
Header.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
Header.Customer AS Customer,
Header.CustomerStreetName AS CustomerStreetName,
Header.CustomerCityName AS CustomerCityName,
Header.CustomerPostalCode AS CustomerPostalCode,
Header.CustomerCountry AS CustomerCountry,
Header.Supplier AS Supplier,
Header.SupplierStreetName AS SupplierStreetName,
Header.SupplierCityName AS SupplierCityName,
Header.SupplierPostalCode AS SupplierPostalCode,
Header.SupplierCountry AS SupplierCountry,
Header.BG_SAFTInvoiceType AS BG_SAFTInvoiceType,
Header.CustomerTaxID5 AS CustomerTaxID5,
Header.SupplierTaxID5 AS SupplierTaxID5,
accmap.BG_SAFTStandardAccount AS BG_SAFTStandardAccount,
Header.BG_SAFTSystemID AS BG_SAFTSystemID,
Header.PaymentTermsName AS PaymentTermsName,
Header.SelfBillingValueItemDesc AS SelfBillingValueItemDesc,
Header.BusinessTransactionTypeName AS BusinessTransactionTypeName,
Header.AlternativeReferenceDocument AS AlternativeReferenceDocument
FROM P_BG_SAFTSALESINVOICEHEADER
INNER JOIN I_BG_SAFTAccountMapping AS accmap 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