‎2008 Jan 24 11:10 AM
There is input field in the screen . This fields count exists is from the Z table . the field is of numeric type.
By default this input field should be 1 and it should allows user only digit 2-9 else it should give error message .
What should be the code for this & where i should put this code in flow logic or or in user command .
I am new in module command . point is guranted.
‎2008 Jan 24 11:14 AM
Hello,
Do like this.
data: num(1) type n value '1'.
in PAI.
IF NUM LT '2' and NUM GT '9'.
error mesage.
endif.
Cheers,
Vasanth
‎2008 Jan 24 11:14 AM
Hello,
Do like this.
data: num(1) type n value '1'.
in PAI.
IF NUM LT '2' and NUM GT '9'.
error mesage.
endif.
Cheers,
Vasanth
‎2008 Jan 24 11:14 AM
You have 2 Requirements.
1. Default value should be 1.
Write the code in PBO event Module init_screen.
MODULE init_screen.
ZFIELD = '1'.
ENDMODULE.
2. Validation for the value should be between 2-9.
Write the code in PAI.
‎2008 Jan 24 11:17 AM
Hi Niraj
In your PAI logic, please add this code
FIELD field_name VALUES (between '2' and '9').
Where field_name is your screen field name which you want to validate.
Regards
Ranganath
PS : Reward points for all useful answers !
‎2008 Jan 24 11:21 AM
Hi Niraj,
Try this.
> Parameters: p_value type i default 1.
> Data number(15) type n.
> AT SELECTION-SCREEN
> number = p_value.
> if number cn '23456789'.
> message e888 ( sabapdocu ) with 'Wrong Number'.
> Endif.
Plzz reward if it is useful,
Mahi.