@AbapCatalog.sqlViewName: 'CCHGRCDOBJPGDOC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Change Record Reference Object Document'
@VDM.viewType: #CONSUMPTION
@AccessControl.personalData.blocking:#BLOCKED_DATA_EXCLUDED
@ObjectModel: {
semanticKey: ['DocumentType','DocumentInfoRecord','DocumentVersion','DocumentPart'],
createEnabled: true,
deleteEnabled,
updateEnabled:'EXTERNAL_CALCULATION',
transactionalProcessingDelegated: true
}
@UI.headerInfo:{
typeName: 'Document',
typeNamePlural: 'Documents',
imageUrl: 'ProductImageURL',
title:{value:'DocumentDescription'}
}
@ObjectModel.usageType: {serviceQuality: #C,
dataClass: #MIXED,
sizeCategory: #L}
@ClientHandling.algorithm: #SESSION_VARIABLE
@UI.presentationVariant.requestAtLeast: [ 'ChangeRecordType', 'ChangeRecordReferenceType' ]
define view C_ChangeRecordObjPgDoc
as select from I_ChangeRecordReferenceDOCTP as ChangeRecordReferenceDocTP
association [1..1] to C_ChangeRecordObjPg as _ChangeRecordObjPg on $projection.ChangeRecordUUID = _ChangeRecordObjPg.ChangeRecordUUID
association [1..1] to C_ChangeRecordItemRelDocVH as _ChangeRecordItemRelDocVH on $projection.ChangeRecordItemRelevance = _ChangeRecordItemRelDocVH.ChangeRecordItemRelevance
and $projection.ChangeRecordType = _ChangeRecordItemRelDocVH.ChangeRecordType
//and
// or $projection.ChangeRecordReferenceType = _ChangeRecordItemRelDocVH.ChangeRecordReferenceType
//or $projection.ChangeRecordReferenceType = '' //_ChangeRecordItemRelDocVH.ChangeRecordReferenceType
association [0..1] to I_ChangeRecordDocStatus as _ChangeRecordDocStatus on $projection.DocumentType = _ChangeRecordDocStatus.DocumentType
and $projection.DocumentInfoRecord = _ChangeRecordDocStatus.DocumentInfoRecord
and $projection.DocumentVersion = _ChangeRecordDocStatus.DocumentVersion
and $projection.DocumentPart = _ChangeRecordDocStatus.DocumentPart
--Get Document Type Association
association [1..1] to I_DocumentInfoRecordDocType as _DocumentType on $projection.DocumentType = _DocumentType.DocumentInfoRecordDocType
--Get Document Part Association
association [1..1] to I_ChangeRecordDocPart as _DocumentPart on $projection.DocumentType = _DocumentPart.DocumentType
and $projection.DocumentPart = _DocumentPart.DocumentPart
and $projection.DocumentInfoRecord = _DocumentPart.DocumentInfoRecord
and $projection.DocumentVersion = _DocumentPart.DocumentVersion
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.facet: [
// ----Facets
// {type: #COLLECTION, position: 10, id: 'DOCInfo', label: 'Documents Information'},
// {type: #IDENTIFICATION_REFERENCE, position: 10, id: 'DOCRef', parentId: 'DOCInfo', isSummary, isPartOfPreview },
// ----Facets: Attachments
// {type: #COLLECTION, position: 10, id: 'Attachments', label: 'Attachments'}
// ]
--------------------------------------------
@UI.hidden: true
// @Consumption.semanticObject: 'DocumentInfoRecord'
// @UI.lineItem:[
// {type: #FOR_INTENT_BASED_NAVIGATION,
// semanticObjectAction: 'createDIR',
// label: 'Create Document',
// importinance:#MEDIUM},
// {type: #FOR_INTENT_BASED_NAVIGATION,
// semanticObjectAction: 'changeDIR',
// label: 'Change Document',
// importance:#MEDIUM}]
// {type: #FOR_INTENT_BASED_NAVIGATION,
// semanticObjectAction: 'displayDIR',
// label: 'Display Document',
// importance:#MEDIUM}]
key ChangeRecordReferenceUUID,
@UI.hidden: true
@UI.lineItem:[
{ position:5,
importance:#HIGH }
]
@UI.identification: {position: 5, importance: #HIGH}
@Semantics.imageUrl: true
@ObjectModel.readOnly: true
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CR_OBJECT_THUMBNAIL_VE'
cast( '' as productimageurl ) as ProductImageURL,
@UI.lineItem:[{
position:10,
importance:#HIGH }
]
@UI.identification: {position: 10, importance: #HIGH}
//@Consumption.valueHelp: '_DocumentPart'
//Commented byPravin
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_DocumentInfoRecordDocPrtVH', //'I_ChangeRecordDocPartVH',
element: 'DocumentInfoRecordDocNumber' }, //'DocumentInfoRecord' },
additionalBinding: [{ localElement: 'DocumentType',
element: 'DocumentInfoRecordDocType' }, //'DocumentType' },
{ localElement: 'DocumentVersion',
element: 'DocumentInfoRecordDocVersion' }, //'DocumentVersion' },
{ localElement: 'DocumentPart',
element: 'DocumentInfoRecordDocPart' }] //'DocumentPart' }]
}]//Commented byPravin
@ObjectModel.text.element: 'DocumentDescription'
// @Consumption.semanticObject: 'DocumentInfoRecord'
DocumentInfoRecord,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_DocumentInfoRecordDocPrtVH',
element: 'DocumentInfoRecordDocType' }
}]
@UI.lineItem:[{
position:20,
importance:#HIGH }
]
@UI.identification: {position: 20, importance: #HIGH}
DocumentType,
@UI.lineItem:[{
position:30,
importance:#HIGH }
]
@UI.identification: {position: 30, importance: #HIGH}
// @Consumption.valueHelp: '_DocumentPart'
@Consumption.valueHelpDefinition: [ //Commented byPravin
{ entity: { name: 'I_DocumentInfoRecordDocPrtVH',//'I_ChangeRecordDocPartVH',
element: 'DocumentInfoRecordDocPart' }, //'DocumentPart' },
additionalBinding: [{ localElement: 'DocumentType',
element: 'DocumentInfoRecordDocType' }, //'DocumentType' },
{ localElement: 'DocumentInfoRecord',
element: 'DocumentInfoRecordDocNumber' }, //'DocumentInfoRecord' },
{ localElement: 'DocumentVersion',
element: 'DocumentInfoRecordDocVersion' }] //'DocumentVersion' }]
}] //Commented byPravin
DocumentPart,
@UI.lineItem:[{
position:40,
importance:#MEDIUM }
]
@UI.identification: {position: 40, importance: #MEDIUM}
// @Consumption.valueHelp: '_DocumentPart'
@Consumption.valueHelpDefinition: [ //Commented byPravin
{ entity: { name: 'I_DocumentInfoRecordDocPrtVH', //'I_ChangeRecordDocPartVH',
element: 'DocumentInfoRecordDocVersion' }, //'DocumentVersion' },
additionalBinding: [{ localElement: 'DocumentType',
element: 'DocumentInfoRecordDocType' }, //'DocumentType' },
{ localElement: 'DocumentInfoRecord',
element: 'DocumentInfoRecordDocNumber' }, //'DocumentInfoRecord' },
{ localElement: 'DocumentPart',
element: 'DocumentInfoRecordDocPart' }] //'DocumentPart' }]
}] //Commented byPravin
DocumentVersion,
@UI.hidden: true
@ObjectModel.readOnly: true
@ObjectModel.foreignKey.association: '_ChangeRecordItemRelDocVH'
@UI.identification: {position: 95, importance: #MEDIUM}
_ChangeRecordObjPg.ChangeRecordType as ChangeRecordType,
// @UI.lineItem:[{
// position:50,
// importance:#MEDIUM }
// ]
// @UI.identification: {position: 50, importance: #MEDIUM}
// Customer,
@UI.hidden: true
ChangeRecordUUID,
@UI.hidden: true
ChangeRecordReferenceType,
@UI.hidden: true
ChangeRecordReferenceSubtype,
@UI.hidden: true
ChangeRecordReference,
@UI.hidden: true
ParentChangeRecordRefUUID,
@UI.hidden: true
IsMainReference,
@Semantics.user.createdBy: true
@ObjectModel.readOnly: 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
@ObjectModel.readOnly: 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.lineItem:[{position:70, importance:#MEDIUM }]
@UI.identification: {position: 70, importance: #MEDIUM}
@ObjectModel.readOnly: true
@Consumption.semanticObject: 'ChangeMaster'
ChangeNumber,
@UI.identification: {position: 120, importance: #MEDIUM}
ChgRecdReasonForChange,
@UI.identification: {position: 125, importance: #MEDIUM}
ExpdCompltnDte,
@UI.identification: {position: 130, importance: #MEDIUM}
@Consumption.valueHelpDefinition: [{ entity : { name : 'C_ChangeRecdAuthznGrpVH' , element: 'ChgRecdNmbrAuthznGrp'}}]
ChgRecdAuthznGrpText,
@UI.identification: {position: 135, importance: #MEDIUM}
@Consumption.valueHelpDefinition: [{ entity : { name : 'C_ChgRecdChgNmbrStatusVH' , element: 'ChgRecdNmbrChgSts'}}]
ChgRecdNmbrChgSts,
@ObjectModel.readOnly: true
@ObjectModel.text.element: [ 'DocumentStatusName' ]
@UI.lineItem:[{
position:50,
importance:#MEDIUM }
]
@UI.identification: {position: 50, importance: #MEDIUM}
// cast(_ChangeRecordDocStatus._StatusText.ExternalDocumentStatus as stabk preserving type ) as ExternalDocumentStatus,
_ChangeRecordDocStatus._DocStatus._Text[1:Language = $session.system_language].ExternalDocumentStatus as ExternalDocumentStatus,
@ObjectModel.readOnly: true
@UI.hidden: true
_ChangeRecordDocStatus._DocStatus._Text[1:Language = $session.system_language].DocumentStatusName as DocumentStatusName,
@ObjectModel.readOnly: true
@UI.hidden: true
_DocumentPart.DocumentDescription as DocumentDescription,
@UI.lineItem:[{
position:60,
importance:#MEDIUM }
]
@UI.identification: {position: 60, importance: #MEDIUM}
@Consumption: { valueHelp: '_ChangeRecordItemRelDocVH' }
@ObjectModel: {foreignKey.association: '_ChangeRecordItemRelDocVH' }
@UI.textArrangement: #TEXT_ONLY
-- @ObjectModel.mandatory: true
ChangeRecordItemRelevance,
@ObjectModel.readOnly:true
@UI.hidden: true
_ChangeRecordObjPg.ChgRecdItemProcgStatusIsEnbld,
// @UI.hidden: true
// @ObjectModel: { readOnly: true, virtualElement: true }
// ( case when _ChangeRecordObjPg.ChgRecdItemProcgStatusIsEnbld = 'X'
// then cast ( 0 as int4 ) else cast( 1 as int4 ) end ) as IsChgRecdItemProcgStatusEnbled,
@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: 70, importance: #MEDIUM }]
@EndUserText.label: 'Processing Status'
@Consumption.valueHelpDefinition: [{association: '_ProcessingStatusVH'}]
@ObjectModel.foreignKey.association: '_ProcessingStatusVH'
@UI.textArrangement: #TEXT_FIRST
// @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
ChangeRecordItemProcgStatus,
@UI.hidden: true
@ObjectModel.readOnly: true
ChgRecdCurrentItemProcgStatus,
// @UI.hidden: true
// @ObjectModel.readOnly: true
// _ChangeRecordObjPg.ChangeRecordItemIsNotEditable,
// @UI.hidden: true
// @ObjectModel.readOnly: true
// _ChangeRecordObjPg.ChangeRecordItmIsAddDelEnabled,
@UI.hidden: true
@UI.lineItem:[{importance:#MEDIUM, hidden: true } ]
@EndUserText.label: 'Digital Signature Status'
@ObjectModel.foreignKey.association: '_DigSignStatusText'
@Consumption: { valueHelp: '_DigSignStatusText' }
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,
// _ChangeRecordDocStatus,
_ChangeRecordItemRelDocVH,
_DocumentType,
_DocumentPart,
@ObjectModel.association.type: [ #TO_COMPOSITION_ROOT,#TO_COMPOSITION_PARENT ]
_ChangeRecordObjPg,
_ProcessingStatusVH,
_ProcessingStatusTxt,
_DigSignStatusText
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_CHANGERECDDIGSIGNSTATUSVH",
"C_CHANGERECORDOBJPG",
"I_CHANGERECORDDOCPART",
"I_CHANGERECORDDOCSTATUS",
"I_CHANGERECORDREFERENCEDOCTP",
"I_DOCUMENTINFORECORDDOCSTATUS",
"I_DOCUMENTINFORECORDDOCSTATUST"
],
"ASSOCIATED":
[
"C_CHANGERECDDIGSIGNSTATUSVH",
"C_CHANGERECORDITEMRELDOCVH",
"C_CHANGERECORDOBJPG",
"C_CHGRECORDITEMPROCGSTATUSVH",
"I_CHANGERECORDDOCPART",
"I_CHANGERECORDDOCSTATUS",
"I_CHANGERECORDREFOBJICONS",
"I_CHGRECDITEMPROCGSTATUSTEXT",
"I_DOCUMENTINFORECORDDOCTYPE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/