P_APInvoiceProcessingAnalysis1

DDL: P_APINVOICEPROCESSINGANALYSIS1 SQL: PFIAPINVPROALY1 Type: view COMPOSITE

P_APInvoiceProcessingAnalysis1 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_ReceivablesPayablesItem) and exposes 13 fields with key fields CompanyCode, AccountingDocument, AccountingDocumentItem, FiscalYear. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_ReceivablesPayablesItem I_ReceivablesPayablesItem from

Parameters (2)

NameTypeDefault
P_KeyDate abap.dats
P_StartDate vdm_v_start_date

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_AccountingDocument _AccountingDocument I_ReceivablesPayablesItem.AccountingDocument = _AccountingDocument.AccountingDocument and I_ReceivablesPayablesItem.CompanyCode = _AccountingDocument.CompanyCode and I_ReceivablesPayablesItem.FiscalYear = _AccountingDocument.FiscalYear

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PFIAPINVPROALY1 view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_ReceivablesPayablesItem CompanyCode
KEY AccountingDocument I_ReceivablesPayablesItem AccountingDocument
KEY AccountingDocumentItem I_ReceivablesPayablesItem AccountingDocumentItem
KEY FiscalYear I_ReceivablesPayablesItem FiscalYear
Supplier I_ReceivablesPayablesItem Creditor
PaymentBlockingReason I_ReceivablesPayablesItem PaymentBlockingReason
AccountingDocumentCategory I_ReceivablesPayablesItem AccountingDocumentCategory
AccountingDocCreatedByUser _AccountingDocument AccountingDocCreatedByUser
CompanyCodeCurrency I_ReceivablesPayablesItem CompanyCodeCurrency
PostingDate I_ReceivablesPayablesItem PostingDate
ClearingDate I_ReceivablesPayablesItem ClearingDate
AmountInCompanyCodeCurrency
NumberOfItems
@AbapCatalog.sqlViewName: 'PFIAPINVPROALY1'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
define view P_APInvoiceProcessingAnalysis1
with parameters
  P_KeyDate : abap.dats,
  P_StartDate : vdm_v_start_date
  as select from I_ReceivablesPayablesItem
  association [0..1] to I_AccountingDocument as _AccountingDocument
    on  I_ReceivablesPayablesItem.AccountingDocument      = _AccountingDocument.AccountingDocument
    and I_ReceivablesPayablesItem.CompanyCode             = _AccountingDocument.CompanyCode
    and I_ReceivablesPayablesItem.FiscalYear              = _AccountingDocument.FiscalYear
 {
  key I_ReceivablesPayablesItem.CompanyCode,
  key I_ReceivablesPayablesItem.AccountingDocument,
  key I_ReceivablesPayablesItem.AccountingDocumentItem,
  key I_ReceivablesPayablesItem.FiscalYear,

      I_ReceivablesPayablesItem.Creditor as Supplier,
      I_ReceivablesPayablesItem.PaymentBlockingReason,
      I_ReceivablesPayablesItem.AccountingDocumentCategory,
      _AccountingDocument.AccountingDocCreatedByUser,
      I_ReceivablesPayablesItem.CompanyCodeCurrency,
      I_ReceivablesPayablesItem.PostingDate,
      I_ReceivablesPayablesItem.ClearingDate,
      
      cast(-I_ReceivablesPayablesItem.AmountInCompanyCodeCurrency as dmshb_farp) as AmountInCompanyCodeCurrency,//Negative sign for AP amount display

      cast( 1 as abap.int4 ) as NumberOfItems
}
where I_ReceivablesPayablesItem.AccountingDocumentCategory = ''
    and  I_ReceivablesPayablesItem.FinancialAccountType = 'K' 
    and  I_ReceivablesPayablesItem.IsSalesRelated =  'X'
    and  I_ReceivablesPayablesItem.SpecialGLCode =  ''
    and  I_ReceivablesPayablesItem.PostingDate >= :P_StartDate
    and  I_ReceivablesPayablesItem.PostingDate <= :P_KeyDate;
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENT",
"I_RECEIVABLESPAYABLESITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/