@AbapCatalog.sqlViewName: 'CCHGRECREFROU'
@EndUserText.label: 'Change Record Object Page Routing'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType: {serviceQuality: #C,
dataClass: #MIXED,
sizeCategory: #L}
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel: {
semanticKey: ['BillOfOperationsType','BillOfOperationsGroup','BillOfOperationsVariant','BillOfOperationsVersion'],
createEnabled: true,
deleteEnabled,
updateEnabled:'EXTERNAL_CALCULATION' ,
transactionalProcessingDelegated: true
}
@UI.headerInfo:{
typeName: 'Shop Floor Routing',
typeNamePlural: 'Shop Floor Routings',
imageUrl: 'ChangeRecordRefObjIcon',
title:{value:'BillOfOperationsGroup'}
}
@UI.presentationVariant.requestAtLeast: ['BillOfOperationsGroup','BillOfOperationsType','BillOfOperationsVariant','BillOfOperationsVersion','Plant','ChangeRecordType','ChangeRecordReferenceType']
define view C_ChangeRecordObjPgRouting
as select from I_ChgRecdRefRoutingTP as ChangeRecordReferenceRTGTP
association [1..1] to I_BillOfOperationsType as _BillOfOperationsTypeVH on $projection.BillOfOperationsType = _BillOfOperationsTypeVH.BillOfOperationsType
association [1..1] to I_BillOfOperationsVersion as _BillOfOperationsGroupVH on $projection.BillOfOperationsType = _BillOfOperationsGroupVH.BillOfOperationsType
and $projection.BillOfOperationsGroup = _BillOfOperationsGroupVH.BillOfOperationsGroup
and $projection.BillOfOperationsVariant = _BillOfOperationsGroupVH.BillOfOperationsVariant
and $projection.BillOfOperationsVersion = _BillOfOperationsGroupVH.BillOfOperationsVersion
association [0..*] to I_BOOMaterialAssgmtChangeState as _BOOMaterialAssgmtChangeState on $projection.BillOfOperationsType = _BOOMaterialAssgmtChangeState.BillOfOperationsType
and $projection.BillOfOperationsGroup = _BOOMaterialAssgmtChangeState.BillOfOperationsGroup
and $projection.BillOfOperationsVariant = _BOOMaterialAssgmtChangeState.BillOfOperationsVariant
and $projection.BillOfOperationsVersion = _BOOMaterialAssgmtChangeState.BillOfOperationsVersion
and _BOOMaterialAssgmtChangeState.SalesOrder <> ' '
association [1..1] to C_ChangeRecordItemRelRouVH as _ChangeRecordItemRelVH on $projection.ChangeRecordItemRelevance = _ChangeRecordItemRelVH.ChangeRecordItemRelevance
and $projection.ChangeRecordType = _ChangeRecordItemRelVH.ChangeRecordType
// and (
// $projection.ChangeRecordReferenceType = _ChangeRecordItemRelVH.ChangeRecordReferenceType
// or _ChangeRecordItemRelVH.ChangeRecordReferenceType = ' '
// )
association [1..1] to C_ChangeRecordObjPg as _ChangeRecordObjPg on $projection.ChangeRecordUUID = _ChangeRecordObjPg.ChangeRecordUUID
association [0..*] to I_ChangeRecordRefObjIcons as _ChangeRecordRefObjIcons on $projection.ChangeRecordUUID = _ChangeRecordRefObjIcons.ChangeRecordUUID
and $projection.ChangeRecordReferenceType = _ChangeRecordRefObjIcons.ChangeRecordReferenceType
association [1..1] to C_ChgRecordItemProcgStatusVH as _ProcessingStatusVH on $projection.ChangeRecordItemProcgStatus = _ProcessingStatusVH.ChgRecdNextItemProcgStatus
and $projection.ChgRecdCurrentItemProcgStatus = _ProcessingStatusVH.ChgRecdCurrentItemProcgStatus
and $projection.ChangeRecordLifecycleStatus = _ProcessingStatusVH.ChangeRecordLifecycleStatus
association [0..*] to I_ChgRecdItemProcgStatusText as _ProcessingStatusTxt on $projection.ChangeRecordItemProcgStatus = _ProcessingStatusTxt.ChangeRecordItemProcgStatus
association [0..*] to C_ChangeRecdDigSignStatusVH as _DigSignStatusText on $projection.ChgRecdItmDSgntr = _DigSignStatusText.ChgRecdDigitalSignatureStatus
{
@UI.hidden: true
@ObjectModel.readOnly: true
key ChangeRecordReferenceUUID,
@UI.hidden: true
@UI.lineItem:[
{ position:5,
importance:#HIGH }
]
@UI.identification: {position: 5, importance: #HIGH}
@Semantics.imageUrl: true
@ObjectModel.readOnly: true
@EndUserText.label: 'Icon'
_ChangeRecordRefObjIcons[ChangeRecordType = ChangeRecordType].ChangeRecordRefObjIcon as ChangeRecordRefObjIcon,
@UI.lineItem:[{
position:10,
//label: 'Bill Of Operations Group',
importance:#HIGH }
]
@UI.identification: {position: 10, importance: #HIGH}
//@ObjectModel.foreignKey.association: '_BillOfOperationsGroupVH'
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BillOfOperationsVersStdVH',
element: 'BillOfOperationsGroup' },
additionalBinding:[{ localElement: 'BillOfOperationsType',
element: 'BillOfOperationsType' },
{ localElement: 'BillOfOperationsVersion',
element: 'BillOfOperationsVersion' },
{ localElement: 'BillOfOperationsVariant',
element: 'BillOfOperationsVariant' }]
}]
cast (ChangeRecordReferenceRTGTP.BillOfOperationsGroup as mpe_rtg_routing_group preserving type ) as BillOfOperationsGroup,
@UI.lineItem:[{
position:15,
//label: 'Bill of Operation Type ',
importance:#HIGH }
]
@UI.identification: {position: 20, importance: #HIGH}
@ObjectModel.foreignKey.association: '_BillOfOperationsTypeVH'
ChangeRecordReferenceRTGTP.BillOfOperationsType,
@UI.lineItem:[{
position:25,
//label: 'Bill of Operation Variant ',
importance:#MEDIUM }
]
@UI.identification: {position: 30, importance: #MEDIUM } // label: 'Bill of Operation Variant'}
ChangeRecordReferenceRTGTP.BillOfOperationsVariant,
@UI.lineItem:[{
position:30,
//label: 'Bill of Operation Version ',
importance:#MEDIUM }
]
@UI.identification: {position: 40, importance: #MEDIUM } // label: 'Bill of Operation Version'}
ChangeRecordReferenceRTGTP.BillOfOperationsVersion,
@UI.hidden:true
@ObjectModel:{ readOnly:true, virtualElement: true, virtualElementCalculatedBy: 'ABAP:CL_CR_ROUTING_MATERIAL'}
cast ('' as matnr) as Material,
@UI.hidden:true
@ObjectModel:{ readOnly:true, virtualElement: true, virtualElementCalculatedBy: 'ABAP:CL_CR_ROUTING_MATERIAL'}
cast ('' as maktx) as MaterialDescription,
@UI.hidden:true
@ObjectModel:{ readOnly:true, virtualElement: true, virtualElementCalculatedBy: 'ABAP:CL_CR_ROUTING_MATERIAL'}
cast (0 as abap.int1 ) as NumberOfMaterials,
@UI.hidden: true
@ObjectModel.readOnly: true
@ObjectModel.foreignKey.association: '_ChangeRecordItemRelVH'
_ChangeRecordObjPg.ChangeRecordType as ChangeRecordType,
@UI.hidden: true
ChangeRecordUUID,
@UI.hidden: true
ChangeRecordReferenceType,
@UI.hidden: true
ParentChangeRecordRefUUID,
@UI.lineItem:[{
position:35,
importance:#MEDIUM }
]
@UI.identification: {position:50, importance: #MEDIUM}
@ObjectModel.foreignKey.association: '_ChangeRecordItemRelVH'
@Consumption.valueHelp: '_ChangeRecordItemRelVH'
@ObjectModel.mandatory: true
@UI.textArrangement: #TEXT_ONLY
ChangeRecordItemRelevance,
--Routing Status(Processing Status)
@ObjectModel.readOnly: true
@UI.lineItem:[{
position:40,
importance:#MEDIUM }
]
@UI.identification: {position:95, importance: #MEDIUM}
cast(_BillOfOperationsGroupVH._BOOVersionStatus._Text[1: Language=$session.system_language].BOOVersionStatusText as mpe_rtg_routing_status_text preserving type ) as BOOVersionStatusText,
@ObjectModel.readOnly: true
_BillOfOperationsGroupVH._BillOfOperations.RoutingIsReworkRouting as RoutingIsReworkRouting,
@ObjectModel.readOnly:true
@UI.lineItem: [{position:45, importance:#HIGH }]
@UI.identification: {position: 140, importance: #HIGH}
cast(_BOOMaterialAssgmtChangeState.SalesOrder as cs_vbeln preserving type ) as SalesOrder,
@ObjectModel.readOnly:true
@UI.lineItem: [{position:50, importance:#HIGH }]
@UI.identification: {position: 90, importance: #HIGH}
@EndUserText.label: 'Sales Order Item'
_BOOMaterialAssgmtChangeState.SalesOrderItem,
@UI.hidden: true
ChangeRecordReference,
@ObjectModel.readOnly:true
@UI.hidden: true
_ChangeRecordObjPg.ChgRecdItemProcgStatusIsEnbld,
@UI.hidden: true
@ObjectModel.readOnly: true
_ChangeRecordObjPg.ChangeRecordLifecycleStatus as ChangeRecordLifecycleStatus,
// @UI.hidden: true
// @ObjectModel.readOnly: true
// _ChangeRecordObjPg.ChangeRecordStatus,
@UI.lineItem:[ {position: 70, importance:#MEDIUM } ]
@UI.identification: [{position: 60, importance: #MEDIUM }]
@EndUserText.label: 'Processing Status'
@Consumption.valueHelpDefinition: [{association: '_ProcessingStatusVH'}]
@ObjectModel.foreignKey.association: '_ProcessingStatusVH'
@UI.textArrangement: #TEXT_FIRST
ChangeRecordItemProcgStatus,
@UI.hidden: true
@ObjectModel.readOnly: true
ChgRecdCurrentItemProcgStatus,
@UI.hidden: true
@UI.lineItem:[{hidden:true , importance:#MEDIUM} ]
@EndUserText.label: 'Digital Signature Status'
@ObjectModel.foreignKey.association: '_DigSignStatusText'
@Consumption: { valueHelp: '_DigSignStatusText' }
// @UI.identification: {position: 70, importance: #MEDIUM }
ChgRecdItmDSgntr,
@UI.lineItem:[{
hidden: true,
importance:#LOW }
]
@UI.hidden: true
@ObjectModel.readOnly: true
@ObjectModel.virtualElement : true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CR_I_DSGNTR_ENABLE'
cast( '' as boolean) as DigitalSignUserIsAuthorized,
@ObjectModel.readOnly: true
@UI.identification: [{importance: #LOW, position: 90 }]
@EndUserText.label: 'Digital Signature Status'
_DigSignStatusText.ChgRecdDigSignStatusTxt as ChgRecdDigSignStatusTxt,
@UI.lineItem:[{
hidden: true,
importance:#LOW }
]
@UI.hidden: true
@ObjectModel.readOnly: true
@ObjectModel.virtualElement : true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CR_I_DSGNTR_ENABLE'
cast( '' as boolean) as ChgRecdObjDgtlSgntrEnable,
@Semantics.user.createdBy: true
@UI.identification: {position:100, importance: #MEDIUM}
CreatedByUser,
@UI.hidden: true
CreationDateTime,
@ObjectModel.virtualElement : true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CR_CREATIONDATE_CONVERT'
@ObjectModel.readOnly: true
@UI.identification: {position:105, importance: #MEDIUM}
cast( '00000000' as /plmb/created_on ) as CreationDate,
@Semantics.user.lastChangedBy: true
@UI.identification: {position:110, importance: #MEDIUM}
LastChangedByUser,
@UI.hidden: true
LastChangeDateTime,
@ObjectModel.virtualElement : true
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CR_CHANGEDATE_CONVERT'
@ObjectModel.readOnly: true
@UI.identification: {position:115, importance: #MEDIUM}
cast( '00000000' as /plmb/changed_on ) as LastChangeDate,
@UI.identification: {position:120, importance: #MEDIUM}
ChgRecdReasonForChange,
@UI.identification: {position:125, importance: #MEDIUM}
ExpdCompltnDte,
@Consumption.valueHelpDefinition: [{ entity : { name : 'C_ChangeRecdAuthznGrpVH' , element: 'ChgRecdNmbrAuthznGrp'}}]
@UI.identification: {position:130, importance: #MEDIUM}
ChgRecdAuthznGrpText,
@Consumption.valueHelpDefinition: [{ entity : { name : 'C_ChgRecdChgNmbrStatusVH' , element: 'ChgRecdNmbrChgSts'}}]
@UI.identification: {position:135, importance: #MEDIUM}
ChgRecdNmbrChgSts,
@UI.lineItem:[{position:80,importance:#MEDIUM }]
@UI.identification: {position: 80, importance: #MEDIUM}
@ObjectModel.readOnly: true
@Consumption.semanticObject: 'ChangeMaster'
ChangeNumber,
@UI.hidden: true
ChangeRecordReferenceRTGTP.Plant,
@ObjectModel.association.type: [ #TO_COMPOSITION_ROOT,#TO_COMPOSITION_PARENT ]
_ChangeRecordObjPg,
_ChangeRecordItemRelVH,
_BillOfOperationsGroupVH,
_BillOfOperationsTypeVH,
_ProcessingStatusVH,
_ProcessingStatusTxt,
_DigSignStatusText
}
//where
//ChangeRecordReferenceRTGTP.OrderID = '' // Commented to display order-specific routings
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHANGERECDDIGSIGNSTATUSVH",
"C_CHANGERECORDOBJPG",
"I_BILLOFOPERATIONS",
"I_BILLOFOPERATIONSVERSION",
"I_BOOMATERIALASSGMTCHANGESTATE",
"I_BOOVERSIONSTATUS",
"I_BOOVERSIONSTATUSTEXT",
"I_CHANGERECORDREFOBJICONS",
"I_CHGRECDREFROUTINGTP"
],
"ASSOCIATED":
[
"C_CHANGERECDDIGSIGNSTATUSVH",
"C_CHANGERECORDITEMRELROUVH",
"C_CHANGERECORDOBJPG",
"C_CHGRECORDITEMPROCGSTATUSVH",
"I_BILLOFOPERATIONSTYPE",
"I_BILLOFOPERATIONSVERSION",
"I_BOOMATERIALASSGMTCHANGESTATE",
"I_CHANGERECORDREFOBJICONS",
"I_CHGRECDITEMPROCGSTATUSTEXT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/