P_ClearedItem1
P_ClearedItem1 is a Consumption CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 135 fields with key fields CompanyCode, FiscalYear, AccountingDocument, AccountingDocumentItem, FiscalYear.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| I_OperationalAcctgDocItem | I_OperationalAcctgDocItem | from |
| P_APLineItem_7 | P_APLineItem_7 | union_all |
| P_ARLineItem_7 | P_ARLineItem_7 | union_all |
| P_BSAS_BCK | P_BSAS_BCK | union_all |
| P_Bseg_Add | P_Bseg_Add | union_all |
| P_FAGLBSAS_BCK | P_FAGLBSAS_BCK | union_all |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCLRDITM1 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (135)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_OperationalAcctgDocItem | CompanyCode | |
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| FinancialAccountType | FinancialAccountType | |||
| ClearingJournalEntry | ClearingJournalEntry | |||
| ClearingJournalEntryFiscalYear | ClearingJournalEntryFiscalYear | |||
| AccountingDocumentType | AccountingDocumentType | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| AssignmentReference | AssignmentReference | |||
| CompanyCodeCurrency | CompanyCodeCurrency | |||
| DocumentDate | DocumentDate | |||
| DocumentItemText | DocumentItemText | |||
| InvoiceReference | InvoiceReference | |||
| FollowOnDocumentType | FollowOnDocumentType | |||
| PostingDate | PostingDate | |||
| SpecialGLCode | SpecialGLCode | |||
| AccountingDocumentItemType | AccountingDocumentItemType | |||
| PaymentCardItem | PaymentCardItem | |||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| CashDiscountAmtInCoCodeCrcy | CashDiscountAmtInCoCodeCrcy | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | |||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | |||
| CompanyCode | ||||
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| FinancialAccountType | FinancialAccountType | |||
| ClearingJournalEntry | ClearingJournalEntry | |||
| ClearingJournalEntryFiscalYear | ClearingJournalEntryFiscalYear | |||
| AccountingDocumentType | AccountingDocumentType | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| AssignmentReference | AssignmentReference | |||
| CompanyCodeCurrency | CompanyCodeCurrency | |||
| DocumentDate | DocumentDate | |||
| DocumentItemText | DocumentItemText | |||
| InvoiceReference | InvoiceReference | |||
| FollowOnDocumentType | FollowOnDocumentType | |||
| PostingDate | PostingDate | |||
| SpecialGLCode | ||||
| AccountingDocumentItemType | AccountingDocumentItemType | |||
| PaymentCardItem | PaymentCardItem | |||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| CashDiscountAmtInCoCodeCrcy | 0 | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | |||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | |||
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| FinancialAccountType | ||||
| ClearingJournalEntry | ClearingAccountingDocument | |||
| ClearingJournalEntryFiscalYear | ClearingDocFiscalYear | |||
| AccountingDocumentType | AccountingDocumentType | |||
| AccountingDocumentCategory | ||||
| AssignmentReference | AssignmentReference | |||
| CompanyCodeCurrency | _CompanyCode | Currency | ||
| DocumentDate | DocumentDate | |||
| DocumentItemText | DocumentItemText | |||
| InvoiceReference | InvoiceReference | |||
| FollowOnDocumentType | FollowOnDocumentType | |||
| PostingDate | PostingDate | |||
| SpecialGLCode | SpecialGLCode | |||
| AccountingDocumentItemType | AccountingDocumentItemType | |||
| PaymentCardItem | PaymentCardItem | |||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| CashDiscountAmtInCoCodeCrcy | CashDiscountAmtInCoCodeCrcy | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | |||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | |||
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| FinancialAccountType | ||||
| ClearingJournalEntry | ClearingAccountingDocument | |||
| ClearingJournalEntryFiscalYear | ClearingDocFiscalYear | |||
| AccountingDocumentType | AccountingDocumentType | |||
| AccountingDocumentCategory | ||||
| AssignmentReference | AssignmentReference | |||
| CompanyCodeCurrency | _CompanyCode | Currency | ||
| DocumentDate | DocumentDate | |||
| DocumentItemText | DocumentItemText | |||
| InvoiceReference | InvoiceReference | |||
| FollowOnDocumentType | FollowOnDocumentType | |||
| PostingDate | PostingDate | |||
| SpecialGLCode | SpecialGLCode | |||
| AccountingDocumentItemType | AccountingDocumentItemType | |||
| PaymentCardItem | ||||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| CashDiscountAmtInCoCodeCrcy | CashDiscountAmtInCoCodeCrcy | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | |||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | |||
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| FinancialAccountType | ||||
| ClearingJournalEntry | ClearingJournalEntry | |||
| ClearingJournalEntryFiscalYear | ClearingJournalEntryFiscalYear | |||
| AccountingDocumentType | AccountingDocumentType | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| AssignmentReference | AssignmentReference | |||
| CompanyCodeCurrency | _CompanyCode | Currency | ||
| DocumentDate | DocumentDate | |||
| DocumentItemText | DocumentItemText | |||
| InvoiceReference | ||||
| FollowOnDocumentType | ||||
| PostingDate | PostingDate | |||
| SpecialGLCode | ||||
| AccountingDocumentItemType | AccountingDocumentItemType | |||
| PaymentCardItem | PaymentCardItem | |||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| CashDiscountAmtInCoCodeCrcy | 0 | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | |||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | |||
| KEY | FiscalYear | FiscalYear | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | AccountingDocumentItem | AccountingDocumentItem | ||
| FinancialAccountType | ||||
| ClearingJournalEntry | ClearingJournalEntry | |||
| ClearingJournalEntryFiscalYear | ClearingJournalEntryFiscalYear | |||
| AccountingDocumentType | AccountingDocumentType | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| AssignmentReference | AssignmentReference | |||
| CompanyCodeCurrency | _CompanyCode | Currency | ||
| DocumentDate | DocumentDate | |||
| DocumentItemText | DocumentItemText | |||
| InvoiceReference | InvoiceReference | |||
| FollowOnDocumentType | FollowOnDocumentType | |||
| PostingDate | PostingDate | |||
| SpecialGLCode | ||||
| AccountingDocumentItemType | AccountingDocumentItemType | |||
| PaymentCardItem | PaymentCardItem | |||
| AmountInCompanyCodeCurrency | AmountInCompanyCodeCurrency | |||
| CashDiscountAmtInCoCodeCrcy | 0 | |||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | |||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | |||
| Account |
@AbapCatalog.sqlViewName: 'PCLRDITM1'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_ClearedItem1
as select from I_OperationalAcctgDocItem
{
key I_OperationalAcctgDocItem.CompanyCode,
key FiscalYear,
key AccountingDocument,
key AccountingDocumentItem,
FinancialAccountType,
ClearingJournalEntry,
ClearingJournalEntryFiscalYear,
AccountingDocumentType,
AccountingDocumentCategory,
AssignmentReference,
CompanyCodeCurrency,
DocumentDate,
DocumentItemText,
InvoiceReference,
FollowOnDocumentType,
PostingDate,
SpecialGLCode,
AccountingDocumentItemType,
PaymentCardItem,
AmountInCompanyCodeCurrency,
CashDiscountAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
cast(case
when FinancialAccountType = 'D' then
Customer
when FinancialAccountType = 'K' then
Supplier
when FinancialAccountType = 'S' then
GLAccount
else
''
end as konko) as Account
}
where
AccountingDocumentCategory <> 'M'
and AccountingDocumentCategory <> 'D'
and ClearingJournalEntry <> ''
and ClearingJournalEntryFiscalYear <> '0000'
and ReferenceDocumentType <> 'GLYEC'
and(
FinancialAccountType = 'D'
or FinancialAccountType = 'K'
or FinancialAccountType = 'S'
)
union all select from P_Bseg_Add
{
key P_Bseg_Add.CompanyCode,
key FiscalYear,
key AccountingDocument,
key AccountingDocumentItem,
FinancialAccountType,
ClearingJournalEntry,
ClearingJournalEntryFiscalYear,
AccountingDocumentType,
AccountingDocumentCategory,
AssignmentReference,
CompanyCodeCurrency,
DocumentDate,
DocumentItemText,
InvoiceReference,
FollowOnDocumentType,
PostingDate,
'' as SpecialGLCode,
AccountingDocumentItemType,
PaymentCardItem,
AmountInCompanyCodeCurrency,
0 as CashDiscountAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
cast (P_Bseg_Add.GLAccount as konko) as Account
}
where
AccountingDocumentCategory = 'L'
and ClearingJournalEntry <> ''
and ClearingJournalEntryFiscalYear <> '0000'
and ReferenceDocumentType <> 'GLYEC'
and(
FinancialAccountType = 'S'
)
union all select from P_ARLineItem_7
{
key CompanyCode,
key FiscalYear,
key AccountingDocument,
key AccountingDocumentItem,
'D' as FinancialAccountType,
ClearingAccountingDocument as ClearingJournalEntry,
ClearingDocFiscalYear as ClearingJournalEntryFiscalYear,
AccountingDocumentType,
cast(AccountingDocumentCategory as fis_bstat) as AccountingDocumentCategory,
AssignmentReference,
_CompanyCode.Currency as CompanyCodeCurrency,
DocumentDate,
DocumentItemText,
InvoiceReference,
FollowOnDocumentType,
PostingDate,
SpecialGLCode,
AccountingDocumentItemType,
PaymentCardItem,
AmountInCompanyCodeCurrency,
CashDiscountAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
cast( Debtor as konko ) as Account
}
where
ClearingDocFiscalYear <> '0000'
union all select from P_APLineItem_7
{
key CompanyCode,
key FiscalYear,
key AccountingDocument,
key AccountingDocumentItem,
'K' as FinancialAccountType,
ClearingAccountingDocument as ClearingJournalEntry,
ClearingDocFiscalYear as ClearingJournalEntryFiscalYear,
AccountingDocumentType,
cast(AccountingDocumentCategory as fis_bstat) as AccountingDocumentCategory,
AssignmentReference,
_CompanyCode.Currency as CompanyCodeCurrency,
DocumentDate,
DocumentItemText,
InvoiceReference,
FollowOnDocumentType,
PostingDate,
SpecialGLCode,
AccountingDocumentItemType,
'000' as PaymentCardItem,
AmountInCompanyCodeCurrency,
CashDiscountAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
cast( Supplier as konko ) as Account
}
where
ClearingDocFiscalYear <> '0000'
union all select from P_BSAS_BCK
{
key CompanyCode,
key FiscalYear,
key AccountingDocument,
key AccountingDocumentItem,
'S' as FinancialAccountType,
ClearingJournalEntry,
ClearingJournalEntryFiscalYear,
AccountingDocumentType,
AccountingDocumentCategory,
AssignmentReference,
_CompanyCode.Currency as CompanyCodeCurrency,
DocumentDate,
DocumentItemText,
'' as InvoiceReference,
'' as FollowOnDocumentType,
PostingDate,
'' as SpecialGLCode,
AccountingDocumentItemType,
PaymentCardItem,
AmountInCompanyCodeCurrency,
0 as CashDiscountAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
cast( GLAccount as konko ) as Account
}
where
ClearingJournalEntryFiscalYear <> '0000'
union all select from P_FAGLBSAS_BCK
{
key CompanyCode,
key FiscalYear,
key AccountingDocument,
key AccountingDocumentItem,
'S' as FinancialAccountType,
ClearingJournalEntry,
ClearingJournalEntryFiscalYear,
AccountingDocumentType,
AccountingDocumentCategory,
AssignmentReference,
_CompanyCode.Currency as CompanyCodeCurrency,
DocumentDate,
DocumentItemText,
InvoiceReference,
FollowOnDocumentType,
PostingDate,
'' as SpecialGLCode,
AccountingDocumentItemType,
PaymentCardItem,
AmountInCompanyCodeCurrency,
0 as CashDiscountAmtInCoCodeCrcy,
AmountInAdditionalCurrency1,
AmountInAdditionalCurrency2,
cast( GLAccount as konko ) as Account
}
where
ClearingJournalEntryFiscalYear <> '0000'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_OPERATIONALACCTGDOCITEM",
"P_APLINEITEM_7",
"P_ARLINEITEM_7",
"P_BSAS_BCK",
"P_BSEG_ADD",
"P_FAGLBSAS_BCK"
],
"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