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

Doubt in GUI Upload

Former Member
0 Likes
946

Hi All,

I am using function module as follows to upload orders to database.File is created in required format on given path with same name as c:\va01.txt.

But when i run my program its showing exception as "CANNOT INTERPRETE DATA IN FILE"

What can be the problem?We usually upload same type of file and data in file is correct.Can anybody suggest me the solution or atleast tell me what could be the problem.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\VA01.txt'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = '#'

TABLES

DATA_TAB = IT_ORDER.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
924

Hi,

I guess HAS_FIELD_SEPARATOR = 'X' should come instead of HAS_FIELD_SEPARATOR = '#'.

Regards,

Ramya

Hi All,

I am using function module as follows to upload orders to database.File is created in required format on given path with same name as c:\va01.txt.

But when i run my program its showing exception as "CANNOT INTERPRETE DATA IN FILE"

What can be the problem?We usually upload same type of file and data in file is correct.Can anybody suggest me the solution or atleast tell me what could be the problem.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\VA01.txt'

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = '#'

TABLES

DATA_TAB = IT_ORDER.

7 REPLIES 7
Read only

Former Member
0 Likes
925

Hi,

I guess HAS_FIELD_SEPARATOR = 'X' should come instead of HAS_FIELD_SEPARATOR = '#'.

Regards,

Ramya

Read only

Former Member
0 Likes
924

Hi,

I Guess There is a problem using '#' as Has field Seperator.

if you have used Tab has a seperator then you have to check this way as shown Below.

has_field_separator = 'X'

i guess this might solve your problem.

Reward if Helpfull,

Naresh.

Read only

Former Member
0 Likes
924

hi,

check that, in the flat file, what field separator u have give, u need to give a tab space.

as the data in flat file n the internal table structure r not matching, thats why ur getting that error.

so, make sure that the flat file structure, i mean the order of fields, field separator are correct. then the function module u given is correct, instead of giving field-separator as # give 'X'.

hope this may solve ur problem.

reward if helpful.

Read only

Former Member
0 Likes
924

hi,

give HAS_FIELD_SPERATOR = 'X'. for tab delimited file.

Read only

prasanth_kasturi
Active Contributor
0 Likes
924

hi,

gui upload works for only tab delimiter data files

so remove # and keep X in has field seperator

reward if helpful

prasanth

Read only

venkat_o
Active Contributor
0 Likes
924

Hi Deepak, Can u paste ur code, just by seeing that function module we can not say anything.. Regards, Venkat.O

Read only

Former Member
0 Likes
924

Hi