前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP WebClient UI One Hit Navigation的实现方法

SAP WebClient UI One Hit Navigation的实现方法

作者头像
Jerry Wang
发布2020-08-28 10:03:13
3860
发布2020-08-28 10:03:13
举报

One hit navigation means if only one result found during search, the detail page of that search result entity will be opened automatically without user manual action.

See example below: after search button is clicked, the detail page of 201300024454 will be opened automatically.

You could follow the below steps to achieve:

(1) You must enable one hit navigation behavior for your business role.

double click “Parameter Assignment”:

add a new parameter ONE_HIT_DIRECT_DISPLAY with value TRUE

(2) Implement your search button event handler as below.

Usenavigate_if_result_is_unique to trigger the potential navigation.

代码语言:javascript
复制
method EH_ONSEARCH.
    DATA: lv_result            TYPE REF TO if_bol_entity_col,
          lr_comp              TYPE REF TO CL_ZONEHITN_BSPWDCOMPONEN_IMPL,
          lv_onehit_navigation TYPE abap_bool.
    lr_comp ?= me->comp_controller.
    lv_result = zcl_jerry_tool=>get_query_results( me->typed_context->search->collection_wrapper ).
    IF cl_crm_uiu_one_hit_direct_nav=>navigate_if_result_is_unique( iv_value_help_mode = abap_false
                                                                    ir_result_col      = lv_result ) = abap_false.
       lr_comp->typed_context->searchresult->collection_wrapper->set_collection( lv_result ).
    ENDIF.
  endmethod.

You should put the detail page of search result into a separate UI component and include it into search component via component usage. Expose its main window as interface view and inbound plug, so that one search result is unique, the detail page of that component could be chose and navigated via UI framework.

(3) Create an entry for the detail component in “Define Work Area Component Repository“:

(4) Define Navigation Bar Profile:

choose Navigation bar profile TPM-PRO, double click on “Define Generic Outbound Plug Mappings”:

Configure the target ID defined in step3 here

Now you could test in UI.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-27 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档