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

upload source code from text file and then to internal table

Former Member
0 Likes
660

How to upload source code from a text file and then to internal table so that read report can be used.it is urgent please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
598

data : begin of itab occurs 0,

line type string,

end of itab.

call function 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\Testfile.txt'

filetyp = 'ASC'

TABLES

tables = itab

*--exceptions... call this GUI_UPLOAD.

now your ITAB will have the source code from the text file.

YOU can not use READ report to create program.

that is to read the source code from an existing program.

here is the way to create a program dynamically

<b>INSERT REPORT <prog> FROM <itab>.</b>

If a program with this name does not already exist, it is created with the following attributes:

Title: None

Type: 1 (report)

Application: S (basis)

REGARDS

SRIKANTH

Message was edited by: Srikanth Kidambi

data : begin of itab occurs 0,

line type string,

end of itab.

call function 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\Testfile.txt'

filetyp = 'ASC'

TABLES

tables = itab

*--exceptions... call this GUI_UPLOAD.

now your ITAB will have the source code from the text file.

YOU can not use READ report to create program.

that is to read the source code from an existing program.

here is the way to create a program dynamically

<b>INSERT REPORT <prog> FROM <itab>.</b>

If a program with this name does not already exist, it is created with the following attributes:

Title: None

Type: 1 (report)

Application: S (basis)

REGARDS

SRIKANTH

Message was edited by: Srikanth Kidambi

4 REPLIES 4
Read only

Former Member
0 Likes
598

use internal table type string...

upload source code from text file to intenal table using fm <b>gui_upload.</b>

Read only

Former Member
0 Likes
599

data : begin of itab occurs 0,

line type string,

end of itab.

call function 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\Testfile.txt'

filetyp = 'ASC'

TABLES

tables = itab

*--exceptions... call this GUI_UPLOAD.

now your ITAB will have the source code from the text file.

YOU can not use READ report to create program.

that is to read the source code from an existing program.

here is the way to create a program dynamically

<b>INSERT REPORT <prog> FROM <itab>.</b>

If a program with this name does not already exist, it is created with the following attributes:

Title: None

Type: 1 (report)

Application: S (basis)

REGARDS

SRIKANTH

Message was edited by: Srikanth Kidambi

Read only

0 Likes
598

thank u Srikanth. It worked.

Sathya

Read only

Former Member
0 Likes
598

declate one internal table with one field of type string or char(5000) , then use use GUI_UPLOAD FM to upload to that internal table ,

then u can use READ REPORT