Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

GUI DOWNLOAD: Splitt Data into Several FIles

Hello,

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.

Best regards,

Kurt.

Tags:
Former Member 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.

PERFORM CALL_DOWNLOAD.

T_MARD[] = T_MARD1[].

DELETE T_MARD FROM 1 TO 50.

PERFORM CALL_DOWNLOAD.

&----


*& Form call_download

&----


  • text

----


FORM CALL_DOWNLOAD.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'C:\test.txt'

FILETYPE = 'ASC'

APPEND = 'X'

TABLES

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.

ENDIF.

ENDFORM. "call_download

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question