P_CustRetProcFlowM1
Customer Return Process Flow: Level -1 Sales & Distribution
P_CustRetProcFlowM1 is a Consumption CDS View that provides data about "Customer Return Process Flow: Level -1 Sales & Distribution" in SAP S/4HANA. It reads from 3 data sources (P_CustRetProcFlowMIHR, I_SDDocumentProcessFlow, P_CustRetProcFlowMIHR) and exposes 14 fields with key fields LevelM1Document, CustomerReturn, CustomerReturn. Part of development package ODATA_SD_CRET_PROCESSFLOW.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_CustRetProcFlowMIHR | LevelM1 | from |
| I_SDDocumentProcessFlow | LevelM1 | inner |
| P_CustRetProcFlowMIHR | LevelM1 | union_all |
Annotations (8)
| 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 | PCUSTRETPROCFM1 | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | LevelM1Document | P_CustRetProcFlowMIHR | PrecedingDocument | |
| KEY | CustomerReturn | CustomerReturn | ||
| CustomerReturnType | Level0 | CustomerReturnType | ||
| SDDocumentCategory | Level0 | SDDocumentCategory | ||
| SalesOrganization | Level0 | SalesOrganization | ||
| DistributionChannel | Level0 | DistributionChannel | ||
| PrecedingDocumentasLevelM1Document | ||||
| KEY | CustomerReturn | CustomerReturn | ||
| LevelM1DocumentCategory | P_CustRetProcFlowMIHR | PrecedingDocumentCategory | ||
| CustomerReturnType | P_CustRetProcFlowMIHR | CustomerReturnType | ||
| SDDocumentCategory | P_CustRetProcFlowMIHR | SDDocumentCategory | ||
| SalesOrganization | P_CustRetProcFlowMIHR | SalesOrganization | ||
| DistributionChannel | P_CustRetProcFlowMIHR | DistributionChannel | ||
| OrganizationDivision | P_CustRetProcFlowMIHR | 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: 'PCUSTRETPROCFM1'
define view P_CustRetProcFlowM1 as
select distinct from P_CustRetProcFlow0 as Level0 --- focus process step, level 0
inner join I_SDDocumentProcessFlow as LevelM1 --- preceding process step, level minus 1
on Level0.CustomerReturn = LevelM1.SubsequentDocument
and ( LevelM1.PrecedingDocumentCategory = 'C' --- Sales Order
or LevelM1.PrecedingDocumentCategory = 'M' --- Customer Invoice
or LevelM1.PrecedingDocumentCategory = 'I' ) --- Sales Order free of Charge
{
//Key
key LevelM1.PrecedingDocument as LevelM1Document,
//Customer Return,
key CustomerReturn,
//Category
case
when LevelM1.PrecedingDocumentCategory = 'M'
then 'MREF' --> allow assignmet to 'Reference' lane
when PrecedingDocumentCategory = 'I'
then 'IREF' --> allow assignmet to 'Reference' lane
else
LevelM1.PrecedingDocumentCategory
end as LevelM1DocumentCategory,
Level0.CustomerReturnType,
Level0.SDDocumentCategory,
//Organization
Level0.SalesOrganization,
Level0.DistributionChannel,
Level0.OrganizationDivision
}
union all
select from P_CustRetProcFlowMIHR as LevelM1
{
key LevelM1.PrecedingDocument as LevelM1Document,
key CustomerReturn,
LevelM1.PrecedingDocumentCategory as LevelM1DocumentCategory,
LevelM1.CustomerReturnType,
LevelM1.SDDocumentCategory,
//Organization
LevelM1.SalesOrganization,
LevelM1.DistributionChannel,
LevelM1.OrganizationDivision
}
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