P_RevRecgnSalesOrderVH
Sales Document Value Help
P_RevRecgnSalesOrderVH is a Consumption CDS View that provides data about "Sales Document Value Help" in SAP S/4HANA. It reads from 5 data sources (P_SDItemCategory, I_SalesOrganization, I_ResultsAnalysisKey, I_SalesDocumentBasic, I_SalesDocumentItem) and exposes 6 fields with key field SalesOrder. Part of development package FINS_REV_REC_UI_SO.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| P_SDItemCategory | ItemCategories | inner |
| I_SalesOrganization | so | inner |
| I_ResultsAnalysisKey | tkkaa | inner |
| I_SalesDocumentBasic | vbak | from |
| I_SalesDocumentItem | vbap | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ObjectModel.representativeKey | SalesOrder | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (6)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesOrder | I_SalesDocumentBasic | SalesDocument | |
| CompanyCode | I_SalesOrganization | CompanyCode | ||
| SalesOrganization | I_SalesDocumentBasic | SalesOrganization | ||
| OrganizationDivision | I_SalesDocumentBasic | OrganizationDivision | ||
| SalesOrderType | I_SalesDocumentBasic | SalesDocumentType | ||
| DistributionChannel | I_SalesDocumentBasic | DistributionChannel |
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@ObjectModel.representativeKey: 'SalesOrder'
//@Analytics.technicalName: 'PREVRECSALORDVH'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #L
define view entity P_RevRecgnSalesOrderVH
as select from I_SalesDocumentBasic as vbak
inner join I_SalesDocumentItem as vbap on vbap.SalesDocument = vbak.SalesDocument
inner join P_SDItemCategory as ItemCategories on vbap.SalesDocumentItemCategory = ItemCategories.Pstyv
inner join I_ResultsAnalysisKey as tkkaa on tkkaa.ResultAnalysisInternalID = vbap.ResultAnalysisInternalID
inner join I_SalesOrganization as so on so.SalesOrganization = vbak.SalesOrganization
// inner join acdoca as acdoca on acdoca.kdauf = vbak.vbeln
{
key vbak.SalesDocument as SalesOrder,
so.CompanyCode as CompanyCode,
vbak.SalesOrganization as SalesOrganization,
// acdoca.rldnr as Ledger,
vbak.OrganizationDivision as OrganizationDivision,
vbak.SalesDocumentType as SalesOrderType,
vbak.DistributionChannel as DistributionChannel
}
where
vbap.ResultAnalysisInternalID <> ' '
and tkkaa.RsltIsForEvtBsdRevnRecognition = 'X'
and(
vbak.SDDocumentCategory = 'C'
or vbak.SDDocumentCategory = 'H'
)
// and(
// vbap.pstyv = 'TAN'
// or vbap.pstyv = 'TANN'
// or vbap.pstyv = 'CBEN'
// or vbap.pstyv = 'CB1'
// or vbap.pstyv = 'CB2'
// or vbap.pstyv = 'CBTC'
// or vbap.pstyv = 'TAD'
// or vbap.pstyv = 'CB1C'
// or vbap.pstyv = 'CB2C'
// or vbap.pstyv = 'TAQ'
// or vbap.pstyv = 'CBXN'
// or vbap.pstyv = 'CPHD'
// or vbap.pstyv = 'CBIC'
// )
and(
vbap.ItemIsBillingRelevant = 'A'
or vbap.ItemIsBillingRelevant = 'B'
or vbap.ItemIsBillingRelevant = 'F'
or vbap.ItemIsBillingRelevant = 'K'
or vbap.ItemIsBillingRelevant = 'Y'
)
// and(
// vbap.kzvbr = ' '
// or vbap.kzvbr = 'V'
// )
group by
vbak.SalesDocument,
so.CompanyCode,
vbak.SalesOrganization,
vbak.OrganizationDivision,
vbak.SalesDocumentType,
vbak.DistributionChannel
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