2009 Sep 17 7:51 AM
hi experts....
i want to check only the last digit as 0 , if last digit is 0 it has to proceed further i want to restrict in selection screen iitself ...say suppose
im my select option if the user inputs the G/L as 207600 it gets along else should send a msg...
select-option : so_hkont for bseg-hkont obligatory,
for eg.
if G/L 207600 ---> it gets in
207800
207810
error
++++
if G/L 207601
207602
207893
how to restrict?? pls help
thanks in advance
2009 Sep 17 7:53 AM
Use the AT SELECTION-SCREEN INPUT ON event and write the logic to check if the final digit is zero and throw the error message
Use the AT SELECTION-SCREEN INPUT ON event and write the logic to check if the final digit is zero and throw the error message
2009 Sep 17 7:53 AM
Use the AT SELECTION-SCREEN INPUT ON event and write the logic to check if the final digit is zero and throw the error message
2009 Sep 17 8:13 AM
thanks for your rep
i already tried the logic as
selection-screen : begin of block b1 with frame title text-001.
select-options: so_hkont for bseg-hkont obligatory .
selection-screen: end of block b1.
AT selection-screen INPUT On so_hkont-low .
if so_hkont+9(1) = '0'.
message 'Enter House Bank G/L' type 'I'.
Endif.but getting error as INPUT not expected
can u suggest something
2009 Sep 17 8:22 AM
Hi,
Try
AT selection-screen on so_hkont.
if so_hkont-low+9(1) = '0'.
But it will be good, if you can use hknot as parameter. Since if it is select-options, their can be lot of possiblities(range,include,exclude,etc.,) needs to be taken care while checking.
2009 Sep 17 8:30 AM
Hi,
Try like this,
selection-screen : begin of block b1 with frame title text-001.
select-options: so_hkont for bseg-hkont obligatory .
selection-screen: end of block b1.
AT selection-screen INPUT On so_hkont.
loop at so_hkont.
if so_hkont-low+9(1) = '0'.
message 'Enter House Bank G/L' type 'I'.
Endif.
endloop.
Regards,
Vikranth
2009 Sep 17 8:12 AM
2009 Sep 17 8:33 AM
Hi Arun,
Check this code. It will match ur requirement.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: so_hkont FOR bseg-hkont OBLIGATORY .
SELECTION-SCREEN: END OF BLOCK b1.
AT SELECTION-SCREEN ON so_hkont.
IF so_hkont-low IS NOT INITIAL.
IF so_hkont-low+9(1) NE '0'.
MESSAGE 'Enter House Bank G/L' TYPE 'I'.
ENDIF.
ENDIF.
IF so_hkont-high IS NOT INITIAL.
IF so_hkont-high+9(1) NE '0'.
MESSAGE 'Enter House Bank G/L' TYPE 'I'.
ENDIF.
ENDIF.
Thanks,
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |