P_APVendorOpenItems0
P_APVendorOpenItems0 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_ReceivablesPayablesItem) and exposes 21 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ReceivablesPayablesItem | I_ReceivablesPayablesItem | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_AccountingDocument | _AccountingDocumentHeader | $projection.CompanyCode = _AccountingDocumentHeader.CompanyCode and $projection.AccountingDocument = _AccountingDocumentHeader.AccountingDocument and $projection.FiscalYear = _AccountingDocumentHeader.FiscalYear |
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.sqlViewName | PFIAPVNDROPITM0 | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (21)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| AmountInTransactionCurrency | AmountInTransactionCurrency | |||
| DocumentCurrency | TransactionCurrency | |||
| InvoiceReference | InvoiceReference | |||
| InvoiceReferenceFiscalYear | InvoiceReferenceFiscalYear | |||
| InvoiceItemReference | InvoiceItemReference | |||
| FollowOnDocumentType | FollowOnDocumentType | |||
| Supplier | Creditor | |||
| SpecialGLTransactionType | SpecialGLTransactionType | |||
| ClearingAccountingDocument | ClearingAccountingDocument | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| FinancialAccountType | FinancialAccountType | |||
| IsUsedInPaymentTransaction | IsUsedInPaymentTransaction | |||
| TransactionTypeDetermination | TransactionTypeDetermination | |||
| CompanyCodeCurrency | CompanyCodeCurrency | |||
| _AccountingDocumentHeader | _AccountingDocumentHeader | |||
| _DocumentCurrency | _DocumentCurrency |
//@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":""
}
}*/
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