P_CLEAREDITEM1
Cleared Item 1
P_CLEAREDITEM1 is a CDS View in S/4HANA. Cleared Item 1. It contains 21 fields. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_ClearedAccount1 | view | from | CONSUMPTION | P_ClearedAccount1 |
| P_ClearedItem2 | view | inner | CONSUMPTION | Cleared Item 2 |
| P_ClearingDocument | view | inner | CONSUMPTION | Helper View |
Fields (21)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | 1 |
| KEY | AccountingDocumentItem | AccountingDocumentItem | 1 |
| KEY | CompanyCode | CompanyCode | 1 |
| KEY | FinancialAccountType | FinancialAccountType | 1 |
| KEY | FiscalYear | FiscalYear | 1 |
| Account | Account | 1 | |
| AccountingDocumentCategory | AccountingDocumentCategory | 1 | |
| AccountingDocumentType | AccountingDocumentType | 1 | |
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | 1 | |
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | 1 | |
| AssignmentReference | AssignmentReference | 1 | |
| ClearingJournalEntry | ClearingJournalEntry | 1 | |
| ClearingJournalEntryFiscalYear | ClearingJournalEntryFiscalYear | 1 | |
| CompanyCodeCurrency | CompanyCodeCurrency | 1 | |
| DocumentDate | DocumentDate | 1 | |
| DocumentItemText | DocumentItemText | 1 | |
| FollowOnDocumentType | FollowOnDocumentType | 1 | |
| InvoiceReference | InvoiceReference | 1 | |
| PaymentCardItem | PaymentCardItem | 1 | |
| PostingDate | PostingDate | 1 | |
| SpecialGLCode | SpecialGLCode | 1 |
@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'