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: 

Problems with GUI_UPLOAD

Former Member
0 Kudos

Hallo,

i use the GUI_UPLOAD like this

*

...

DATA: BEGIN OF ITAB OCCURS 100,

MATNR LIKE MARA-MATNR,

GROES LIKE MARA-GROES,

BRGEW LIKE MARA-BRGEW,

NTGEW LIKE MARA-NTGEW,

GEWEI LIKE MARA-GEWEI,

END OF ITAB.

...

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = X_FILE

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = ITAB

EXCEPTIONS

FILE_OPEN_ERROR = 1

FILE_READ_ERROR = 2

UNKNOWN_DP_ERROR = 3.

*

the (external) X_FILE has the Content (Example):

10832 25x80 0,065 0,065 KG

I get allways an Error with 0,065. When i use 0.065

it works correkt.

Is there any Parameter in GUI_UPLOAD where i can use 0,065 (perhaps DAT_MODE).

Thanks for help.

Regards, Dieter

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

It is preferred/Better to have all the fields of input internal table of type char with suitable length while using FM <b>GUI_DOWNLOAD</b> and once it is filled then you can move to relevant fields for populating...

Regards,

Raj

5 REPLIES 5

Former Member
0 Kudos

Hi,

It is preferred/Better to have all the fields of input internal table of type char with suitable length while using FM <b>GUI_DOWNLOAD</b> and once it is filled then you can move to relevant fields for populating...

Regards,

Raj

0 Kudos

just check the numeric format in ur system...

go sytem->userprofile->owndata

go to defaults there and change the format to what ever required like .format or , format...

0 Kudos

Hallo Raj,

i think this is the right way, because i use the uploadet

File for Direct Input. It works good when using Char-Format.

Thanks for Help!

Regards, Dieter

Former Member
0 Kudos

Hi dieter,

1. U already have the answer.

2. User settings are important.

3. If the user settings are ,

then the file data has to be in comma.

4. If we want to use the user settings explicitly,

then we have to use DAT_MODE

DAT_MODE = 'X'.

regards,

amit m.

athavanraja
Active Contributor
0 Kudos

what sort of file is it?

a CSV? then you will have problem if you have commas in filed values.

alternate is to go for text tab delimited file.

Regards

Raja