fiscds_mref_doc_07
Document with Referenced Invoice
fiscds_mref_doc_07 is a CDS View that provides data about "Document with Referenced Invoice" in SAP S/4HANA. It reads from 2 data sources (bkpf, I_GLAccountLineItem) and exposes 26 fields with key fields CompanyCode, FiscalYear, Ledger, SourceLedger, AccountingDocument.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| bkpf | a | from |
| I_GLAccountLineItem | b | inner |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | FISV_MREF_DOC_07 | view | |
| EndUserText.label | Document with Referenced Invoice | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view |
Fields (26)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | bkpf | bukrs | Value |
| KEY | FiscalYear | bkpf | gjahr | Settlement Year |
| KEY | Ledger | I_GLAccountLineItem | Ledger | Ledger |
| KEY | SourceLedger | I_GLAccountLineItem | SourceLedger | Source Ledger |
| KEY | AccountingDocument | I_GLAccountLineItem | AccountingDocument | Journal Entry |
| KEY | AccountingDocumentItem | I_GLAccountLineItem | AccountingDocumentItem | Posting View Item |
| KEY | DocumentReferenceID | bkpf | xblnr | Reference |
| FinancialAccountType | FinancialAccountType | Fin. Account Type | ||
| DocumentDate | bkpf | bldat | Journal Entry Date | |
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| CreationDate | ||||
| PostingDate | bkpf | budat | Posting Date | |
| AssignmentReference | I_GLAccountLineItem | AssignmentReference | Assignment Reference | |
| AccountingDocCreatedByUser | bkpf | usnam | User Name | |
| PostingKey | I_GLAccountLineItem | PostingKey | Posting Key | |
| AmountInCompanyCodeCurrency | I_GLAccountLineItem | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| CompanyCodeCurrency | I_GLAccountLineItem | CompanyCodeCurrency | Local Currency | |
| AmountInTransactionCurrency | I_GLAccountLineItem | AmountInTransactionCurrency | Pt Crcy Amt | |
| TransactionCurrency | I_GLAccountLineItem | TransactionCurrency | Transaction Currency | |
| AmountInFunctionalCurrency | I_GLAccountLineItem | AmountInFunctionalCurrency | Amount in Functional Currency | |
| FunctionalCurrency | I_GLAccountLineItem | FunctionalCurrency | Functional Currency | |
| ktopl | I_GLAccountLineItem | ChartOfAccounts | Node Class | |
| GLAccount | I_GLAccountLineItem | GLAccount | General Ledger | |
| SpecialGLIndicator | I_GLAccountLineItem | SpecialGLCode | Special G/L Ind | |
| SupplierendasAccount | ||||
| koart | I_GLAccountLineItem | FinancialAccountType | Fin. Account Type |
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 fiscds_mref_doc_07.
-- 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: FISV_MREF_DOC_07
CREATE VIEW fiscds_mref_doc_07 AS
SELECT
a.bukrs AS CompanyCode,
a.gjahr AS FiscalYear,
b.Ledger AS Ledger,
b.SourceLedger AS SourceLedger,
b.AccountingDocument AS AccountingDocument,
b.AccountingDocumentItem AS AccountingDocumentItem,
a.xblnr AS DocumentReferenceID,
FinancialAccountType,
a.bldat AS DocumentDate,
AccountingDocumentType,
cast(substring( cast(b.CreationDate as abap.char(30)), 1 , 8) as abap.dats) AS CreationDate,
a.budat AS PostingDate,
b.AssignmentReference AS AssignmentReference,
a.usnam AS AccountingDocCreatedByUser,
b.PostingKey AS PostingKey,
b.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
b.CompanyCodeCurrency AS CompanyCodeCurrency,
b.AmountInTransactionCurrency AS AmountInTransactionCurrency,
b.TransactionCurrency AS TransactionCurrency,
b.AmountInFunctionalCurrency AS AmountInFunctionalCurrency,
b.FunctionalCurrency AS FunctionalCurrency,
b.ChartOfAccounts AS ktopl,
b.GLAccount AS GLAccount,
b.SpecialGLCode AS SpecialGLIndicator,
case b.FinancialAccountType when 'D' then b.Customer when 'K' then b.Supplier end as Account AS SupplierendasAccount,
b.FinancialAccountType AS koart
FROM bkpf AS a
INNER JOIN I_GLAccountLineItem AS b ON /* join condition not captured in parsed metadata */
;
Learn More
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- 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