P_APVENDOROPENITEMS0

CDS View

P_APVENDOROPENITEMS0 is a CDS View in S/4HANA. It contains 14 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
P_APVendorOpenItems1 view from COMPOSITE
P_APVendorOpenItems11 view inner COMPOSITE
P_APVendorOpenItems6 view from COMPOSITE

Fields (14)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 3
KEY AccountingDocumentItem AccountingDocumentItem 3
KEY CompanyCode CompanyCode 3
KEY FiscalYear FiscalYear 3
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency,OpenAmount 2
AmountInTransactionCurrency AmountInTransactionCurrency 1
CompanyCodeCurrency CompanyCodeCurrency 3
DocumentCurrency DocumentCurrency 3
FollowOnDocumentType FollowOnDocumentType 1
InvoiceItemReference InvoiceItemReference 1
InvoiceReference InvoiceReference 1
InvoiceReferenceFiscalYear InvoiceReferenceFiscalYear 1
SpecialGLTransactionType SpecialGLTransactionType 2
Supplier Supplier 3
//@EndUserText.label: 'Core Entity: Accounting Document Item' 

@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PFIAPVNDROPITM0'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
define view P_APVendorOpenItems0
as select from I_ReceivablesPayablesItem

association [1..1] to I_AccountingDocument as _AccountingDocumentHeader 
on $projection.CompanyCode          = _AccountingDocumentHeader.CompanyCode
and $projection.AccountingDocument  = _AccountingDocumentHeader.AccountingDocument
and $projection.FiscalYear          = _AccountingDocumentHeader.FiscalYear

// if z_AccDoc has assosiations, I_CompanyCode can be skipped here 

// and needed associasion can be propagated from z_AccDoc

// or it can be propagated from z_recpayitem

// --- problems with propagating: can't propagate _AccountingDocumentHeader._CompanyCode

// --- only _AccountingDocumentHeader can be propagated, but in view ... it will ask for AccountingDocument

// --- which coul not be included because of sum function (more result rows will be output than needed)


// commented out as in I_ReceivablesPayablesItem there is _CompanyCode now.

association [1..1] to I_CompanyCode as _CompanyCode // ZI_CompanyCodeTmp 

on $projection.CompanyCode = _CompanyCode.CompanyCode

//association [1..1] to I_Supplier as _Vendor on $projection.Supplier = _Vendor.Supplier


association to I_Currency as _DocumentCurrency on $projection.DocumentCurrency = _DocumentCurrency.Currency
    
{
  key CompanyCode,
  key AccountingDocument,
  key FiscalYear,
  key AccountingDocumentItem,
  AmountInCompanyCodeCurrency,
  AmountInTransactionCurrency,  
  TransactionCurrency as DocumentCurrency,  
  InvoiceReference,
  InvoiceReferenceFiscalYear,
  InvoiceItemReference,
  FollowOnDocumentType,
//  DebitCreditCode,

  Creditor as Supplier, 
  SpecialGLTransactionType,
  ClearingAccountingDocument,
  AccountingDocumentCategory,
  FinancialAccountType,
  IsUsedInPaymentTransaction, 
  TransactionTypeDetermination, 
  CompanyCodeCurrency,
  
  _AccountingDocumentHeader,
  _DocumentCurrency
};
                                                              
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_RECEIVABLESPAYABLESITEM"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENT",
"I_COMPANYCODE",
"I_CURRENCY"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/