ABAP find out all program screens?

2019-07-17 04:28发布

I am new to ABAP and I want to make a program where there are multiple screens and an initial screen/home screen where one can see the list of all the program screens. I understand that I can hardcode them, but there's got to be a better way. And if there is any, what kind of field/area do I need to make for the list to be clickable (to go to screen). So far, I have made an initial screen and when GO button is pressed, it leads to the next screen.

REPORT Z_UZD_1_LOCAL.
CALL SCREEN 1001.
MODULE STATUS_1000 OUTPUT.
*  SET PF-STATUS 'ZMENU'.
*  SET TITLEBAR 'ZMENU_PAINTER'.
CASE SY-UCOMM.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
    WHEN 'BACK'.
      LEAVE PROGRAM.
     WHEN 'GO'.
      CALL SCREEN 1001.
  ENDCASE.
ENDMODULE.

MODULE STATUS_1001 OUTPUT.
*  SET PF-STATUS 'ZMENU'.
*  SET TITLEBAR 'ZMENU_PAINTER'.
CASE SY-UCOMM.
      WHEN 'GO2'.
      CALL SCREEN 1000.
  ENDCASE.
 ENDMODULE.

It looks like this:

screenshot

Go Personas button leads to the next screen. I would like to have a list of all the screens under the find button.

标签: sap abap
1条回答
仙女界的扛把子
2楼-- · 2019-07-17 04:46

You can read the table D020S
and its texttable D020T

with the key program = sy-repid, which should give You all Dynpros, which belong to ONE program ( in Your case sy-repid is Your actual program). Is that, what You want ?

查看更多
登录 后发表回答