fiscds_mref_doc_01

DDL: FISVD_MREF_DOC_01 SQL: FISV_MREF_DOC_01 Type: view

Document with Multi-Referenced Invoice

fiscds_mref_doc_01 is a CDS View that provides data about "Document with Multi-Referenced Invoice" in SAP S/4HANA. It reads from 3 data sources (fiscds_mref_invoice, bkpf, I_GLAccountLineItem) and exposes 27 fields.

Data Sources (3)

SourceAliasJoin Type
fiscds_mref_invoice a from
bkpf b inner
I_GLAccountLineItem c inner

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName FISV_MREF_DOC_01 view
EndUserText.label Document with Multi-Referenced Invoice view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (27)

KeyFieldSource TableSource FieldDescription
bukrs fiscds_mref_invoice bukrs
gjahr fiscds_mref_invoice gjahr
xblnr fiscds_mref_invoice xblnr
rldnr I_GLAccountLineItem Ledger
rldnr_pers I_GLAccountLineItem SourceLedger
docln I_GLAccountLineItem LedgerGLLineItem
belnr bkpf belnr
koart I_GLAccountLineItem FinancialAccountType
bldat bkpf bldat
blart bkpf blart
CreationDate bkpf cpudt
budat bkpf budat
zuonr I_GLAccountLineItem AssignmentReference
usnam I_GLAccountLineItem AccountingDocCreatedByUser
bschl I_GLAccountLineItem PostingKey
hsl I_GLAccountLineItem AmountInCompanyCodeCurrency
rhcur I_GLAccountLineItem CompanyCodeCurrency
wsl I_GLAccountLineItem AmountInTransactionCurrency
rwcur I_GLAccountLineItem TransactionCurrency
AmountInFunctionalCurrency I_GLAccountLineItem AmountInFunctionalCurrency
FunctionalCurrency I_GLAccountLineItem FunctionalCurrency
ktopl I_GLAccountLineItem ChartOfAccounts
racct I_GLAccountLineItem GLAccount
umskz I_GLAccountLineItem SpecialGLCode
Supplierendaswakonto
stblg bkpf stblg
stgrd bkpf stgrd
@AbapCatalog.sqlViewName: 'FISV_MREF_DOC_01'
@EndUserText.label: 'Document with Multi-Referenced Invoice'
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL

define view fiscds_mref_doc_01
  as select from fiscds_mref_invoice as a
    inner join            bkpf                as b on  a.bukrs = b.bukrs
                                                   and a.gjahr = b.gjahr
                                                   and a.xblnr = b.xblnr
    inner join            I_GLAccountLineItem      as c on  b.bukrs = c.CompanyCode
                                                   and b.gjahr = c.LedgerFiscalYear
                                                   and b.belnr = c.AccountingDocument
  {
    a.bukrs,
    a.gjahr,
    a.xblnr,
    c.Ledger                                            as rldnr,
    c.SourceLedger                                      as rldnr_pers,
    c.LedgerGLLineItem                                  as docln,
    b.belnr,
    c.FinancialAccountType                              as koart,
    b.bldat,
    b.blart,
    b.cpudt as CreationDate,
    b.budat,
    c.AssignmentReference                               as zuonr,
    c.AccountingDocCreatedByUser                        as usnam,
    c.PostingKey                                        as bschl,
    c.AmountInCompanyCodeCurrency                       as hsl,
    c.CompanyCodeCurrency                               as rhcur,
    c.AmountInTransactionCurrency                       as wsl,
    c.TransactionCurrency                               as rwcur,
    c.AmountInFunctionalCurrency,
    c.FunctionalCurrency,
    c.ChartOfAccounts                                   as ktopl,
    c.GLAccount                                         as racct,
    c.SpecialGLCode                                     as umskz,
    case c.FinancialAccountType
        when 'D' then c.Customer
        when 'K' then c.Supplier
    end                                                                      as wakonto,
    b.stblg,
    b.stgrd
  }
  where
         b.stblg = ''
    and(
         c.FinancialAccountType = 'D'
      or c.FinancialAccountType = 'K'
    )

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"FISCDS_MREF_INVOICE",
"I_GLACCOUNTLINEITEM",
"BKPF"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/