2020 Feb 27 2:46 PM
I have generated a random number and stored in a local variable LV_RAND. I have to download that local variable data (random number stored in LV_RAND) using GUI_DOWNLOAD in to a text file in to desktop. Pls help me.
Thanks in advance.
2020 Feb 28 3:10 PM
Put any variable into internal table lt_datatab and use cl_gui_frontend_services for saving.
And read this.
DATA : l_fullpath TYPE string VALUE 'C:\file.txt',
l_path TYPE string.
APPEND VALUE ty_itab ( col = lv_rand ) TO lt_datatab.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = l_fullpath
filetype = 'ASC'
append = 'X'
TABLES
data_tab = lt_datatab
EXCEPTIONS
OTHERS = 1.
2020 Feb 28 5:43 PM
Hi Sravana,
Please note that I have changed the tags on your question. The tags you chose, SAP Cloud Platform, ABAP environment and SAP NetWeaver Application Server for ABAP, are not related to development; they are about the application server platform (or cloud platform).
Regards,
Matt Fraser
SAP Community Moderator