1 如果是发送邮件的话,可以用create_ostream_xstring将构造的XLS/XML转换为XSTRINGDATA:lr_ixmlTYPEREFTOif_ixml,lr_documentTYPEREFTOif_ixml_document,lr_streamfactoryTYPEREFTOif_ixml_stream_factory,lr_ostreamTYPEREFTOif_ixml_ostream,lr_rendererTYPEREFTOif_ixml_renderer,lr_element_rootTYPEREFTOif...
lv_zip_xstring= oref_zip->save( ).CALLFUNCTION'SCMS_XSTRING_TO_BINARY'EXPORTINGbuffer=lv_zip_xstringIMPORTINGoutput_length=v_zip_sizeTABLESbinary_tab=it_zip_bin_data. cl_gui_frontend_services=>file_save_dialog(EXPORTINGwindow_title='SELECT THE LOCATION TO SAVE THE FILE'file_filter='(*.ZI...
lv_zip_xstring=oref_zip->save(). CALL FUNCTION'SCMS_XSTRING_TO_BINARY' EXPORTING buffer=lv_zip_xstring IMPORTING output_length=v_zip_size TABLES binary_tab=it_zip_bin_data. cl_gui_frontend_services=>file_save_dialog( EXPORTING window_title='SELECT THE LOCATION TO SAVE THE FILE' file_f...
先将文件通过cl_gui_frontend_services=>gui_upload以BIN的文件类型上载,然后通过cl_abap_zip中的方法add() save()压缩,最后下载到本地。 REPORT ztest_zip. TYPES: BEGIN OF bin_file, name TYPE string, size TYPE i, data TYPE solix_tab, END OF bin_file . DATA: lv_filename TYPE string, wa_b...
CL_ABAP_ZIP 创建压缩文件_SAP刘梦,闲看的时候发现一个好玩儿的demo,生成压缩文件的。效果代码TYPES:BEGINOFbin_file,nameTYPEstring,sizeTYPEi,dataTYPEsolix_tab,ENDOFbin_file.DATA:lv_filename...
oref_zip TYPE REF TO cl_abap_zip, lv_zip_xstring TYPE xstring, lv_xstring TYPE xstring, lv_path TYPE string, it_filetab TYPE filetable, ret_code TYPE i, v_usr TYPE i, v_zip_size TYPE i, it_zip_bin_data TYPE STANDARD TABLE OF raw255, v_dest_filepath TYPE string. ...
DATA: ZIP_TOOL TYPE REF TO CL_ABAP_ZIP, FILENAME TYPE STRING VALUE 'g:\binfile.pdf', " Source File NAme FILENAME_ZIP TYPE STRING VALUE 'g:\zipfile.zip'. " Zip File DATA: T_DATA_TAB TYPE TABLE OF X255, BIN_SIZE TYPE I, BUFFER_X TYPE XSTRING, ...
ABAP 生成ZIP压缩文件的代码.,DATA:IZIPTYPEREFTOCL_ABAP_ZIP,CONTTYPEXSTRING,XZIP_FILETYPEXSTRING,BINARY_TABTYPESTANDARDTABLEOFX255.DATA:ITABTYPESTANDARDTABLEOFSDOKCNTASC...
ABAP On-Premise 里的 CL_HTTP_CLIENT, 是实际 SAP项目实施中另一个使用广泛的工具类。能够很方便地通过 HTTP 协议与其他 SAP 系统或者第三方系统进行交互。 比如将一个远端服务地址通过名叫 url 的输入参数,传递给该工具类的 create_by_url 方法,就能向远端地址发起 GET 或 POST 请求。
DATA: CL_ZIP TYPE REF TO CL_ABAP_ZIP, XSTR TYPE XSTRING, BINARY_TAB T 40、YPE STANDARD TABLE OF X255 , BIN_LEN TYPE I , LS_FILE TYPE T_FILE , IT_FILES TYPE T_FILES 41、;. DATA: ITAB TYPE STANDARD TABLE OF SDOKCNTASC. IF WA_OA_FTP-ZJYBZ IS NOT INITIAL AND ( G_FTP_...