1
votes

in my PBO Module I have something like this:

  LOOP AT SCREEN.
    IF screen-name EQ 'LBL_TEST'.
      screen-invisible = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

I want to set 'LBL_TEST' visible again after some User-Command in the PAI-Module. How can I do it?

Best regards, Timur

2

2 Answers

3
votes

You have to do it in PBO. You can set a global parameter when your operation completed and then check it. Like:

DATA: gv_checker.

PROCESS AFTER INPUT.
 case ok_code.
   when 'some_opp'.
     gv_checker = 'X'.
 endcase. 
PROCESS BEFORE OUTPUT.
LOOP AT SCREEN.
    IF screen-name EQ 'LBL_TEST'.
      screen-invisible = '1'.
      MODIFY SCREEN.
    ENDIF.
    if IF screen-name EQ 'LBL_TEST' and gv_checker = 'X'.
      screen-invisible = '0'.
      MODIFY SCREEN.

    endif.
ENDLOOP.
1
votes

Can't you check the value of sy-ucomm in the PBO? (I haven't checked myself, and don't know by heart, this is why I am asking.) If not, you can declare a global variable:

DATA: gv_ucomm TYPE sy-ucomm.

Move the value of sy-ucomm into this global variable in the PAI:

gv_ucomm = sy-ucomm.

And check the value of it in the PBO:

IF gv_ucomm EQ '...'.
... "turn on field
ELSE.
... "turn off field
ENDIF.