GUI DOWNLOAD: Splitt Data into Several FIles
I would like to download data using the Frond End Service (Class <b>cl_gui_frontend_services</b>) with the method <b>GUI_DOWNLOAD</b>.
In the ABAP side I have a internal table with the relevant information to be downloaded. The data shall not be downloaded at once (because of the large file size); the idea is to split the data into packages.
Is there any possibility to split the data into several files? Is the GUI service able to split the data automatically in several files?
Thank you for your help in advance.
Sharath kumar R replied
*C-- Have a look.
REPORT ZZDYNFIELDDATE .
DATA : T_MARD TYPE STANDARD TABLE OF MARD.
DATA : T_MARD1 TYPE STANDARD TABLE OF MARD.
SELECT * FROM MARD
INTO TABLE T_MARD UP TO 100 ROWS.
DATA : L_INDEX TYPE SY-INDEX,
L_INDEX1 TYPE SY-INDEX.
T_MARD1 = T_MARD.
DELETE T_MARD FROM 51 TO 100.
T_MARD = T_MARD1.
DELETE T_MARD FROM 1 TO 50.
*& Form call_download
CALL FUNCTION 'GUI_DOWNLOAD'
FILENAME = 'C:\test.txt'
FILETYPE = 'ASC'
APPEND = 'X'
DATA_TAB = T_MARD.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.