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

Former Member
0 Likes
644

Hi All,

In my program i have a function module like this

CALL FUNCTION 'GUI_UPLOAD'

exporting

filetype = 'ASC'

filename = 'C:\DOWNLOAD.TXT'

tables

data_tab = itab.

But in the internal table i am getting values like 598996#JPY#10118.

What is the problem how to solve this.Since the program is already in production i don't want to change the code.Can any one suggest me how i can define a fields in the file so that it can pick up properly.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

Hi sriram,

Define fields in your internal table with same type and length as that in flat file. I hope this will solve your problem.

reward if helpful,

kushagra

6 REPLIES 6
Read only

Former Member
0 Likes
616

Hi

The symbol ' # ' represents the white space in the flat file.

Read only

Former Member
0 Likes
617

Hi sriram,

Define fields in your internal table with same type and length as that in flat file. I hope this will solve your problem.

reward if helpful,

kushagra

Read only

former_member404244
Active Contributor
0 Likes
616

Hi,

Use HAS_FIELD_SEPARATOR in ur gui_upload FM..and see..

also before sending to production didn't u checked in devserver..

CALL FUNCTION 'GUI_UPLOAD'

exporting

filetype = 'ASC'

filename = 'C:\DOWNLOAD.TXT'

has_field_separaotor = 'X'

tables

data_tab = itab.

Regards,

Nagaraj

Read only

Former Member
0 Likes
616

The problem might be with de fieldseperator......

Check wats de fieldseperator u hav gine in dat FM

do it like below and in ur txt file give one tabspace between 2 fields....

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = filepath

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

tables

data_tab = itab

Read only

Former Member
0 Likes
616

Hi,

In that function module you have these many options,

if you want to display your data with out # mark and all you have to use HAS_FIELD_SEPARATOR.

HAS_FIELD_SEPARA = ' X '

NOW your internal table shows data as you really expected.

regards,

swami.

Read only

Former Member
0 Likes
616

Hi,

The # represents that your file has been downloaded with tab space, when you call the fm GUI_UPLOAD , just use the option HAS_FIELD_SEPARATOR = 'X'

Rgds,

Bujji