11-06-2007 8:13 AM
Hi,
I have designed screen painter and in that I have added weight field from vekp-ntgew. My problem is suppose if I enter negative value in that field on the screen it is giving dump but I dont want like I just want to display error message like negative values not allowed in weight. How to avoid the dump for negative values in the screen. Please help me.
Thanks.
11-06-2007 8:45 AM
Hi Babji,
I believe it is the processing part which is giving you the dump.
For example .if your field is an integer type field or number type field
the obviously it would not accept the -ve sign and hence dump the program.You can change the datatype of the particular field to numc and then try.
Reward points if helpful
11-06-2007 8:49 AM
Hi Babji,
this happens because the domain used for the field vekp-ntgew doesn't accept a sign (its always +ve). You can use some other domain allowing sign or create a new one & allow the sign. Then you can have a check on this field.
11-06-2007 8:50 AM
in PAI of the screen..write the following code
FIELD <fieldname> MODULE <module_name>.
fieldname is where u r entering negative value and give any module name.
IN the module write..
IF <fldname>+0(1) = '-'.
message e000.
endif.
This will do it..
Hope it helps..reward if it does
11-06-2007 9:01 AM
in the screen painter.
in the end give a 'V' sign to avoid dump due to negative value.
The negative value will be displayed in the screen.
In the TEXT attribute give as ___.___.___.___,___V