Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Saving file at runtime

Former Member
0 Likes
528

Hi,

I need to create a file at runtime (by selecting the drive and to create a file) for storing the contents of internal table into file

IS there any FM available,as it needs to ask the directory and after typing filename, it needs to save.

Kindly do the needful.

Regards,

sathish.

3 REPLIES 3
Read only

Former Member
0 Likes
497

Hi,

Do you need to display the Saving location to the user ? If that is your requirement then you can use the following function module: POPUP_TO_SAVE.

Hope that will help. Else let me know.

Thanks,

Samantak

Rewards points for useful answers.

Read only

Former Member
0 Likes
497

From your description it sounds like you want to use GUI_DOWNLOAD after getting the filename using something like the cl_gui_frontend_services=>file_save_dialog method... if so, have a look at this example:

http://www.sapdevelopment.co.uk/file/file_updownpop.htm

and there are plenty more within SDN.

Jonathan

Read only

Former Member
0 Likes
497

Hi,

Thanks for your replies. Actually my requirement is that user needs to create a file at runtime (by pressing F4 in selection screen and in the dialog box, he needs to enter the filename and directory where the file needs to be stored) and then the datas should be passed to that file using GUI_DOWNLOAD.

I tried with F4_FILENAME but it allows to get the path for the existing file .

Kindly assist me.