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

Problem with Read dataset

Former Member
0 Likes
637

Hello all,

I am reading a file (stored in a DAT format on application server) with READ DATASET statement. there is one quantity field (MENGE) and Currency field (WRBTR).

When I read the file into an internal table the data record in internal table is getting appended with addition 20 like this.

Actul valueValue in internal table

WRBTR MENGE WRBTR MENGE

71.66 1 20202020071.66 2020202001.200

113.75 1 20202020113.75 2020202001.200

how to remove this additional '20'?

Has anyone faced a similar problem before?

Regards,

Anup

Message was edited by: Anup Deshpande

Message was edited by: Anup Deshpande

Message was edited by: Anup Deshpande

6 REPLIES 6
Read only

FredericGirod
Active Contributor
0 Likes
589

20 means " " (space) in hexa.

Fred

Read only

Former Member
0 Likes
589

Hi Anup,

20 is the hexadecimal equivalent for space.

In which mode did you open the file?

Open the file in text mode. and see if the problem exists.

Regards,

Ravi

Read only

Former Member
0 Likes
589

I think you are opening the file in binary mode and writing it.. Use text mode with encoding ... this should solve your problem

Read only

0 Likes
589

Hello,

I am opening the file in text mode. Still problem exists.

Regards,

Anup

Read only

0 Likes
589

maybe the problem is the conversion, you have set directly the value of the file into the table. Better is to read data into a char field and use MOVE to let SAP convert the value into the end-field.

Fred

Read only

Former Member
0 Likes
589

Can you paste your code for the file open/read part?