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

Creating a Text File

Former Member
0 Likes
838

Hi Guys

How would I create a text file on the local mcahine where sap is installed? like in c:\ I want to create myfile.txt I cannot seem to find any sample abap code..

Thanx,

Jan

4 REPLIES 4
Read only

Former Member
0 Likes
771

There are different methods to create a text file based on your requirements, for example if you want to save your internal table data into a text file you can use a class method CL_GUI_FRONTEND_SERVICES->GUI_DOWNLOAD and save the file as c:\xxx.txt

Read only

Former Member
0 Likes
771

First populate the text to an internal table and create the file using FM GUI_DOWNLOAD.

Search the forum with GUI_DOWNLOAD, you will get lots of sample codes.

Regards

Karthik D

Read only

0 Likes
771

Cool, thanx!

Read only

Former Member
0 Likes
771

Hi,

If you ar trying to move any information from within your code into a text file and create the file in your desktop , then you can use the function module GUI_DOWNLOAD which will automatically create the file on your desktop once your program is run.

Do let me know if it worked for you.

Regards,

MD