P_Hu_FiInvoice
FI Invoice details for Domestic Sales List
P_Hu_FiInvoice is a Composite CDS View that provides data about "FI Invoice details for Domestic Sales List" in SAP S/4HANA. It reads from 1 data source (I_JournalEntry) and exposes 9 fields with key fields OriginalReferenceDocument, AccountingDocument, CompanyCode, FiscalYear, ReferenceDocumentType. Part of development package GLO_FIN_IS_HU.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_JournalEntry | I_JournalEntry | from |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PHUFIINVOICE | 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 (9)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OriginalReferenceDocument | OriginalReferenceDocument | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | CompanyCode | CompanyCode | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | ReferenceDocumentType | ReferenceDocumentType | ||
| Invoice | DocumentReferenceID | |||
| InvoiceDate | DocumentDate | |||
| PredecessorReferenceDocument | ||||
| PredecessorReferenceDocType |
@AbapCatalog.sqlViewName: 'PHUFIINVOICE'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'FI Invoice details for Domestic Sales List'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
@VDM.private: true
define view P_Hu_FiInvoice
as select from I_JournalEntry
// left outer join I_JournalEntryItem on I_JournalEntryItem.CompanyCode = _JournalEntry.CompanyCode
// and I_JournalEntryItem.AccountingDocument = _JournalEntry.AccountingDocument
// and I_JournalEntryItem.FiscalYear = _JournalEntry.FiscalYear
// and I_JournalEntryItem.InvoiceReference <> ''
// association [0..1] to I_JournalEntry as _JournalEntryOrig on _JournalEntryOrig.CompanyCode = _JournalEntry.CompanyCode
// and _JournalEntryOrig.AccountingDocument = I_JournalEntryItem.InvoiceReference
// and _JournalEntryOrig.FiscalYear = _JournalEntry.FiscalYear
{
key OriginalReferenceDocument,
key AccountingDocument,
key CompanyCode,
key FiscalYear,
key ReferenceDocumentType,
DocumentReferenceID as Invoice,
DocumentDate as InvoiceDate,
// cast( ' ' as vbeln ) as ReferenceDocument
// case I_JournalEntryItem.InvoiceReference
// when '' then cast( ' ' as vbeln )
// else _JournalEntryOrig.DocumentReferenceID
// end as ReferenceDocument
cast ('' as awkey) as PredecessorReferenceDocument,
cast ('' as awtyp) as PredecessorReferenceDocType
}
where
ReferenceDocumentType = 'BKPF'
//and AccountingDocument = substring(
// OriginalReferenceDocument, 1, 10
//)
Learn More
- 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 Annotations — A Complete Guide
- 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