目录
1. 创建值帮助CDS视图
2. 添加值帮助CDS视图对应的ODATA服务
3. 在灵活工作流中设置搜索帮助
4. 效果展示
1. 创建值帮助CDS视图
2. 注册值帮助CDS视图对应的ODATA服务
事务代码 /N/IWFND/MAINT_SERVICE
3. 在灵活工作流中设置值帮助
4. 效果展示
@AbapCatalog.sqlViewName: 'YTEST_VH'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: '1'
@OData.publish: true
@ObjectModel.createEnabled: true
@ObjectModel.usageType.dataClass: #CUSTOMIZING
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.dataCategory:#VALUE_HELP
define view YTestValueHelp as select from ytest_dummy
association [0..1] to YCompanyCodeVH as _CompanyCodeVH on $projection.CompanyCode = _CompanyCodeVH.CompanyCode
{
key '' as vh,
@Consumption.valueHelp: '_CompanyCodeVH'
cast( '' as bukrs ) as CompanyCode, // Local CompanyCod
_CompanyCodeVH
}
@AbapCatalog.sqlViewName: 'YBUKRS_SH_DATA'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'CC'
@ObjectModel.representativeKey: 'CompanyCode'
@Metadata.ignorePropagatedAnnotations: true
@Search.searchable: true
@ObjectModel: { usageType.sizeCategory: #S,
usageType.dataClass: #ORGANIZATIONAL,
usageType.serviceQuality: #A,
supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #EXTRACTION_DATA_SOURCE, #SEARCHABLE_ENTITY],
modelingPattern: #ANALYTICAL_DIMENSION }
@ClientHandling.algorithm: #SESSION_VARIABLE
define view YCompanyCodeVH as select from t001 {
@ObjectModel.text.element: 'CompanyCodeName'
@Search.defaultSearchElement:true
@Search.fuzzinessThreshold:0.8
@Search.ranking:#HIGH
key t001.bukrs as CompanyCode,
@Semantics.text: true
t001.butxt as CompanyCodeName
}where t001.land1 = 'CN'
参考:
Flexible Workflow: Custom Flexible Scenario – Part 4 | SAP Blogs
Create CDS Value Help or F4 help for In App Field Custom Fields | SAP Blogs