P_RetsMgmtProcessItemExec2 is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (msr_d_executed) and exposes 15 fields with key fields RetsMgmtProcess, RetsMgmtProcessItem. It has 1 association to related views.
@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel.usageType.dataClass: #TRANSACTIONAL@ObjectModel.usageType.serviceQuality: #C@ObjectModel.usageType.sizeCategory: #L@VDM.private: true@VDM.viewType: #BASIC@AccessControl.authorizationCheck:#NOT_REQUIRED@AbapCatalog.sqlViewName: 'PRMRTSITMEXEC2'
defineview P_RetsMgmtProcessItemExec2
asselectfrom msr_d_executed
as CompnCntrl
association[0..1] to I_ReturnsRefundType
as _ReturnsRefundType
on $projection.ReturnsRefundType = _ReturnsRefundType.ReturnsRefundType
association[0..1] to I_ReturnsRefundProcgModeActive
as _ReturnsRefundProcgMode
on $projection.ReturnsRefundProcgMode = _ReturnsRefundProcgMode.ReturnsRefundProcgMode
and $projection.ReturnsRefundType = _ReturnsRefundProcgMode.ReturnsRefundType
association[0..1] to I_ReturnsRefundExtent
as _ReturnsRefundExtent
on $projection.ReturnsRefundExtent = _ReturnsRefundExtent.ReturnsRefundExtent
association [0..1] to I_UnitOfMeasure
as _ReplacementMaterialQtyUnit
on $projection.ReplacementMaterialQtyUnit = _ReplacementMaterialQtyUnit.UnitOfMeasure
{
//Keykey CompnCntrl.msr_id as RetsMgmtProcess,
key CompnCntrl.item as RetsMgmtProcessItem,
//Compensation Control
CompnCntrl.split_id,
CompnCntrl.refund_type as ReturnsRefundType,
cast (CompnCntrl.refund_control as returns_refund_procg_mode) as ReturnsRefundProcgMode,
cast (CompnCntrl.refund_code as returns_refund_extent) as ReturnsRefundExtent,
CompnCntrl.executed_step_id as CuRtStep,
CompnCntrl.doc_type as CuRtDocType,
//Replacement Material
CompnCntrl.replace_matnr as ReplacementMaterial,
@DefaultAggregation: #SUM@Semantics.quantity.unitOfMeasure: 'ReplacementMaterialQtyUnit'
CompnCntrl.replace_qty as ReplacementMaterialQuantity,
@Semantics.unitOfMeasure: true@ObjectModel.foreignKey.association: '_ReplacementMaterialQtyUnit'
CompnCntrl.replace_unit as ReplacementMaterialQtyUnit,
//Associations
_ReturnsRefundType,
_ReturnsRefundProcgMode,
_ReturnsRefundExtent,
_ReplacementMaterialQtyUnit
}
where CompnCntrl.executed_step_id = '0001' --Return Orderand CompnCntrl.doc_type = '00'
and CompnCntrl.doc_status = ' ' --active
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"MSR_D_EXECUTED"
],
"ASSOCIATED":
[
"I_RETURNSREFUNDEXTENT",
"I_RETURNSREFUNDPROCGMODEACTIVE",
"I_RETURNSREFUNDTYPE",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/