P_SlsOrdProcFlowM1
P_SlsOrdProcFlowM1 is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_SDDocumentProcessFlow) and exposes 7 fields with key fields LevelM1Document, SalesOrder.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_SDDocumentProcessFlow | LevelM1 | inner |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | PSLSORDPROCFM1 | view | |
| AbapCatalog.preserveKey | true | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | LevelM1Document | PrecedingDocument | ||
| KEY | SalesOrder | SalesOrder | ||
| SalesOrderType | SalesOrderType | |||
| SalesOrderCategory | SalesOrderCategory | |||
| SalesOrganization | SalesOrganization | |||
| DistributionChannel | DistributionChannel | |||
| OrganizationDivision | OrganizationDivision |
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PSLSORDPROCFM1'
@AbapCatalog.preserveKey:true
define view P_SlsOrdProcFlowM1
as select distinct from P_SlsOrdProcFlow0 as Level0 --> Level 0
inner join I_SDDocumentProcessFlow as LevelM1 --> Level Minus1
on Level0.SalesOrder = LevelM1.SubsequentDocument
and( LevelM1.PrecedingDocumentCategory = 'C' --> Order
or LevelM1.PrecedingDocumentCategory = 'B' --> Quote
or LevelM1.PrecedingDocumentCategory = 'H' --> Returns
or LevelM1.PrecedingDocumentCategory = 'G' --> Contract
or LevelM1.PrecedingDocumentCategory = 'SOLO'--> Solution Order
)
{
//Key
key PrecedingDocument as LevelM1Document,
key case
when PrecedingDocumentCategory = 'C'
then 'CREF' --> allow assignmet to 'Reference' lane
when PrecedingDocumentCategory = 'H'
then 'HREF' --> allow assignmet to 'Reference' lane
else
PrecedingDocumentCategory
end as LevelM1DocumentCategory,
//SalesOrder
key SalesOrder,
SalesOrderType,
//Category
SalesOrderCategory,
//Organization
SalesOrganization,
DistributionChannel,
OrganizationDivision
}
where Level0.SalesOrderCategory = 'C' --> Order
or Level0.SalesOrderCategory = 'I' --> Order w/o charge
or Level0.SalesOrderCategory = 'ICSO' --> Intercompany Sales Order
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SDDOCUMENTPROCESSFLOW",
"P_SLSORDPROCFLOW0"
],
"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