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: 

regarding loop at screen

Former Member
0 Kudos

Hi frnds,

This is the code i have written , actually i have obligatory selection-options.

so when i m pressing second radio-button its asking for values to be enterd in obligatory select-options.

so wht shuld be done.

as when i press second radio-button it shuld make the second select-options invisible.

so wht shuld be done.

<code>

REPORT ZTEST_VALIDATE.

TABLES : bsis.

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',

sp_all RADIOBUTTON GROUP rad,

sp_all1 radiobutton group rad.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

SELECT-OPTIONS : so_bukrs FOR bsis-bukrs OBLIGATORY MODIF ID sp1.

SELECT-OPTIONS : so_hkont FOR bsis-hkont OBLIGATORY MODIF ID sp2.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF sp_all = 'X' OR SP_ALL1 = 'X'.

IF screen-group1 = 'SP2'.

screen-input = '0'.

screen-invisible = '1'.

  • screen-required = '1'.

  • screen-active = '1'.

MODIFY SCREEN.

ENDIF.

endif.

ENDLOOP.

</code>

regards,

karan

3 REPLIES 3

former_member583013
Active Contributor
0 Kudos

Try this...


type-pools: icon.

data: switch.

selection-screen begin of block b2 with frame title text-001.
parameters: radio radiobutton group rnd user-command test default 'X',
            radio2 radiobutton group rnd.
selection-screen end of block b2.

selection-screen begin of block b1 with frame title text-001.
parameters:
           test type bkpf-belnr modif id sc1.
selection-screen end of block b1.

selection-screen begin of block b3 with frame title text-001.
parameters:
           test1 type bkpf-belnr modif id sc2.
selection-screen end of block b3.

AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
  IF SCREEN-GROUP1 = 'SC1' AND RADIO EQ 'X'.
    SCREEN-ACTIVE = '0'.
    MODIFY SCREEN.
    CONTINUE.
  ELSEIF SCREEN-GROUP1 = 'SC2' AND RADIO2 EQ 'X'.
    SCREEN-ACTIVE = '0'.
    MODIFY SCREEN.
    CONTINUE.
  ENDIF.
ENDLOOP.

start-of-selection.

Kindly stealed from Rich Heilman...

Greetings,

Blag.

Former Member
0 Kudos

Remove the Obligatory from select-options and write the coding

for so_bukrs , so_hkont if they are initial ..

AT SELECTION-SCREEN.

IF sy-ucomm = 'ONLI'. <-- If F8 is pressed ...

if so_bukrs[] is initial.

message ...

endif.

if so_hkont[] is initial.

message ...

endif.

endif.

Former Member
0 Kudos

thnks..