Application Development 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: 

SELECTION SCREEN EVENT

Former Member
0 Kudos

Hi Guys,

we have a customized selection program similar to RSNAST00. In that while maintaining the variant when the users enter values other than say "ZABC " in output type field (KSCHL) and press enter certain fields in the screen should not be available for input. I have written this event which is getting trigerred but no changes are done to the screen

AT SELECTION-SCREEN ON S_KSCHL.

LOOP AT SCREEN.

IF screen-group1 = 'SHP'.

IF s_kschl-low NE 'ZABC'.

SCREEN-INPUT = '1'.

ELSE.

SCREEN-INPUT = '0'.

ENDIF.

MODIFY SCREEN .

ENDIF.

ENDLOOP

Can anyone please advice me how to achieve this.

Thanks

Krithika

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try this.

AT SELECTION-SCREEN ON S_KSCHL.

IF s_kschl-low NE 'ZABC'.

LOOP AT SCREEN.

IF screen-group1 = 'SHP'.

SCREEN-INPUT = '1'.

MODIFY SCREEN .

ENDLOOP.

else.

LOOP AT SCREEN.

IF screen-group1 = 'SHP'.

SCREEN-INPUT = '0'.

MODIFY SCREEN .

ENDLOOP.

endif.

Sharin.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Try this.

AT SELECTION-SCREEN ON S_KSCHL.

IF s_kschl-low NE 'ZABC'.

LOOP AT SCREEN.

IF screen-group1 = 'SHP'.

SCREEN-INPUT = '1'.

MODIFY SCREEN .

ENDLOOP.

else.

LOOP AT SCREEN.

IF screen-group1 = 'SHP'.

SCREEN-INPUT = '0'.

MODIFY SCREEN .

ENDLOOP.

endif.

Sharin.

Former Member
0 Kudos

Do it in the PBO not PAI of the selection screen, that is use

AT SELECTION-SCREEN OUTPUT event

like

Data:
  w_kschl type kschl.

Select-options:
  s_kschl for w_kschl.

Parameters:
  char(5)." modif id shp.


AT SELECTION-SCREEN OUTPUT.

IF s_kschl-low NE 'ZABC' and s_kschl-low is not initial..

LOOP AT SCREEN.
IF screen-name CS 'CHAR'.
SCREEN-INPUT = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
ENDIF.

With luck,

Pritam.

former_member188685
Active Contributor
0 Kudos

This should be done at at selection-screen output event.

AT SELECTION-SCREEN OUTPUT. "It is OUTPUT
LOOP AT SCREEN.
IF screen-group1 = 'SHP'.
IF s_kschl-low NE 'ZABC'.
SCREEN-INPUT = '1'.
ELSE.
SCREEN-INPUT = '0'.
ENDIF.
MODIFY SCREEN .
ENDIF.
ENDLOOP

Former Member
0 Kudos

Hi

AT SELECTION-SCREEN OUTPUT.
if S_KSCHL is intial or S_KSCHL ne ZABC.
 LOOP AT SCREEN.
      IF screen-group1 EQ 'NAM'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-group1..
    ENDLOOP.                           " Loop at screen..
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 EQ 'NAM'.
        screen-active = 1.
        MODIFY SCREEN.
      ENDIF.                           " IF screen-group1..
    ENDLOOP.                           " Loop at screen..

Regards,

Sravanthi

Former Member
0 Kudos

Hi Krithika,

Recently 3 days before i have posted the same question and i got the solution which i am sharing you. I am having a drop box input field where if i select NO from the dropdown then automatically concern fields has to be disabled.

In PBO

IF ZFORMA-CISWK = 'NO'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'ZFORMA-YISWK'. "field will become inactive

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

In PAI

IF ZFORMA-CISWK = 'YES'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'ZFORMA-YISWK'. "field will be active

SCREEN-INPUT = 1.

SCREEN-ACTIVE = 1.

SCREEN-OUTPUT = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

It is work with me fine.

Hope my answer will help you.

Cheers!!

Former Member
0 Kudos

Thank you so much guys all your answers were very helpful. Rewarded everyone.

Former Member
0 Kudos

Thanks Everyone