ABAP 屏幕开发激活显示

记录一个关于自开发屏幕中的先激活不显示screen-active ,再激活显示时(screen-active 1),屏幕字段不显示的问题。

 

 实现效果

 

问题解决是因为再 MODIFY SCREEN 语句时,更新active 属性时联动改变了 

input output invisible 这三的属性 后续更新显示时,需修正该属性即可实现

 

 

 

参考代码

REPORT zlan_test5.

INCLUDE zlan_test5_status_0100o01.


START-OF-SELECTION.
CALL SCREEN 100.


屏幕逻辑流模块代码
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STANDARD_FULLSCREEN'.
* SET TITLEBAR 'xxx'.

*先激活ZC1不显示
  LOOP AT SCREEN.
    IF screen-group1 = 'ZC1'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

*再激活ZC2显示
  LOOP AT SCREEN.
    IF screen-group2 = 'ZC2'.
      screen-input     = 1.
      screen-output    = 1.
      screen-invisible = 0.
      screen-active    = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

ENDMODULE.
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.

  CASE sy-ucomm.
    WHEN '&F03' OR '&F15' OR '&F12' .
      LEAVE PROGRAM.
    WHEN OTHERS.
  ENDCASE.

ENDMODULE.

 

 

 

posted @ 2020-01-07 16:10  Lan_dev  阅读(569)  评论(0编辑  收藏  举报