Skip to end of metadata
Go to start of metadata

By default, SAP does not deliver its systems with up-to-date where-used lists. So, for example, if you search which program uses a given message (in SE91), you may not get a result, unless you rebuild the object list of the program which uses it.

Using SAPRSEUB program, you rebuild all the where-uses lists, but it will take a while (days), so don't do it!

See these notes for more information:

Instead, you may regenerate only part of them: the following code uses standard SAPRSEUI program to rebuild object list. Run it in background, it takes a while.

Error rendering macro 'code': Invalid value specified for parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'
* PLEASE RUN THIS PROGRAM IN BACKGROUND!
* The program will rebuild programs which belong to either:
*   - the entered software component and program names
*   - or the entered packages and program names
*   - or the entered programs only
* If none of them are entered, nothing happens

REPORT z_saprseui.
DATA g_dummyso_devc TYPE devclass.
DATA g_dummyso_prog TYPE progname_2.

* software component
PARAMETERS pa_dlvun TYPE dlvunit.
* package
SELECT-OPTIONS so_devc FOR g_dummyso_devc.
* program
SELECT-OPTIONS so_prog FOR g_dummyso_prog.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_prog-low.

START-OF-SELECTION.
  PERFORM main.

*
FORM main.
  DATA lt_tdevc TYPE TABLE OF tdevc.
  DATA ls_tdevc TYPE tdevc.
  DATA lt_tadir TYPE TABLE OF tadir.
  DATA ls_tadir TYPE tadir.
  DATA l_repid TYPE rsnewleng-programm.
  DATA lt_repid TYPE TABLE OF rsnewleng-programm.

  IF NOT pa_dlvun IS INITIAL.
    SELECT * FROM tdevc
              INTO TABLE lt_tdevc
              WHERE dlvunit = pa_dlvun
                AND devclass IN so_devc.
  ELSEIF so_devc[] IS NOT INITIAL.
    SELECT * FROM tdevc
              INTO TABLE lt_tdevc
              WHERE devclass IN so_devc.
  ELSEIF so_prog[] IS NOT INITIAL.
    SELECT name FROM trdir INTO TABLE lt_repid WHERE name IN so_prog.
  ENDIF.

* Pour chaque package, reconstruction des Object List de tous
* ses programmes
  LOOP AT lt_tdevc INTO ls_tdevc.
    SELECT * FROM tadir INTO TABLE lt_tadir
        WHERE pgmid = 'R3TR'
          AND object IN ('FUGR','FUGS','FUGX','PROG','TYPE','CLAS','INTF','LDBA','CNTX')
          AND devclass = ls_tdevc-devclass.
    LOOP AT lt_tadir INTO ls_tadir.
      CALL FUNCTION 'RS_TADIR_TO_PROGNAME'
        EXPORTING
          object   = ls_tadir-object
          obj_name = ls_tadir-obj_name
        IMPORTING
          progname = l_repid.
      IF l_repid IS NOT INITIAL AND l_repid IN so_prog.
        APPEND l_repid TO lt_repid.
      ENDIF.
    ENDLOOP.
  ENDLOOP.

  LOOP AT lt_repid INTO l_repid.
    SUBMIT saprseui
        WITH repname = l_repid
        AND RETURN.
    COMMIT WORK.
  ENDLOOP.

ENDFORM.                    "main
  • No labels

1 Comment

  1. Former Member

    This program is wonderful! I couldn't make the Basis team run SAPRSEUB, but with this program I can generate for the packages I'm involved in.