- 浏览: 174320 次
- 性别:
- 来自: 成都
文章分类
REPORT ztest. DATA: gv_file_length TYPE i, gv_filehexcontent TYPE xstring, gv_zipfilehex TYPE xstring, gt_filebincontent TYPE solix_tab, gt_zipfilebin TYPE solix_tab, gv_zipfilename TYPE string, gv_folder TYPE string, go_zipper TYPE REF TO cl_abap_zip, gt_files TYPE TABLE OF char255 WITH HEADER LINE, gv_file TYPE string, gv_file_fullpath TYPE string, gv_results TYPE match_result_tab, gv_result TYPE match_result , gv_folder_name TYPE string, gv_lines TYPE i, gv_no_files TYPE i. *--------------------------------------------------------------------* * START-OF-SELECTION *--------------------------------------------------------------------* START-OF-SELECTION. cl_gui_frontend_services=>directory_browse( EXPORTING window_title = 'Folder selection' CHANGING selected_folder = gv_folder EXCEPTIONS OTHERS = 4 ). CHECK sy-subrc EQ 0. cl_gui_frontend_services=>directory_list_files( EXPORTING directory = gv_folder files_only = 'X' CHANGING file_table = gt_files[] count = gv_no_files EXCEPTIONS OTHERS = 4 ). CHECK sy-subrc EQ 0 AND gv_no_files GT 0. CREATE OBJECT go_zipper. FIND ALL OCCURRENCES OF '\' IN gv_folder IN CHARACTER MODE RESULTS gv_results. DESCRIBE TABLE gv_results LINES gv_lines. READ TABLE gv_results INTO gv_result INDEX gv_lines. ADD 1 TO gv_result-offset. gv_folder_name = gv_folder+gv_result-offset. LOOP AT gt_files. MOVE gt_files TO gv_file. CONCATENATE gv_folder '\' gv_file INTO gv_file_fullpath. cl_gui_frontend_services=>gui_upload( EXPORTING filename = gv_file_fullpath filetype = 'BIN' IMPORTING filelength = gv_file_length CHANGING data_tab = gt_filebincontent EXCEPTIONS OTHERS = 4 ). CHECK sy-subrc EQ 0. CALL FUNCTION 'SCMS_BINARY_TO_XSTRING' EXPORTING input_length = gv_file_length IMPORTING buffer = gv_filehexcontent TABLES binary_tab = gt_filebincontent EXCEPTIONS failed = 1 OTHERS = 2. CHECK sy-subrc EQ 0. *Populate folder name & file name CONCATENATE gv_folder_name '\' gv_file INTO gv_file. go_zipper->add( name = gv_file content = gv_filehexcontent ). ENDLOOP. gv_zipfilehex = go_zipper->save( ). CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' EXPORTING buffer = gv_zipfilehex TABLES binary_tab = gt_zipfilebin. CONCATENATE gv_folder '.zip' INTO gv_zipfilename. CALL METHOD cl_gui_frontend_services=>gui_download EXPORTING filename = gv_zipfilename filetype = 'BIN' CHANGING data_tab = gt_zipfilebin EXCEPTIONS OTHERS = 4.
发表评论
-
DISABLE button(FCODE) from the GUI-Status
2014-08-04 15:54 6321. Goto-> Attributes->Pus ... -
Handy SAP function module to automate user events
2013-11-28 09:49 751*Begin-Auto triggers ENTER comm ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 819FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 744FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
Unpermitted combination of business object BUS2032 and sales doc. category H
2013-01-25 14:20 4135Q: create New Sales Order using ... -
Function Module: get all users who have specific role
2013-01-25 14:16 679CALL FUNCTION 'RSRA_USERS_O ... -
Create a SELECT-OPTIONS in a module pool screen
2012-03-07 15:35 1027source:http://abap-explorer.blo ... -
Converting OTF data from script to Spool Request
2012-03-06 17:25 0source:http://forums.sdn.sap.co ... -
Calculate the days, months and years between 2 dates.
2012-02-21 16:14 835FORM compute_2date_diff. DAT ... -
Retrieving Domain fixed values
2012-02-16 11:13 811source:http://www.saptechnical. ... -
If 1 equals 2, what’s the purpose?
2012-02-16 10:59 837source:http://sapport.blogspot. ... -
get status name for batch input session
2012-01-31 14:47 922Line 601 in program SAPMSBDC_CC ... -
MIRO
2011-11-29 10:39 2065from: http://help-sap.blogspot. ... -
Create Vendor or Customer_master Data
2011-11-23 16:22 2920To Create or Change Vendor_mast ... -
Pay attention to the following points when using append structures
2011-10-27 13:43 1310You cannot create append str ... -
Help Views
2011-10-20 10:46 738source:http://help.sap.com/saph ... -
What is the Different Types and Usage of Views
2011-10-19 23:06 848source:http://www.sap-img.com/a ... -
Upload a Comma Delimited CSV file that contains commas in data
2011-09-23 17:22 2234source:http://wiki.sdn.sap.com/ ... -
What is the difference between SET SCREEN and CALL SCREEN ?
2011-09-19 21:50 763source:http://www.saptechies.co ... -
cl_gui_frontend_services=>file_open_dialog
2011-09-09 09:21 1419CALL METHOD cl_gui_frontend_ser ...
相关推荐
Create_folder_for_file.exe 快速为一个文件创建同名的文件夹。 windows10 VS2019 C# 制作
这个“ADB folder.zip_abd folder_cabin8u5”压缩包显然是一个包含了ADB软件的集合,可能包含了一键安装或管理ADB的软件,尤其适合Windows用户。"cabin8u5"可能是该软件版本或者特定配置的标识。 ADB的主要功能包括...
DATA(lv_file_content) = cl_abap_char_utilities=>xstring_to_string( ls_file_info-data ). APPEND ls_file_content TO lt_table. " 内表lt_table存储解析后的内容 ENDLOOP. ``` 最后,移动文件和删除原始文件...
duilib写的仿文件夹,支持左键点击修改编辑,右键点击弹出响应
标题 "New folder.zip_PMSG control _control speed pmsg_smc_smc1_speed c" 提供了关于一个特定软件或系统组件的信息,它涉及到PMSG(电力电子消息服务,Power Message Generation)的速度控制,并且与SMC(伺服...
在"folder.zip"中,可能包含了实现这些步骤的代码、配置文件、样例数据等资源。通过深入研究这些文件,可以进一步理解并应用图像处理和步态识别技术。值得注意的是,实际应用中还需要考虑到隐私保护、实时性、鲁棒性...
在电力系统领域,"New folder.zip_电网_负荷_负荷频率_频率可变_频率控制"这个标题揭示了几个关键的关键词,它们涉及到电力系统的稳定运行和管理。首先,我们来逐一解读这些概念: 1. **电网**:电网是电力系统的...
【标题】"New folder (1)_newfolder_NEW_" 暗示了这是一个新的文件夹,可能包含了一系列经过整理或更新的文件。在IT领域中,文件夹命名通常是为了便于管理和识别,尤其是当它带有"(1)"这样的后缀时,这可能是原始...
CROSS-THREADING-SAFE, you can select a directory, you can start/stop/pause/continue the scan, and you will see the scanned dir´ s/file´ s in a listview :o)
一个MATLAB/Simulink模型,关于电动汽车动力电池荷电状态(State of Charge,SOC)估计; 包括参数文件、模型文件两种,模型文件分别仿真了110A恒流、110A脉冲和ECE15工况; 建模采用基于PEGV的电池等效模型对SOC...
可实现labview虚拟锁相,不必通过硬件来实现
TEST FUNCTION TO CHECK MULTI-OBJECTIVE ANT-LION OPTIMIZER ALGORITHM
在这个压缩包"tesla_xlights_show_folder.zip"中,包含了实现这一灯光秀所需的各种文件和配置。 首先,"tesla_xlights_show_folder"可能是一个包含多个子文件夹和文件的目录结构,这些文件可能是用于编程、设计和...
Combine the algorithm mopso and qpso in such a way that half the particles are updated by the algorithm qpso and the other half by the algorithm pso.
在模板中,我们需要添加一个 FORM 级触发器,名为 FOLDER_ACTION,代码如下: app_folder.define_folder_block( object_name => 'DETAILBLOCK_FOLDER', folder_block_name => 'DETAILBLOCK', prompt_block_name ...
标题中的"SX1276MB1LAS_e311v02a_prod_folder.zip_SX1276 PCB_lora PCB_lora原"表明这是一个关于SX1276 LoRa模组的电路板设计资源包,其中包含了产品版本e311v02a的相关信息。LoRa是一种长距离、低功耗的无线通信...
无需注册,简单实用Wise_Folder_Hider_1.3.2
matlab各种典型应用实例加+Joyce+Van+de+Vegte著
标题“CONVNFFT_Folder.zip_processing”暗示了我们正在讨论与卷积相关的处理,可能涉及一种使用快速傅里叶变换(Fast Fourier Transform, FFT)的卷积方法,即CONVNFFT。这种技术常用于加速图像卷积计算,特别是在...
标题“杀毒kill_folder_2.31_XiaZaiBa.”表明这是一款名为“kill_folder”的杀毒软件,版本号为2.31,可能来源于一个叫做“下载吧”的平台。描述同样简短,没有提供更多的具体信息,但我们可以根据标签“kill_f”...