P_RO_SAFTPaymentDocument
P_RO_SAFTPaymentDocument is a Consumption CDS View in SAP S/4HANA. It reads from 4 data sources (I_JournalEntryItem, I_JournalEntryItem, I_RO_SAFTPaymentMapping, I_RO_SAFTPaymentMapping) and exposes 14 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, Ledger.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_JournalEntryItem | Document | inner |
| I_JournalEntryItem | Document | inner |
| I_RO_SAFTPaymentMapping | PayMap | from |
| I_RO_SAFTPaymentMapping | PayMap | union_all |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_AlternativeGLAccountIsUsed | saft_ro_alt_gl_account_flag |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PROSAFTPAYD | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLedger | I_JournalEntryItem | SourceLedger | |
| KEY | CompanyCode | I_JournalEntryItem | CompanyCode | |
| KEY | FiscalYear | I_JournalEntryItem | FiscalYear | |
| KEY | AccountingDocument | I_JournalEntryItem | AccountingDocument | |
| KEY | Ledger | I_JournalEntryItem | Ledger | |
| KEY | PostingDate | I_JournalEntryItem | PostingDate | |
| SourceLedger | ||||
| KEY | CompanyCode | I_JournalEntryItem | CompanyCode | |
| KEY | FiscalYear | I_JournalEntryItem | FiscalYear | |
| KEY | AccountingDocument | I_JournalEntryItem | AccountingDocument | |
| KEY | Ledger | I_JournalEntryItem | Ledger | |
| KEY | PostingDate | I_JournalEntryItem | PostingDate | |
| KEY | AccountIsMatched | |||
| AccountingDocumentCategory | I_JournalEntryItem | AccountingDocumentCategory |
@AbapCatalog.sqlViewName: 'PROSAFTPAYD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.viewType: #CONSUMPTION
@VDM.private:true
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.authorizationCheck: #NOT_REQUIRED
//UNUSED
define view P_RO_SAFTPaymentDocument
with parameters
P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag
as select from I_RO_SAFTPaymentMapping as PayMap
inner join I_JournalEntryItem as Document on PayMap.CompanyCode = Document.CompanyCode
and PayMap.AccountingDocumentType = Document.AccountingDocumentType
and PayMap.GLAccount = Document.GLAccount
{
key Document.SourceLedger,
key Document.CompanyCode,
key Document.FiscalYear,
key Document.AccountingDocument,
key Document.Ledger,
key Document.PostingDate,
key case $parameters.P_AlternativeGLAccountIsUsed
when 'X' then ''
else 'X'
end as AccountIsMatched,
Document.AccountingDocumentCategory
}
where
PayMap.GLAccount <> ''
group by
Document.SourceLedger,
Document.Ledger,
Document.CompanyCode,
Document.FiscalYear,
Document.AccountingDocument,
Document.PostingDate,
Document.AccountingDocumentCategory
union all select from I_RO_SAFTPaymentMapping as PayMap
inner join I_JournalEntryItem as Document on PayMap.CompanyCode = Document.CompanyCode
and PayMap.AccountingDocumentType = Document.AccountingDocumentType
and PayMap.GLAccount = Document.AlternativeGLAccount
{
key Document.SourceLedger,
key Document.CompanyCode,
key Document.FiscalYear,
key Document.AccountingDocument,
key Document.Ledger,
key Document.PostingDate,
key $parameters.P_AlternativeGLAccountIsUsed as AccountIsMatched,
Document.AccountingDocumentCategory
}
where
Document.AlternativeGLAccount <> '' and
PayMap.GLAccount <> ''
group by
Document.SourceLedger,
Document.Ledger,
Document.CompanyCode,
Document.FiscalYear,
Document.AccountingDocument,
Document.PostingDate,
Document.AccountingDocumentCategory
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRYITEM",
"I_RO_SAFTPAYMENTMAPPING"
],
"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