3

Is there a way from the main screen PBO to hide a subscreen field?

The subscreen is defined in a different Function group.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
FC777
  • 85
  • 1
  • 5
  • I have found this to be a most intriguing question. I am certain that if you know the right system calls (and I am sure they are referenced somewhere in BC land), then you can probably access the screen elements of another dynpro. – mydoghasworms Feb 01 '13 at 04:51
  • Just for interest, what is the function group and screen and field you want to hide? – mydoghasworms Feb 01 '13 at 04:51

2 Answers2

2

This is not possible: From the viewpoint of the main screen, the subscreen area is just a single element without further internal structure and cannot be examined or modified in detail. You would have to adapt the subscreen program to accept the screen modification data through some more or less generic programming interface and then perform the modification itself.

vwegert
  • 18,371
  • 3
  • 37
  • 55
0

Here is a possible solution:

If you want to control the visibility of a subscreen field from your main program, you will have to insert a LOOP AT SCREEN in the PBO of the subscreen program, as vwegert has already indicated.

If the subscreen in question belongs to a standard program and you cannot change it for that reason, you may be able to find an appropriate call to a subroute/form from a PBO module of the subscreen where you can insert an implicit enhancement. Inside this enhancement, you can put your code to modify the screen. (Of course, if it is not a standard program, you can just make the change anywhere in a PBO module).

Now, as to controlling the visibility from the main program: In your main program, you can set a flag and export it to memory with EXPORT TO MEMORY. In the PBO of the subscreen, you can then read this flag with IMPORT FROM MEMORY, and depending on the value, hide or show the field with LOOP AT SCREEN.

mydoghasworms
  • 18,233
  • 11
  • 61
  • 95