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: 

How to set the fields invisible when its contents are empty?

Former Member
0 Kudos

Hi all,

I’m changing the subscreen from standard screen for mobile device interface, i.e. function group LMOB.

Originally before the changes, the screen 2212 in LMOB displays the fields that contain values and hides the fields that are empty.

But after I’ve changed to use customized subscreen 1212 in function group XLRF, all the fields are displayed regardless if they contain values or not.

What should I do in order to have the same display as in the original one in my subscreen 1212?

Thanks in advance.

8 REPLIES 8

Former Member
0 Kudos

if <val of element1> = ''

loop at screen.

if screen-name = <element>

screen-invisible = 1.

endif.

endloop.

endif.

check if this works.

Remember to reward points to the answer(s) that helped you.

0 Kudos

This is perhaps more refined -

if <screen_field> is initial.
  loop at screen.
    if screen-name = <screen_field>.
      screen-active = 0.
      modify screen.
    endif.
  endloop. 
endif.

Regards,

Anand Mandalika.

0 Kudos

And please close your previous threads.

Regards

Raja

0 Kudos

Hi,

I'd like to ask what is the <element> in

screen-name = <element> ?

0 Kudos

Hi Macy,

The element that you're talking about is the name of the screen-field that you wish to hide. Obviously, there would be a program variable which will have the same name as the screen element (to support automatic data transfer between the screen and the program).

Regards,

Anand Mandalika.

0 Kudos

Yes, as Anand put it rightly, it is the screen field I was referring to.

0 Kudos

Hi all,

I have the fields defined in the subscreen.

But the logic of checking empty fields in in the PBO module in the main screen.

How could I pass the screen field in the subscreen to the PBO module in the main screen ?

0 Kudos

Hi Macy,

Why don't you put the logic in the PBO of the subscreen instead ?

There's no concept of passing the data between the main screen and the subscreen. Since the main screen and the subscreen cannot have elements with the same name, there's no ambiguity.

Regards,

Anand Mandalika.