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: 

Read CURR15 from file

Former Member
0 Kudos

Hello,

I have to read some values from a file and fill them into some table. One value has to be filled into a CURR15 field. Whatever I read from the file I get a BAD_DATA_FORMAT error from the GUI_UPLOAD function. I I have experimented with many different values: 99999.00, 99999,00, 99999, 9999999999999, and much more. I always get the BAD_DATA_FORMAT error. For the time being I simply declare a c(18) as a work around. I'm a bit puzzled that such a simple thing causes problems.

Anybody has a clue what is happening here?

Thanks, Oliver Plohmann

4 REPLIES 4

Former Member
0 Kudos

Hi,

Whatever U read from a file should be filled into a char variable . U can later assign it to the respective fields in Internal table.

Thanks,

GSR

Former Member
0 Kudos

while reading data from a file all the fields in the internal table should be declared as chars

and later they can changed to their respective domains if necessary

0 Kudos

... and this is because you specify your upload either as text or binary. In case of text, you can only use chars in your primary internal table, in case of binary upload different types are possible.

0 Kudos

Hi,

I define a record that I fill with the contents of the CSV file calling GUI_UPLOAD which works fine. If the file contains invalid data the upload fails right away. I just changed the field in the record for the currency from CURR15 to N (numeric) and it works now. I still don't understand the problem as CURR15 is defined as a char.

Cheers, Oliver