在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.
- Android中App安装位置详解
- Java面试题系列之基础部分(二)——每天学5个问题
- Java面试题系列之基础部分(四)——每天学5个问题
- 使用ORM框架,必须迁就数据库的设计吗?
- 使用OQL+SQLMAP解决ORM多表复杂的查询问题
- PostgreSQL的.NET驱动程序Npgsql中参数对象的一个Bug
- 和Emoji相关的那些开源项目
- PostgreSQL的PDF.NET驱动程序构建过程
- 基于Docker的PHP开发环境
- 以太坊·物流场景初探
- Python接口自动化-3-POST请求
- 【Python环境】Python中的结构化数据分析利器-Pandas简介
- JAVA中使用Jedis操作Redis
- Tomcat搭建文件服务器
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- [javascript] 支付宝小程序网络GET请求
- [PHP] 生成器模式-创建型设计模式
- [PHP] 工厂方法设计模式-创建型设计模式
- [PHP] 对象池模式-创建型设计模式
- [PHP] 原型模式-创建型设计模式
- [PHP] 简单工厂模式-创建型设计模式
- [PHP] 单例模式-创建型设计模式
- [PHP] 静态工厂模式-创建型设计模式
- [PHP] 适配器模式-结构型设计模式
- [PHP] 使用curl扩展POST或者PUT时数据不全和连接中断的排查
- [PHP] 桥接模式-结构型设计模式
- [PHP] 组合模式-结构型设计模式
- [GO-FLY] GO-FLY客服实现浏览器消息提示音
- [PHP] 数据映射器模式-结构型设计模式
- [GO] 变参函数-GO中函数传递变长参数