Application Development 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: 

reading data from flat file to internal table without selection screen

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

i have checked, its not open. its close.

Former Member
0 Kudos

Hi!

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

Close the file and run your program again.

Regards

Tamá

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi

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

Regards

Haritha

Former Member
0 Kudos

Hi vamsi,

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

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

Thanks.

kathryn_mcgallicher
Active Participant
0 Kudos

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--