P_InvoicesCreatedBeforePO2
P_InvoicesCreatedBeforePO2 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_InvoicesCreatedBeforePO1, I_SupplierInvoice) and exposes 12 fields with key field PurchaseOrder.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_InvoicesCreatedBeforePO1 | P_InvoicesCreatedBeforePO1 | from |
| I_SupplierInvoice | SupplierInvoice | inner |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_DisplayCurrency | displaycurrency | |
| P_StartDate | vdm_validitystart | |
| P_EndDate | vdm_validityend |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PINVBFRPO2 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | ||
| AccountingDocument | PurchaseOrder | AccountingDocument | ||
| CompanyCode | PurchaseOrder | CompanyCode | ||
| PurchasingOrganization | PurchasingOrganization | |||
| PurchasingGroup | PurchasingGroup | |||
| Supplier | Supplier | |||
| PurchaseOrderDate | PurchaseOrderDate | |||
| PostingDate | I_SupplierInvoice | PostingDate | ||
| AccountingDocumentCreationDate | I_SupplierInvoice | CreationDate | ||
| PurOrdNetAmountInDisplayCrcy | PurOrdNetAmountInDisplayCrcy | |||
| DocumentDate | PurchaseOrder | DocumentDate | ||
| NmbrOfPurOrdsCrtedAftInvcs |
@AbapCatalog.sqlViewName: 'PINVBFRPO2'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType : #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_InvoicesCreatedBeforePO2
with parameters
P_DisplayCurrency : displaycurrency,
P_StartDate : vdm_validitystart,
P_EndDate : vdm_validityend
as select from P_InvoicesCreatedBeforePO1(P_DisplayCurrency : $parameters.P_DisplayCurrency,
P_StartDate: $parameters.P_StartDate,
P_EndDate: $parameters.P_EndDate) as PurchaseOrder
inner join I_SupplierInvoice as SupplierInvoice on SupplierInvoice.SupplierInvoice = PurchaseOrder.AccountingDocument
// inner join I_AccountingDocument as AccountingDocument on PurchaseOrder.PurchaseOrder = AccountingDocument.DocumentReferenceID
// and PurchaseOrder.AccountingDocument = AccountingDocument.AccountingDocument
{
key PurchaseOrder,
PurchaseOrder.AccountingDocument,
PurchaseOrder.CompanyCode,
PurchasingOrganization,
PurchasingGroup,
Supplier,
PurchaseOrderDate,
// AccountingDocument.PostingDate,
// AccountingDocument.AccountingDocumentCreationDate,
SupplierInvoice.PostingDate,
SupplierInvoice.CreationDate as AccountingDocumentCreationDate,
PurOrdNetAmountInDisplayCrcy,
PurchaseOrder.DocumentDate,
cast(1 as mm_a_noofpurordcrtdaftrinv) as NmbrOfPurOrdsCrtedAftInvcs
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SUPPLIERINVOICE",
"P_INVOICESCREATEDBEFOREPO1"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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