Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set pf-status 'PF_STATUS_0200'.
- set titlebar 'TITLE_0200'.
- data : lv_side_url(255) type c.
- data : lo_side_cont type ref to cl_gui_custom_container.
- data : lo_side_html type ref to cl_gui_html_viewer.
- data : lt_bin_pdf type standard table of x255.
- types : begin of ts_data,
- data(255) type c,
- end of ts_data,
- tt_data type standard table of ts_data.
- data : lt_pdf type tt_data,
- ls_pdf type ts_data.
- call function 'SCMS_XSTRING_TO_BINARY'
- exporting
- buffer = gv_pdf
- tables
- binary_tab = lt_bin_pdf.
- create object lo_side_cont
- exporting
- container_name = cv_cc_pdf
- exceptions
- cntl_error = 1
- cntl_system_error = 2
- create_error = 3
- lifetime_error = 4
- lifetime_dynpro_dynpro_link = 5
- others = 6.
- if sy-subrc <> 0.
- message i021 with sy-msgv1 into gv_msg.
- message i021 with sy-msgv1.
- exit.
- endif.
- create object lo_side_html
- exporting
- parent = lo_side_cont
- exceptions
- cntl_error = 1
- cntl_install_error = 2
- dp_install_error = 3
- dp_error = 4
- others = 5.
- if sy-subrc <> 0.
- message i021 with sy-msgv1 into gv_msg.
- message i021 with sy-msgv1.
- exit.
- endif.
- call method lo_side_html->load_data
- exporting
- url = cv_url_pdf
- type = cv_application_pdf
- subtype = cv_subtype_pdf
- * size = 0
- * encoding =
- * charset =
- * needfiltering = 0
- * language =
- * i_tidyt =
- importing
- assigned_url = lv_side_url
- changing
- data_table = lt_bin_pdf
- * iscontentchanged =
- exceptions
- dp_invalid_parameter = 1
- dp_error_general = 2
- cntl_error = 3
- html_syntax_notcorrect = 4
- others = 5.
- if sy-subrc <> 0.
- message i021 with sy-msgv1 into gv_msg.
- message i021 with sy-msgv1.
- exit.
- endif.
- call method lo_side_html->show_url
- exporting
- url = lv_side_url
- exceptions
- cntl_error = 1
- cnht_error_not_allowed = 2
- cnht_error_parameter = 3
- dp_error_general = 4
- others = 5.
- if sy-subrc <> 0.
- message i021 with sy-msgv1 into gv_msg.
- message i021 with sy-msgv1.
- exit.
- endif.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement