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

conversion error in table control

Former Member
0 Likes
1,530

I have a table control with a field defined like dec 20, and i have a table field defined like dec 15 positions 4 decimals, with signe, so.. long = 20, and when i try to pass to the table control for example the value 409.3461-,it gives me a dump with error conversion telling me that the sign has lost, i have tried in the table control with dec 15 too , but the same, i would thank any help.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,196

Hi,

I had faced the same issue with table controls and realized that the conversion error goes away if you put a 'V' in the Text attribute of the field. I had a field of type DEC 4, and I had to put in the text in the field as '___V' (3 spaces and a V at the end). In your case it looks like you will have to populate the field with 19 spaces and a V at the end.

I have seen the same thing in some of standard SAP screens, that is where i got the idea from, weird as it may sound.

Hope this helps.

Sudha

4 REPLIES 4
Read only

Former Member
0 Likes
1,196

Hi Carlson,

It is better to use a char type variable with length 20 although it is supposed to hold a decimal value.

I have faced a similar type of problem and i did the same.

Or You may be getting the dump because the field is expecting 15 + 4 + 1(for sign) + 1(for decimal) so total 21 chars.

REgards,

Ravi

Read only

Former Member
0 Likes
1,196

Check the domain of the receiving field and make sure it allows the sign. If it doesn't, either change the domain so that it does allow the sign or use a different domain that does allow a sign.

(If it's an SAP domain, don't change it.)

Rob

Read only

Former Member
0 Likes
1,197

Hi,

I had faced the same issue with table controls and realized that the conversion error goes away if you put a 'V' in the Text attribute of the field. I had a field of type DEC 4, and I had to put in the text in the field as '___V' (3 spaces and a V at the end). In your case it looks like you will have to populate the field with 19 spaces and a V at the end.

I have seen the same thing in some of standard SAP screens, that is where i got the idea from, weird as it may sound.

Hope this helps.

Sudha

Read only

0 Likes
1,196

Thank you very much for your quick replies, finally i have all data ok, excepting the text mask.

Thank you very much