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

reading data from flat file to internal table without selection screen

Former Member
0 Likes
987

i'm reading from presentatiion server.

i have a sample notepad file with contains perners like

1

2

3

4

now i need to read this notepad file to internal table

after reading to internal table simply i need to add one more perner through program.

for this i'm taking an internal table

Data: begin of it_p0001 occurs 0,

pernr(20),

end of it_p0001.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\TEST.TXT'

FILETYPE = 'ASC'

TABLES

DATA_TAB = it_p0001.

but this function module giving an exception "File_open_error".

how to trouble shoot that.

7 REPLIES 7
Read only

Former Member
0 Likes
755

u would have opened the file & executed the program. close the text file & execute the program

Read only

0 Likes
755

i have checked, its not open. its close.

Read only

Former Member
0 Likes
755

Hi!

The file may be opened by another application (for example with notepad).

Close the file and run your program again.

Regards

Tamá

Read only

Former Member
0 Likes
755

Hi

I know it's stupid: but does that file exist?

Anyway remember you make sure the file is close when that fm is reading it

Max

Read only

Former Member
0 Likes
755

Hi

May be the file name which u gave is not there in cfolder.

Regards

Haritha

Read only

Former Member
0 Likes
755

Hi vamsi,

Give the full path name for your Flat file. Like,

FILENAME = 'C:\Documents and Settings\Administrator\Desktop\TRAIN1.TXT'.

Thanks.

Read only

kathryn_mcgallicher
Active Participant
0 Likes
755

Is the file on your PC actually named with all caps? I'm not positive, but I think the GUI_UPLOAD filename is case-sensitive.

K--