2009 Jul 31 5:54 AM
Hi all,
we have a requirement to validate parameter values ,
parameter values should be less than or equal to 12 and should accept 2 decimals .
how to declare parameter?
eg: 11.34, 12.00
regards
sridhar
2009 Jul 31 6:07 AM
Hi,
Try the following
parameters: p_in(5) type p decimals 2.
at selection-screen on p_in.
if not p_in <= 12.
message e398(00) with 'Enter a value less than 12' .
endif.
Regards,
Vik
should accept 2 decimals .
PARAMETERS : p1 type p DECIMALS 2.this automatically comes with validation.
and for less than 12, keep logic in at selection-screen event.
both AT SELECTION-SCREEN. and AT SELECTION-SCREEN. on p1 works.
AT SELECTION-SCREEN.
IF p1 > 12.
MESSAGE 'Provide values less than 12' type 'E'.
ENDIF.and
AT SELECTION-SCREEN ON p1.
IF p1 > 12.
MESSAGE 'Provide values less than 12' type 'E'.
ENDIF.the difference between these tow is the later displays the error on that particular field (useful when you have multiple fields in selection screen)
hope this helps.
Somu
Edited by: soumya prakash mishra on Jul 31, 2009 8:01 AM
2009 Jul 31 5:57 AM
HI,
Use AT SELECTION-SCREEN Event for validation.
Secondly, use parameter as m_amount type p decimals 2.
regds,
Anil
2009 Jul 31 6:04 AM
Yes you are right ,
I need to restrict the value to 12 before decimal place in selection screen
system should not allow to user to enter greater than 12 before decimal places.
2009 Jul 31 6:11 AM
Hi Sridhar,
To restrict to 12 decimals use the following write statement in selection screen.
Write:/<F> decimals 12.
Hope it helps
Regards,
Pavan.
2009 Jul 31 6:04 AM
PARAMETERS : p_amount TYPE p DECIMALS 2.
AT SELECTION-SCREEn ON p_amount.
IF .....
MESSAGE ...
ENDIF.
2009 Jul 31 6:07 AM
Hi,
Try the following
parameters: p_in(5) type p decimals 2.
at selection-screen on p_in.
if not p_in <= 12.
message e398(00) with 'Enter a value less than 12' .
endif.
Regards,
Vik
2009 Jul 31 6:14 AM
Hi,
AT SELECTION-SCREEN .
*To Validate the selection screen
PERFORM screen_validate .
FORM screen_validate .
IF p_data CA '0123456789' AND
p_data >= 12.00 .
ELSE.
MESSAGE e000(zp) WITH text-008 .
ENDIF.
Thanks
Ashu
2009 Jul 31 6:16 AM
Helloo dude,
Please close the thread once u got the required answer :).
Tnx,
Joe
2009 Jul 31 6:19 AM
should accept 2 decimals .
PARAMETERS : p1 type p DECIMALS 2.this automatically comes with validation.
and for less than 12, keep logic in at selection-screen event.
both AT SELECTION-SCREEN. and AT SELECTION-SCREEN. on p1 works.
AT SELECTION-SCREEN.
IF p1 > 12.
MESSAGE 'Provide values less than 12' type 'E'.
ENDIF.and
AT SELECTION-SCREEN ON p1.
IF p1 > 12.
MESSAGE 'Provide values less than 12' type 'E'.
ENDIF.the difference between these tow is the later displays the error on that particular field (useful when you have multiple fields in selection screen)
hope this helps.
Somu
Edited by: soumya prakash mishra on Jul 31, 2009 8:01 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |