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

Bad Data Format Exception in GUI_UPLOAD

Former Member
0 Likes
6,183

Hi,

I have downloaded user information using a program and am using another program to upload the same user in other clients.

While uploading the User Information records using GUI_UPLOAD, I get sy-subrc as 8 corresponding to Bad Data Format. Executing this FM as standalone with the same file, doesnt give any exceptions.

Please let me know if any of you has come across a similar situation.

Thanks,

Binu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,433

hi ,

cant really say when it is bad data format . if there are some currency fields with a ',' or '.' separators check this in SU3 and date formats.

Best solution i can think of is this is caused due to one particular data type format or in sequence of fields which is making subrc as 8 .

while uploading just pass field by field instead of all fields once and check where this error is occuring (subrc 8 ) then it can be narrowed to .

Br,

Vijay.

12 REPLIES 12
Read only

former_member156446
Active Contributor
0 Likes
3,433

if you are using HEADER_LENGTH parameter of Fm try to change it or remove it.

Read only

0 Likes
3,433

No, I am not using the HEADER_LENGTH parameter.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,433

Hello Binu,

Can you share the code here, it be more useful to analyze ur problem then?

BR,

Suhas

Read only

0 Likes
3,433

Hi friend,

Error may be due to parameter 'File type'.

Remove all exporting parameters except 'File name' which is mandatory in program.

Now try to debug and see what exception occurs.

Read only

Former Member
0 Likes
3,434

hi ,

cant really say when it is bad data format . if there are some currency fields with a ',' or '.' separators check this in SU3 and date formats.

Best solution i can think of is this is caused due to one particular data type format or in sequence of fields which is making subrc as 8 .

while uploading just pass field by field instead of all fields once and check where this error is occuring (subrc 8 ) then it can be narrowed to .

Br,

Vijay.

Read only

former_member156446
Active Contributor
0 Likes
3,433

try to change the file type to ASC or DAT rather than BIN

Read only

0 Likes
3,433

Hi All,

I had specified the filetype as ASC while downloading. While uploading when I specify the filetype as ASC, I got the Bad Data Format Exception. However on changing this to DAT, the exception disappears.

What could be the possible reason? As per my understanding, when I am downloading it in ASC format, I should be able to upload also in the same format.

Please correct me if I am wrong.

Thanks,

Binu

Read only

0 Likes
3,433

when I look at the code of FM, there is some restriction of the header length based on the file type.. thats some thing to do with the header type length thats allowed..

Read only

0 Likes
3,433

Hi,

With respect to Filetype, ASC, the FM documentation says that Only data types with fixed length are allowed.

In my case one of the fields(for Password ) has the Data type as RAW. Could this be a reason why I am getting the exception with filetype as 'ASC' ?

Thanks,

Binu

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,433

>

> I had specified the filetype as ASC while downloading. While uploading when I specify the filetype as ASC, I got the Bad Data Format Exception. However on changing this to DAT, the exception disappears.

>

> What could be the possible reason? As per my understanding, when I am downloading it in ASC format, I should be able to upload also in the same format.

> Please correct me if I am wrong.

Hello Binu,

Can you please check if the param. "DAT_MODE" was not passed while using GUI_DOWNLOAD. May be you have passed that in your FM.

If you did so then you need to pass "DAT_MODE" to GUI_UPLOAD as well.

NB: You can read the 'Long Text' on DAT_MODE param. for details.

Hope this helps.

BR,

Suhas

Read only

0 Likes
3,433

I am not 100% sure on it, but that could be a reason... well exception is not raised, that solves your issue I guess

Read only

0 Likes
3,433

Yes. the issue is resolved but cant quite understand why I am not able to upload with ASC format when I am downloading in ASC format.

Thanks all, for your inputs.

Binu