##1. 设置fiori报表抬头信息
@UI: {
headerInfo: {
typeName: 'クロスプラントメンテナンス',
typeNamePlural: 'クロスプラントメンテナンス',
description: { value: 'Product' },
title: { //抬头信息文本
type: #STANDARD,
value: 'Location',
label: 'クロスプラントメンテナンス'
}
},
presentationVariant: [ { sortOrder: [{ by: 'Product',direction: #ASC }, //抬头搜索排序条件
{ by: 'Location',direction: #ASC },
{ by: 'LocationType',direction: #ASC } ] } ]
}
@UI.facet: [
{
id: 'bp_Tab1',
purpose: #STANDARD,
type: #FIELDGROUP_REFERENCE,
label: '一般情報',
targetQualifier:'bp_Info1',
position: 10
},
{
id: 'bp_inc2', //include页签 association对象
purpose: #STANDARD,
type: #LINEITEM_REFERENCE,
hidden: #(CUSGENERALHID), //指派到隐藏属性
label: '得意先会社コード', //Customer Master (Company Code)
targetElement: '_CustomerCompanyData', //with association
position: 90
},]
@UI: {
fieldGroup:[{ qualifier:'bp_Info1', position:1 }] //字段指派到分组
}
Type;
// with action
@UI: {
lineItem: [
{ position: 20, importance: #HIGH, criticality: 'StatusCrt', criticalityRepresentation:#WITHOUT_ICON } //定义按钮
,{ type: #FOR_ACTION, dataAction: 'applyWorkFlow', label: '申請', position: 1 }
,{ type: #FOR_ACTION, dataAction: 'withdrawWorkFlow', label: '申請取消' ,position: 2 }
,{ type: #FOR_ACTION, dataAction: 'aproWorkFlow', label: '承認' ,position: 3}
,{ type: #FOR_ACTION, dataAction: 'rejtWorkFlow', label: '却下' ,position: 4}
,{ type: #FOR_ACTION, dataAction: 'simulation', label: '同期テスト' ,position: 5}
],
identification: [
{ importance: #HIGH, label: '申請', dataAction: 'applyWorkFlow',type: #FOR_ACTION, position: 1 }
,{ importance: #HIGH, label: '申請取消', dataAction: 'withdrawWorkFlow', type: #FOR_ACTION, position: 2 }
,{ importance: #HIGH, label: '承認' , dataAction: 'aproWorkFlow', type: #FOR_ACTION, position: 3}
,{ importance: #HIGH, label: '却下' , dataAction: 'rejtWorkFlow', type: #FOR_ACTION, position: 4}
,{ importance: #HIGH, label: '同期テスト' , dataAction: 'simulation', type: #FOR_ACTION, position: 5} ],
fieldGroup:[ { qualifier:'headerGroup1', position:20} ],
selectionField: [ { position: 50 } ],
textArrangement: #TEXT_ONLY
}
Status;
@UI: { fieldGroup:[{ qualifier:'headerGroup7', position:102, type: #WITH_URL, url: 'Url' }] } //URL字段
Url;
@UI: {
fieldGroup:[{ qualifier:'bp_Info2', position:7 , criticality: 'NameOrg1Crt', criticalityRepresentation:#WITHOUT_ICON}] //应用颜色字段
}
NameOrg1;
virtual NameOrg1Crt : abap.char( 10 ),
@ObjectModel.virtualElementCalculatedBy: 'ABAP:ZCL_MDE0017' //Interface View定义虚拟颜色属性字段并绑定到UI字段上&定义颜色处理类
@ObjectModel.virtualElementCalculatedBy: 'ABAP:ZCL_MDE0016'
virtual cusGeneralHid : abap_boolean, //隐藏属性
@Consumption:{valueHelpDefinition:[{ entity: { name: 'ZI_MD_WORKFLOWUSER_VH',element: 'Bname' } }],
filter: { multipleSelections: true, selectionType: #SINGLE }
}
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_GLAccountStdVH', element: 'GLAccount' },
additionalBinding: [{ element: 'CompanyCode',localElement: 'COMPANYCODE' }],useForValidation:true }]
@ObjectModel.text.element: ['OperationName']
@Consumption.valueHelpDefinition: [{ entity: {name: 'ZI_MD_WORKFLOWOPERATION_VH', element: 'Operation' },useForValidation:true }]
@UI.multiLineText: true
ApplyReason;
@Semantics.systemDateTime.createdAt: true
@Semantics.user.createdBy: true
@Semantics.systemDateTime.lastChangedAt: true
@Semantics.user.lastChangedBy: true
@EndUserText.label: 'XX'
@UI.hidden: true
definitionId;
@Consumption.valueHelpDefinition: [ {entity: { name: 'ZI_MAINTAINEDPLANTVIEW_NONE_VH', element: 'Werks'},
label: 'Plant Value Help',
qualifier : 'PlantValueHelp'},
{ entity: { name: 'ZI_MAINTAINEDPLANTVIEW_VH', element: 'Werks'},
label: 'Plant Value Help Ref Material',
additionalBinding: [{ element: 'Matnr',localElement: 'Matnr' }]}]
Werks,