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

Hide screen

Former Member
0 Likes
620

Hi all,

The problem i am facing is like this.

There is screen in which there are already 4 frames with different

fields.

I have added 1 field at the bottom of the screen ( FIELD A)

&hided all othe frames on the screens by doing loop at screen.

The Field is visible to me but at the bottom.

I want that field (FIELD A) to move upward at the top when all fields are hidden.

how i can do that?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
587

Vikram,

Add that new field at top of the screen and add other frames.

When you hide the frames it will appear in top.

4 REPLIES 4
Read only

Former Member
0 Likes
587

The following works for me - the group should disappear when all the fields in it are set as inactive (screen-active = '0' 😞

report zlocal_hide_group.

selection-screen begin of block blk1 with frame.
parameters:
  p_field1             like sy-datum.
selection-screen end of block blk1.

selection-screen begin of block blk2 with frame.
parameters:
  p_field2             like sy-datum.
selection-screen end of block blk2.

at selection-screen output.
  perform at_selection_screen_output.

*&---------------------------------------------------------------------*
*&      Form  at_selection_screen_output
*&---------------------------------------------------------------------*
form at_selection_screen_output.

  loop at screen.
    if screen-name cs 'P_FIELD1'. "the field & its label
      screen-input  = '0'.
      screen-active = '0'.
      modify screen.
    endif.
  endloop.

endform.                    "at_selection_screen_output

Read only

Former Member
0 Likes
587

Hi,

Hiding the fields by making them invisible will only make them invisible, but will still be take the same space.

So if you need to move the field A up you have to define it first. You cannot change the position of any field dynamically. You can only make them active, input enabled/disabled or invisible dynamically.

Hope this explaination helps.

Regards,

Richa.

Read only

Former Member
0 Likes
588

Vikram,

Add that new field at top of the screen and add other frames.

When you hide the frames it will appear in top.

Read only

Former Member
0 Likes
587

Thanks you all. I have put the field on the top.