Без предисловий, сразу код в начальной итерации:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
DATA: lv_template TYPE string VALUE 'ZR_CA001.DOCX'. DATA: lv_file TYPE xstring. DATA: lt_data TYPE STANDARD TABLE OF tbl1024. DATA: lv_len TYPE i. zcl_text_tools=>read_mimeobject( EXPORTING iv_mimeobject = conv #( lv_template ) IMPORTING ev_bin = lv_file ). * ... some magic happens here ... lv_len = xstrlen( lv_file ). CALL METHOD cl_bcs_convert=>xstring_to_xtab EXPORTING iv_xstring = lv_file IMPORTING et_xtab = lt_data[]. cl_gui_frontend_services=>show_document( EXPORTING document_name = lv_template mime_type = '' data_length = lv_len CHANGING document_data = lt_data[] EXCEPTIONS OTHERS = 1 ). |
А теперь можно его покритиковать. (далее…)