在SAP CRM WebClient UI里打开ABAP Webdynpro页面
Hi Friends,
in my recent customer project customer complains to me that they can not navigate from the workflow search result to the target UI.
The workflow work item is a document generated via SAP document builder. They would like to navigate to the document detail page and then decide whether to approve the document or not. With SAP standard solution so far in CRM7.0 EHP3, this is not possible since this work item does not have any BOR type but instead modeled via ABAP class /IPRO/CL_WFL_DOCUMNT. What’s more, the target document page is built via ABAP webdynpro which has not respective concept like UI object type, Genil component or BOL object name.
So in order to enable customer to see the document page, I just enhance the standard table to add a new column named “Document URL“. By clicking the hyperlink of that column, it will create a new popup window to display the document page.
The solution could be concluded as below steps:
Step1
enhance a new attribute DOC_URL in standard context node SEARCHRESULTNODE, implement Getter and P Getter.
in Getter, just get the target document page url via utility class:
method GET_DOC_URL.
value = zcl_document_utility=>get_display_value( iterator ).
endmethod.
in p getter, set the event handler for hyperlink click event:
METHOD GET_P_DOC_URL.
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
rv_value = 'DISPLAY_DOC'.
ENDCASE.
ENDMETHOD.
Step2
define component usage GS_CMSRCH:
and in event handler for DISPLAY_DOC:
method OPEN_URL_INTERNAL.
DATA(lv_title) = cl_wd_utilities=>get_otr_text_by_alias( 'Document(to be approved) Preview' ). "#EC NOTEXT
DATA(lr_popup) = io_wd_manager->create_popup( iv_interface_view_name = 'GS_CMSRCH/CMDisplayContentWindow'
iv_usage_name = 'GS_CMSRCH'
iv_title = lv_title ).
DATA(lr_cn) = lr_popup->get_context_node( 'PARAMS' ).
DATA(lr_obj) = lr_cn->collection_wrapper->get_current( ).
READ TABLE st_url_buffer ASSIGNING FIELD-SYMBOL(<buffer>) WITH KEY uuid = iv_guid.
CHECK sy-subrc = 0.
DATA(ls_params) = VALUE crmt_gsurlpopup_params( url = <buffer>-url height = '1000' ).
lr_obj->set_properties( ls_params ).
lr_popup->set_display_mode( if_bsp_wd_popup=>C_DISPLAY_MODE_PLAIN ).
lr_popup->set_window_width( 1000 ).
lr_popup->set_window_height( 10000 ).
lr_popup->open( ).
endmethod.
And that’s all.
Interface window CMDisplayContentWindow is a new window created by SAP in EHP3 SP3. There is no magic inside it: just open the target window via JavaScript window.open.
you can also use the reuse component GSURLPOPUP, which can achieve the same result but with different html markup.
After I finish it, I soon realized that in this dedicated case, it is possible to “navigate” to the target ABAP webdynpro page via CRM navigation framework itself.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- SAP ECC6安装系列四:安装过程详解
- SAP Fiori和WebClient UI的有状态和无状态行为设计原理
- 为什么你们的Note.js 里面没有sap.ui.core.Control.extend()这样的代码,但是runtime有自动生成有
- SAP WebClient UI view controller所有可用的属性列表
- SAP CRM WebClient UI overview 页面Assignment Block的设计原理
- SAP WebClient UI component context node class单元测试方法
- SAP WebClient UI overview页面里assignment block的可见性分析技巧
- SAP CRM WebClient UI F2页面里from pre-processing table标签位的含义
- SAP BSP和JSP页面里UI元素的ID生成逻辑
- SAP CRM WebClient UI表格编辑模式的调试明细
- 如何通过outlet在SAP Spartacus的产品明细页面插入自定义UI
- 关于 SAP 电商云 Spartacus UI 里 Router 模块的 forRoot 方法
- SAP 电商云 Spartacus UI Cart ID 的 local storage 存储
- SAP 电商云 Spartacus UI Component 级别的延迟加载实现(Lazy Load)
- SAP 电商云 Spartacus UI CI 脚本分析
- SAP 电商云 Spartacus UI 设置 delivery mode 在 3G 慢速网络下的排队效果
- SAP 电商云 Spartacus UI 页面布局的设计原理
- SAP Spartacus login 页面看不到 UI 控件的问题解决
- 如何查找SAP Cloud for Customer UI页面对应的技术模型明细
- SAP Cloud for Customer Sales Lead明细页面视图的UI模型
- SAP CRM WebClient UI Selenium UiElementHandler的实现
- 使用SAP Data Hub Developer Edition将数据写入Hadoop
- SAP Smart Table 的 Personalization(个性化配置)试读版
- 国内SAP UI5使用者关于性能优化和UI5 Web Component的讨论
- SAP 电商云 Spartacus UI feature level directive 的工作原理
- SAP 电商云 Spartacus UI Angular Component 动态创建的单步调试
- SAP 电商云 Spartacus UI 的 urlParameter 配置原理
- SAP Commerce Cloud SmartEdit 学习笔记