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

Making one selection screen block invisible

Former Member
0 Likes
2,322

Hi,

I want to make one selection-screen block invisible based on one check box value.I have built the screen as follows:

PARAMETERS: pcheck1 TYPE char1 AS CHECKBOX.

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

PARAMETERS: pproj TYPE xxxx ,

psproj TYPE xxxx ,

pobjec TYPE xxxx .

SELECTION-SCREEN END OF BLOCK b2.

based on the pcheck value I want to meke the above "SELECTION-SCREEN BEGIN OF BLOCK b2 " invisible/visible.Can you please tell me how to do it?

Hi,

I want to make one selection-screen block invisible based on one check box value.I have built the screen as follows:

PARAMETERS: pcheck1 TYPE char1 AS CHECKBOX.

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

PARAMETERS: pproj TYPE xxxx ,

psproj TYPE xxxx ,

pobjec TYPE xxxx .

SELECTION-SCREEN END OF BLOCK b2.

based on the pcheck value I want to meke the above "SELECTION-SCREEN BEGIN OF BLOCK b2 " invisible/visible.Can you please tell me how to do it?

4 REPLIES 4
Read only

Former Member
0 Likes
1,542

For hiding the selection screen block you have to loop the screen and set the screen-input value as 0.

loop at screen.

if screen-name = ''. " give the block name here

screen-invisisble = 1.

endif.

endloop.

Read only

Former Member
0 Likes
1,542

hi,

at selection-screen output.
 if pcheck1 = 'X'.
  loop at screen.
    if screen-name eq 'P_STEXT' .
      screen-input = '0'.
      modify screen.
    endif.
endloop.
endif.

Read only

Former Member
0 Likes
1,542

You need to set values in structure SCREEN:

screen-invisible = '1' .

screen-input = '0' .

screen-output = '0' .

for all items contained in block.

For example:

AT SELECTION-SCREEN OUTPUT.

IF <condition>.

LOOP AT SCREEN.

CASE screen-name.

WHEN <block_name> OR

<parameter1> or <parameter1_text> or

...

<parameter_N> or <parameter_N_text> .

screen-invisible = 1.

screen-input = 0.

screen-output = 0.

WHEN OTHERS.

ENDCASE.

MODIFY SCREEN.

ENDLOOP.

You can find names of variables which contain parameter texts using debuger.

ELSEIF sy-tcode = 'ZEUA_EDB_EXPORT'.

p_path = 'ZUA_EDB_EXPORT'.

ENDIF.

Read only

Former Member
0 Likes
1,542

Moderator message - Please do not ask or answer basic questions - thread locked and points unassigned Rob