P_HU_MMInvoice

DDL: P_HU_MMINVOICE SQL: PHUMMINVOICE Type: view COMPOSITE

P_HU_MMInvoice is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_SupplierInvoice) and exposes 7 fields with key fields OriginalReferenceDocument, ReferenceDocumentType.

Data Sources (1)

SourceAliasJoin Type
I_SupplierInvoice I_SupplierInvoice from

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PHUMMINVOICE view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY OriginalReferenceDocument OriginalReferenceDocument
KEY ReferenceDocumentType ReferenceDocumentType
InvoiceDate I_SupplierInvoice DocumentDate
Invoice I_JournalEntry DocumentReferenceID
ReferenceDocument
PredecessorReferenceDocument
PredecessorReferenceDocType
@AbapCatalog.sqlViewName: 'PHUMMINVOICE'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Invoice details for Domestic Sales List'

@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view P_HU_MMInvoice
  as select from I_SupplierInvoice
  //    left outer join stxh on

  //      tdname = tdname and

  //      tdobject = 'BELEG' and

  //      tdid = 'HUD'

    join         I_JournalEntry on  //join with ifiaccdoc is done because of xblnr

                                    ReferenceDocumentType     like 'RM%'
                                and OriginalReferenceDocument =    concat(
      SupplierInvoice, I_SupplierInvoice.FiscalYear
    )
{
  key OriginalReferenceDocument          as OriginalReferenceDocument,
  //key I_JournalEntry.DocumentReferenceID  as OriginalReferenceDocument,

  key ReferenceDocumentType              as ReferenceDocumentType,
      I_SupplierInvoice.DocumentDate     as InvoiceDate,
      //SupplierInvoiceIDByInvcgParty      as Invoice,

      I_JournalEntry.DocumentReferenceID as Invoice,
      cast( '' as vbeln )                as ReferenceDocument,
      cast ('' as awkey)                 as PredecessorReferenceDocument,
      cast ('' as awtyp)                 as PredecessorReferenceDocType
}


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