ITPub博客

首页 > 应用开发 > IT综合 > 使用SAP Cloud Application Studio实现OVS(Object Value Selector)

使用SAP Cloud Application Studio实现OVS(Object Value Selector)

原创 IT综合 作者:i042416 时间:2020-09-29 07:48:24 0 删除 编辑

You might be interested about how to build Value Help in other SAP UI technology as well:

My series of Cloud Application Studio Blogs

(1) Create a new OVS based on Customer BO:

Remove the automatically generated query node in controller tab. Create a new SADL query, and select InternalID as query parameter.



Choose another field BusinessPartnerFormattedName as search parameter as well. Select “Basic Find” checkbox to enable free text search.



Now you should see these three fields in data tab which will be used to bind to search parameter field in UI later.



Manually specify this new created SADL query in all automatically generated event handler. By default those event handler uses the query node automatically created during the OVS creation, this is the reason why you have to replace with your own SADL query instead.



(2) In Data tab, bind these two fields accordingly. Root/Items/InternalID will be passed back to OVS consumer.



Bind these two fields to Outport parameter as displayed below.



(3) Since the work in Data tab and controller tab are done, the left task is to draw search parameter field in Designer tab.



Drag two Input field from Toolbox and bind them to the query parameter accordingly:



Finish default set mapping and FindForm modelling:



(4) All development relevant on OVS component itself is done. Now it is ready to consume it in another UI component. This is my BO which contains a field pointing to a reference customer ID:



Bind this BO field in UI and specify the UI field with DisplayType = ObjectValueSelector.



Assign the created OVS component to this field:



Test in runtime

Click F4 to open value help:



Select a given item in search result and the customer ID will be passed back to consumer UI:



You can also use search field to search by Customer Name:



要获取更多Jerry的原创文章,请关注公众号"汪子熙":


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24475491/viewspace-2724929/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
SAP成都研究院开发专家,SAP社区导师,SAP中国技术大使。

注册时间:2018-01-20

  • 博文量
    1845
  • 访问量
    834522