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

restriction in selection screen

Former Member
0 Likes
1,023

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
942

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

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

6 REPLIES 6
Read only

Former Member
0 Likes
943

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

Read only

0 Likes
942

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

Read only

0 Likes
942

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.

Read only

0 Likes
942

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

Read only

Former Member
0 Likes
942

This message was moderated.

Read only

awin_prabhu
Active Contributor
0 Likes
942

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,