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: 

negative values in table control

former_member537489
Participant
0 Kudos

Dear experts, I use a DEC field in a table control, but when the user enters a negative value there, it gives an error : 'negative values not allowed'. What should I do in my screen so that to overcome this problem?

Thank you

Roxani

1 ACCEPTED SOLUTION

Former Member

what is the field that u had used in the table control , and what is the dataelement of the field that is used??

7 REPLIES 7

former_member181962
Active Contributor
0 Kudos

Use a string or char type variable in the table control and then move that value entered in the table control into a Dec type variable in the module pool program.

0 Kudos

So, should I use another format than DEC? I cannot see any format named VAR.

Former Member

what is the field that u had used in the table control , and what is the dataelement of the field that is used??

0 Kudos

sekhar,

this is the data element i'm using:

Data type CURR Currency

No. characters 13

Decimal places 2

Output length 18

Convers. routine

sign = yes

please help.

0 Kudos

Hi Roxani,

You can use a data element or data type (CHAR) of length 18 directly.

In the PAI section, read the value entered on the table control into another variable of type CURR.

Regards,

Ravi

0 Kudos

Hi Roxani!

Your dynpro just don't know where to put the sign. Define an edit mask in the attributes of the screen field '______V'(it's the field, where already the underline is in, delete the last underline and put V(orzeichen - german word for sign)).

Regards,

Christian

0 Kudos

wonderful, thank you Christian.

And Thank you all for your help.

Roxani