P_ChmlCmplncReqMigration
P_ChmlCmplncReqMigration is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncReq, I_ChmlCmplncReq) and exposes 14 fields with key field ChmlCmplncRequestUUID.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_ChmlCmplncReq | _ChmlCmplncReqSell | inner |
| I_ChmlCmplncReq | ChmlCmplncReqProduce | from |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCCMPLCNREQMIG | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ChmlCmplncRequestUUID | I_ChmlCmplncReq | ChmlCmplncRequestUUID | |
| ChmlCmplncReqCmplncProc | I_ChmlCmplncReq | ChmlCmplncReqCmplncProc | ||
| ChmlCmplncRequestOriginType | I_ChmlCmplncReq | ChmlCmplncRequestOriginType | ||
| ChmlCmplncReqOriginProc | I_ChmlCmplncReq | ChmlCmplncReqOriginProc | ||
| ChmlCmplncRequestPrgrsStatus | I_ChmlCmplncReq | ChmlCmplncRequestPrgrsStatus | ||
| ChmlCmplncBusinessProcess | I_ChmlCmplncReq | ChmlCmplncBusinessProcess | ||
| Material | I_ChmlCmplncReq | Material | ||
| ChmlCmplncInfoType | ||||
| ChmlCmplncInfoUUID | I_ChmlCmplncReq | ChmlCmplncInfoUUID | ||
| ChmlCmplncProdUUID | I_ChmlCmplncReq | ChmlCmplncProdUUID | ||
| CreationUTCDateTime | I_ChmlCmplncReq | CreationUTCDateTime | ||
| CreatedByUser | I_ChmlCmplncReq | CreatedByUser | ||
| LastChangeUTCDateTime | I_ChmlCmplncReq | LastChangeUTCDateTime | ||
| LastChangedByUser | I_ChmlCmplncReq | LastChangedByUser |
@AbapCatalog.sqlViewName: 'PCCMPLCNREQMIG'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ObjectModel:
{
usageType:
{
dataClass: #MASTER,
sizeCategory: #M,
serviceQuality: #B
}
}
@VDM.viewType: #COMPOSITE
@VDM.private: true
-------------------------------------------------------------
-- IMPORTANT: View may not be changed after initial delivery!
-------------------------------------------------------------
define view P_ChmlCmplncReqMigration
as select from I_ChmlCmplncReq as ChmlCmplncReqProduce
inner join I_ChmlCmplncReq as _ChmlCmplncReqSell on _ChmlCmplncReqSell.Material = ChmlCmplncReqProduce.Material
and _ChmlCmplncReqSell.ChmlCmplncReqCmplncProc = ChmlCmplncReqProduce.ChmlCmplncReqCmplncProc
and _ChmlCmplncReqSell.ChmlCmplncRequestOriginType = ChmlCmplncReqProduce.ChmlCmplncRequestOriginType
and _ChmlCmplncReqSell.ChmlCmplncBusinessProcess = 'SELL'
-- if corresponding "sell in" request is closed, close corresponding "produce in" request must be closed
and _ChmlCmplncReqSell.ChmlCmplncRequestPrgrsStatus = 'CLOSED'
{
key ChmlCmplncReqProduce.ChmlCmplncRequestUUID,
ChmlCmplncReqProduce.ChmlCmplncReqCmplncProc,
ChmlCmplncReqProduce.ChmlCmplncRequestOriginType,
ChmlCmplncReqProduce.ChmlCmplncReqOriginProc,
ChmlCmplncReqProduce.ChmlCmplncRequestPrgrsStatus,
ChmlCmplncReqProduce.ChmlCmplncBusinessProcess,
ChmlCmplncReqProduce.Material,
ChmlCmplncReqProduce._ChmlCmplncInfo.ChmlCmplncInfoType,
case
when ChmlCmplncReqProduce._ChmlCmplncInfo.ChmlCmplncInfoType = 'PP'
and ( ChmlCmplncReqProduce.ChmlCmplncRequestPrgrsStatus = 'NEW' or ChmlCmplncReqProduce.ChmlCmplncRequestPrgrsStatus = 'INPROG' )
then '00' -- not yet executed
else '01' -- Migration not needed/ already done
end as StatusField,
ChmlCmplncReqProduce.ChmlCmplncInfoUUID,
ChmlCmplncReqProduce.ChmlCmplncProdUUID,
ChmlCmplncReqProduce.CreationUTCDateTime,
ChmlCmplncReqProduce.CreatedByUser,
ChmlCmplncReqProduce.LastChangeUTCDateTime,
ChmlCmplncReqProduce.LastChangedByUser
}
where
ChmlCmplncReqProduce._ChmlCmplncInfo.ChmlCmplncInfoType = 'PP'
and ChmlCmplncReqProduce.ChmlCmplncReqCmplncProc = 'PMA'
and ChmlCmplncReqProduce.ChmlCmplncRequestOriginType = 'MM'
and ChmlCmplncReqProduce.ChmlCmplncBusinessProcess = 'PRODUCE'
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