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: 

make second selection screen block invisible

UmaArjunan
Active Participant
0 Kudos

I HAVE TWO BLOCKS IN THE SELECTION SCREEN.

in the first block

two selectoption fields.

then i hv 2 radio button and one check box.

in the second block i hv 2 radio buttons

if the check box is checked in the first block then the second block shoulbe invisible.

how to make the second block invisible. in this.

10 REPLIES 10

b_deterd2
Active Contributor
0 Kudos

Hi,

In the event AT-SELECTION SCREEN OUTPUT you have to LOOP AT SCREEN and make certain fields invisible.

regards,

bert

Former Member
0 Kudos

Hello friend,

this is not possible, blocking of items is possible only if you select radio buttons. by selecting only check box screen loop will not be iterated. if you want to do like that, you should select atleast one radio button with that.

Regards,

Ajay

0 Kudos

BY DEFAULT one radio buton in the first block is selected.

only when the check box is selected in the first block , the whole second block should be invisible

0 Kudos

send ur code

i will update

Regards,

ajay

0 Kudos

hi experts,

following is my code.

check at selection -screen part..

it makes entire screen invisible.

kindly modify the code according to the requirement

Sure i will reward points for all the replies

thanks

****************Selection Screen*******************************

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

SELECT-OPTIONS: s_date FOR sy-datum MODIF ID md1,

s_po FOR wa_purord-object_id.

PARAMETERS: p_oldpo RADIOBUTTON GROUP rad1,

p_newpo RADIOBUTTON GROUP rad1,

p_chbox AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN END OF BLOCK b_block.

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

PARAMETERS: p_rtf RADIOBUTTON GROUP rad2,

p_csv RADIOBUTTON GROUP rad2.

SELECTION-SCREEN END OF BLOCK c_block.

*************At Selection Screen *******************************

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

if

IF p_chbox = 'X'.

screen-input = 1.

else.

screen-input = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

0 Kudos

Try this

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_oldpo = 'X' and p_chbox = 'X' and screen-group1 = 'RAD2'.

screen-input = 0.

modify screen.

ELSEIF p_newpo = 'X' and p_chbox = 'X' and screen-group1 = 'RAD2'.

screen-input = 0.

modify screen.

ENDIF.

ENDLOOP.

Former Member
0 Kudos

hI,

Check this code if it suits ur req:

Selection-screen begin of block b1.

Parameters: s1 radiobutton group g1 user-command u1 default 'X',

p_name(10) MODIF ID M1,

p_email(20) MODIF ID M1,

s2 radiobutton group G1,

p_name1(10) MODIF ID M2,

p_fax(10) MODIF ID M2,

s_box as checkbox USER-COMMAND U1.

Selection-screen end of block b1.

Selection-screen begin of block b2 WITH FRAME NO INTERVALS.

Parameters: p_name2(10) modif id m3 .

Selection-screen end of block b2.

AT SELECTION-SCREEN OUTPUT.

IF S_BOX = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M3'.

SCREEN-ACTIVE = '0'.

MODIFY SCREEN.

ELSE.

SCREEN-ACTIVE = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

IF S1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M2'.

SCREEN-ACTIVE = '0'.

MODIFY SCREEN.

ELSEIF SCREEN-GROUP1 = 'M1'.

SCREEN-ACTIVE = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF S2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M1'.

SCREEN-ACTIVE = '0'.

MODIFY SCREEN.

ELSEIF SCREEN-GROUP1 = 'M2'.

SCREEN-ACTIVE = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Former Member
0 Kudos

Hi,

Find the code below.

parameter p_cha1 as checkbox user-command test.

selection-screen begin of block b1 WITH FRAME TITLE TEXT-T01.

PARAMETER: P_MAT TYPE C MODIF ID G1.

SELECTION-SCREEN END OF BLOCK B1.

at selection-screen output.

if p_cha1 eq 'X'.

loop at screen.

IF SCREEN-GROUP1 EQ 'G1'.

SCREEN-active = '0'.

modify screen.

ENDIF.

endloop.

endif.

Regards,

Vamshidhar .

Former Member
0 Kudos

tables:mara.

selection-screen begin of block rad1 with frame .

select-options:matnr for mara-matnr.

select-options:mtart for mara-mtart.

parameters: radio1 radiobutton group rad1 user-command test default 'X'.

parameters: radio2 radiobutton group rad1 .

parameters:check1 as checkbox user-command a.

Selection-screen END OF block rad1.

SELECTION-SCREEN BEGIN OF block rad2 with frame.

parameters: radio3 radiobutton group rad2 modif id RA1.

parameters: radio4 radiobutton group rad2 modif id RA1.

Selection-screen END OF block rad2.

at selection-screen output.

loop at screen.

if check1 = 'X' and screen-group1 = 'RA1'.

screen-active = '0'.

modify screen.

endif.

endloop.

reward if useful

0 Kudos

Siddharth,

Thanks for your code.its helpful.

When the check box is selected as per your code,

while pressing F8.

I need to display the content in the ALV grid format.

how to proceed with this

At user - command.

can you please provide some helpful code