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: 

To adjust the layout for different subtypes

Former Member
0 Kudos

Hi ,

I got a requirement where in i need to create a custom infotype with 2 subtypes. I am using the single screen(2000 screen)

for the layout for both the subtypes.For subtype one i hv used a box and placed the required elements and for the subtypes two i hv placed another box to place the required elements. I am making them invisible in my code depending on the subtype selected. I hv used custom controls in subtype i which i hv placed them in a box. Now when i am using subtype 2 in my infotype , I am getting a gap of that box size which i hv placed in subtype 1 and then i am able to view subtype 2 box layout.

How can i remove this gap and move the box above and make it visible? Help is required for this. Please anyone has an idea on this.

Thanks and regards,

Uma.

2 REPLIES 2

venkat_o
Active Contributor
0 Kudos

Hi Uma, It is easy to hide based on subtype u have selected. Give name say XYZ1 to Box one and XYZ2 to box two.

if p9010-subty = '1'.
  loop at screen .
    if screen-name = 'XYZ2'.
      screen-active = '0'.
      modify screen.
      clear screen.
    endif.
  endloop.
elseif p9010subty = '2'.
  loop at screen .
    if screen-name = 'XYZ1'.
      screen-active = '0'.
      modify screen.
      clear screen.
    endif.
  endloop.
endif.
I hope that it solves ur problem. Regards, Venkat.O

Former Member
0 Kudos

Hi Venkat,

I hv already tried it using looping at screen. But still i find a gap

between the standard header which we get and the subtype2 screen element box.

Is there any other way to do it?