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

negative values in table control

former_member537489
Participant
0 Likes
1,481

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
Read only

Former Member
1,171

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
Read only

Former Member
0 Likes
1,171

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.

Read only

0 Likes
1,171

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

Read only

Former Member
1,172

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

Read only

0 Likes
1,171

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.

Read only

0 Likes
1,171

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

Read only

0 Likes
1,171

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

Read only

0 Likes
1,171

wonderful, thank you Christian.

And Thank you all for your help.

Roxani