P_RU_DSVATReportingExclSubmd
P_RU_DSVATReportingExclSubmd is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_StRpRepRun, I_RU_StRpJournalEntryLog, I_StRpRepRun) and exposes 12 fields.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_StRpRepRun | CurrentRun | from |
| I_RU_StRpJournalEntryLog | SubmittedDoc | inner |
| I_StRpRepRun | SubmittedRun | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | PRUDSVATRPTGEXS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| CompanyCode | I_RU_StRpJournalEntryLog | CompanyCode | ||
| AccountingDocument | I_RU_StRpJournalEntryLog | AccountingDocument | ||
| FiscalYear | I_RU_StRpJournalEntryLog | FiscalYear | ||
| TaxItem | I_RU_StRpJournalEntryLog | TaxItem | ||
| RevisionNumber | I_RU_StRpJournalEntryLog | RevisionNumber | ||
| RU_VATReturnSectionType | I_RU_StRpJournalEntryLog | RU_VATReturnSectionType | ||
| StatryRptgEntity | I_StRpRepRun | StatryRptgEntity | ||
| StatryRptCategory | I_StRpRepRun | StatryRptCategory | ||
| SubmittedStatryRptRunID | I_StRpRepRun | StatryRptRunID | ||
| SubmittedStatryRptRunType | I_StRpRepRun | StatryRptRunType | ||
| CurrentStatryRptRunID | I_StRpRepRun | StatryRptRunID | ||
| CurrentStatryRptRunType | I_StRpRepRun | StatryRptRunType |
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PRUDSVATRPTGEXS'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RU_DSVATReportingExclSubmd
as select from I_StRpRepRun as CurrentRun
inner join I_StRpRepRun as SubmittedRun on SubmittedRun.StatryRptgEntity = CurrentRun.StatryRptgEntity
and SubmittedRun.StatryRptCategory = CurrentRun.StatryRptCategory
and SubmittedRun.StatryRptRunStatus = 'SOK'
inner join I_RU_StRpJournalEntryLog as SubmittedDoc on SubmittedDoc.StatryRptgEntity = SubmittedRun.StatryRptgEntity
and SubmittedDoc.StatryRptCategory = SubmittedRun.StatryRptCategory
and SubmittedDoc.StatryRptRunID = SubmittedRun.StatryRptRunID
{
SubmittedDoc.CompanyCode,
SubmittedDoc.AccountingDocument,
SubmittedDoc.FiscalYear,
SubmittedDoc.TaxItem,
SubmittedDoc.RevisionNumber,
SubmittedDoc.RU_VATReturnSectionType,
SubmittedRun.StatryRptgEntity,
SubmittedRun.StatryRptCategory,
SubmittedRun.StatryRptRunID as SubmittedStatryRptRunID,
SubmittedRun.StatryRptRunType as SubmittedStatryRptRunType,
CurrentRun.StatryRptRunID as CurrentStatryRptRunID,
CurrentRun.StatryRptRunType as CurrentStatryRptRunType
}
where
//default rule: submitted documents in previous periods
SubmittedRun.StatryRptTaskUUID <> CurrentRun.StatryRptTaskUUID
//for SPLedgers: all submitted documents
or SubmittedRun.StatryRptCategory = 'RU_SALES_LEDGER'
or SubmittedRun.StatryRptCategory = 'RU_PURCHASE_LEDGER'
//for 8/9 sections of VAT Return: submitted documents in previous periods + for ACORR phase: submitted documents in STAND/CORR phases of current period
or SubmittedRun.StatryRptCategory = 'RU_VAT_DCL'
and(
SubmittedDoc.RU_VATReturnSectionType = '8'
or SubmittedDoc.RU_VATReturnSectionType = '9'
)
and CurrentRun.StatryRptRunType = 'ACORR' //correction phase
and SubmittedRun.StatryRptRunType <> 'ACORR' //stadard or additional phase
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_RU_STRPJOURNALENTRYLOG",
"I_STRPREPRUN"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
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