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

gui_upload problem

Former Member
0 Likes
403

Hello experts,

i had a problem with bdc , i am getting like "specified table name not recgonised" while debugging.

I have written the coding like this.

data : begin of itab occurs 0 with header line.

field1 like mara-matnr,

field2......

etc,

end of itab.

data: file1 type string.

parameter :file like rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

static = 'X'

mask = space

field_name = 'FILE'

CHANGING

file_name = file.

START-OF-SELECTION.

FILE1 = FILE . "HERE I AM PASSING INTO STRING

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = FILE1

  • FILETYPE = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = itab.

HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.

file structure is same as the internal table.

I stored the file as .txt( ie in notepad).

my file is like this..

10000 200 323 sunndarrr.......

when i am using the ws_upload it is working fine.

please guide me where i have done the mistake.

thank you so much for all the replies.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
386

hi,

check out in this way ..Bring the itab declaration near to the GUI_UPLOAD FM .. When you are using occurs 0, with header line is not required ...

data: file1 type string.

parameter :file like rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

static = 'X'

mask = space

field_name = 'FILE'

CHANGING

file_name = file.

START-OF-SELECTION.

FILE1 = FILE . "HERE I AM PASSING INTO STRING

data : begin of itab occurs 0,

field1 like mara-matnr,

field2......

etc,

end of itab.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = FILE1

  • FILETYPE = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = itab.

2 REPLIES 2
Read only

Former Member
0 Likes
387

hi,

check out in this way ..Bring the itab declaration near to the GUI_UPLOAD FM .. When you are using occurs 0, with header line is not required ...

data: file1 type string.

parameter :file like rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

static = 'X'

mask = space

field_name = 'FILE'

CHANGING

file_name = file.

START-OF-SELECTION.

FILE1 = FILE . "HERE I AM PASSING INTO STRING

data : begin of itab occurs 0,

field1 like mara-matnr,

field2......

etc,

end of itab.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = FILE1

  • FILETYPE = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = itab.

Read only

Former Member
0 Likes
386

parameter :p_file like rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

you have mention file in parameters and using p_filename in at selection event ,

rectify it your problem will solved