fiscds_mref_doc_07

DDL: FISVD_MREF_DOC_07 SQL: FISV_MREF_DOC_07 Type: view

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)

SourceAliasJoin Type
bkpf a from
I_GLAccountLineItem b inner

Annotations (5)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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 */
;