收到外围系统的xstring之后,如何在sap中将其打开呢
1.创建一个屏幕
2.绘制一个customer control
3.创建流逻辑
4.流逻辑如下:
DATA: go_html_container TYPE REF TO cl_gui_custom_container,
go_html_control TYPE REF TO cl_gui_html_viewer,
lv_url TYPE char255,
lt_data TYPE STANDARD TABLE OF x255.MODULE status_0100 OUTPUT.IF go_html_container IS INITIAL .CREATE OBJECT go_html_containerEXPORTINGcontainer_name = 'PDF'.CREATE OBJECT go_html_controlEXPORTINGparent = go_html_container.CALL METHOD go_html_control->load_dataEXPORTINGtype = 'application'subtype = 'pdf'IMPORTINGassigned_url = lv_urlCHANGINGdata_table = lt_dataEXCEPTIONSdp_invalid_parameter = 1dp_error_general = 2cntl_error = 3html_syntax_notcorrect = 4OTHERS = 5.CALL METHOD go_html_control->show_urlEXPORTINGurl = lv_urlin_place = 'X'EXCEPTIONScntl_error = 1cnht_error_not_allowed = 2cnht_error_parameter = 3dp_error_general = 4OTHERS = 5.ENDIF.ENDMODULE.MODULE user_command_0100 INPUT.CALL METHOD go_html_control->freeEXCEPTIONScntl_error = 1cntl_system_error = 2OTHERS = 3.LEAVE TO SCREEN 0. "因为我有两个屏幕,所以我要返回上一个,若只有一个,可以注释这句
ENDMODULE.