ABAP find out all program screens?

落花浮王杯 提交于 2019-12-12 18:46:16

问题


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:

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


回答1:


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 ?



来源:https://stackoverflow.com/questions/35316043/abap-find-out-all-program-screens

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!