收到外围系统的xstring之后,如何在sap中将其打开呢
1.创建一个屏幕
2.绘制一个customer control
3.创建流逻辑
文章来源:https://www.toymoban.com/news/detail-796690.html
4.流逻辑如下:文章来源地址https://www.toymoban.com/news/detail-796690.html
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_container
EXPORTING
container_name = 'PDF'.
CREATE OBJECT go_html_control
EXPORTING
parent = go_html_container.
CALL METHOD go_html_control->load_data
EXPORTING
type = 'application'
subtype = 'pdf'
IMPORTING
assigned_url = lv_url
CHANGING
data_table = lt_data
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
html_syntax_notcorrect = 4
OTHERS = 5.
CALL METHOD go_html_control->show_url
EXPORTING
url = lv_url
in_place = 'X'
EXCEPTIONS
cntl_error = 1
cnht_error_not_allowed = 2
cnht_error_parameter = 3
dp_error_general = 4
OTHERS = 5.
ENDIF.
ENDMODULE.
MODULE user_command_0100 INPUT.
CALL METHOD go_html_control->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
LEAVE TO SCREEN 0. "因为我有两个屏幕,所以我要返回上一个,若只有一个,可以注释这句
ENDMODULE.
到了这里,关于abap 将xstring转换成PDF展示的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!