P_InvoicesCreatedBeforePO2

DDL: P_INVOICESCREATEDBEFOREPO2 SQL: PINVBFRPO2 Type: view CONSUMPTION

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)

SourceAliasJoin Type
P_InvoicesCreatedBeforePO1 P_InvoicesCreatedBeforePO1 from
I_SupplierInvoice SupplierInvoice inner

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate vdm_validitystart
P_EndDate vdm_validityend

Annotations (6)

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

KeyFieldSource TableSource FieldDescription
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":""
}
}*/