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

LOOP AT SCREEN

Former Member
0 Likes
520

Hi,

In 4.6c, In my Selection-Screen, I have two fields(Select-Options) for Ex:

S_SELOPT1

S_SELOPT2

If some value is entered in my first select option i.e S_SELOPT1, then the second select option i.e S_SELOPT2 should be disabled. Can someone help me with this?

Thanks!!!!!

4 REPLIES 4
Read only

Former Member
0 Likes
492

Hi Nitish,

In declaration give one group ID for one block and anothe group ID for second block.

U can get this using

AT SELECTION-SCREEN OUPUT event.

after this,

LOOP AT SCREEN.

IF SCREEN-GROUP = ' '.

SCREEN-INVISIBLE = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Regards

Kannaiah

Read only

Former Member
0 Likes
492

write the code in

at selection-screen ouput.

assign two modif ids for the two sel options and proceed as

if not s1_opt1[] is initial,    
loop at screen.
if screen-group1 = 'ABC'.
screen-active = '0'.
modify screen .
endif.
endloop.
endif.

execute the code.

****************************

tables marc.

select-options :so_matnr for marc-matnr modif id abc,

so_werks for marc-werks modif id def.

at selection-screen output.

if not so_matnr[] is initial.

loop at screen .

if screen-group1 = 'DEF'.

screen-active = '0'.

modify screen.

endif.

endloop.

endif.

for disabling put screen-input = '0'.

regards,

vijay.

Read only

Former Member
0 Likes
492
REPORT YCHATEST.

TABLES : MARA.

SELECT-OPTIONS : S_MATNR FOR MARA-MATNR,
                 S_MATNR1 FOR MARA-MATNR.

AT SELECTION-SCREEN OUTPUT.

  IF NOT S_MATNR[] IS INITIAL.
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'S_MATNR1-LOW' OR
         SCREEN-NAME = 'S_MATNR1-HIGH'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
Read only

Former Member
0 Likes
492

Hi Nitesh,

Run the below code,

<b>REPORT zex25 .

TABLES : vbak.

SELECT-OPTIONS : s_seopt1 FOR vbak-vbeln MODIF ID md1,

s_seopt2 FOR vbak-netwr MODIF ID md2.

AT SELECTION-SCREEN OUTPUT.

IF NOT s_seopt1[] IS INITIAL.

LOOP AT SCREEN.

IF screen-group1 = 'MD2'.

screen-input = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

ENDIF.

START-OF-SELECTION.</b>