Skip to Content
author's profile photo Former Member
Former Member

report to find all Z* objects (or just programs...) containing a string

How could I find all Z* objects (or just programs...) containing a string.

Is there a standard report?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:36 AM

    Maybe I was not precise enaught. I ment how to find Z* programs/objects with a string in source code .

    Thank you in advance

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:19 AM

    Hi Tina,

    you could use the report RSRSCAN1 or in transaction

    SE38 Menu [Utilities][Find in Source code]

    Hope this helps

    Regards

    Bernd

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:21 AM

    Hi Tina, i did it in this way.

    First i put the Report in an internal table:

    READ REPORT TADIR-OBJ_NAME INTO ITAB.

    second:

    LOOP AT ITAB.

    *

    SEARCH ITAB FOR P_TEXT. (Your text)

    *

    IF SY-SUBRC = 0.

    WRITE: / ITAB.

    ENDIF.

    *

    ENDLOOP.

    Regards, Dieter

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 07:26 AM

    Hi,

    Go to SE11 Tcode.

    Type TADIR against the table radio button.

    Click display.

    Press CTRLshiftF10 to view the table contents.

    Type z* against object name field.

    Press F8.

    Then you can see zll the z* objects.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 07:12 AM

    goto se38 - > givein Z* and press F4.

    Regards

    - Gopi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:13 AM

    Hi tina,

    1. we can use ABAP_SCAN_DATA_DESCRIPTION program.

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 07:16 AM

    Hi,

    If you want all z* programs,go to SE11 and type z8 against table or view whatever you need and press F4.

    If you want all z* programs,go to SE38 and type z* and press F4.

    If you want all z* function module,go to SE37 and type z* and press F4.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 08:27 AM

    Hi Tina,

    here the whole Coede:

    PROGRAM ZGRO_TEST.

    *

    TABLES: TADIR, TRDIR, TRDIRT.

    *

    SELECTION-SCREEN: BEGIN OF BLOCK A01 WITH FRAME TITLE MELDUNG0.

    *

    SELECTION-SCREEN: SKIP.

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(28) T_PGMID.

    PARAMETERS: P_PGMID LIKE TADIR-PGMID MODIF ID DSP DEFAULT 'R3TR'.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP.

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(28) T_OBJ.

    PARAMETERS: P_OBJ LIKE TADIR-OBJECT MODIF ID DSP DEFAULT 'PROG'.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP.

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(25) T_REPID.

    SELECT-OPTIONS: S_REPID FOR TADIR-OBJ_NAME.

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP.

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 01(28) T_SEATXT.

    PARAMETERS: P_SEATXT(20).

    SELECTION-SCREEN: END OF LINE.

    *

    SELECTION-SCREEN: SKIP.

    SELECTION-SCREEN: END OF BLOCK A01.

    *

    • Definition der BDC-Tabelle

    DATA: BEGIN OF BDCDATA OCCURS 500.

    INCLUDE STRUCTURE BDCDATA.

    DATA: END OF BDCDATA.

    *

    DATA: CTU_PARAMS_0 LIKE CTU_PARAMS.

    *

    DATA: BEGIN OF ITAB OCCURS 0,

    TEXT(72),

    END OF ITAB.

    *

    DATA: BEGIN OF REPORT_HEADER OCCURS 0,

    REPID LIKE SY-REPID,

    DEVCLASS LIKE TADIR-DEVCLASS,

    CNAM LIKE TRDIR-CNAM,

    CDAT LIKE TRDIR-CDAT,

    UNAM LIKE TRDIR-UNAM,

    UDAT LIKE TRDIR-UDAT,

    TEXT LIKE TRDIRT-TEXT,

    END OF REPORT_HEADER.

    *

    DATA: BEGIN OF REPORT OCCURS 0,

    REPID LIKE SY-REPID,

    DEVCLASS LIKE TADIR-DEVCLASS,

    CNAM LIKE TRDIR-CNAM,

    CDAT LIKE TRDIR-CDAT,

    UNAM LIKE TRDIR-UNAM,

    UDAT LIKE TRDIR-UDAT,

    LINE LIKE RSTXP-TDFIRST,

    TEXT(72),

    END OF REPORT.

    *

    DATA: FILENAME TYPE STRING,

    LINE LIKE RSTXP-TDFIRST.

    *

    AT SELECTION-SCREEN OUTPUT.

    *

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 EQ 'DSP'.

    SCREEN-INPUT = '0'.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    *

    INITIALIZATION.

    *

    MELDUNG0 = 'Datenselektion'.

    T_REPID = 'Reportselektion'.

    T_PGMID = 'Programm-ID'.

    T_OBJ = 'Objekttyp'.

    T_SEATXT = 'String'.

    *

    S_REPID-SIGN = 'I'.

    S_REPID-OPTION = 'CP'.

    S_REPID-LOW = 'Z*'.

    APPEND S_REPID.

    *

    START-OF-SELECTION.

    *

    PERFORM MELDUNG USING 'Einlesen der Daten'.

    PERFORM EINLESEN_DATEN.

    *

    PERFORM MELDUNG USING 'Suchfunktion aktiv'.

    PERFORM FUNKTION_SUCHEN.

    *

    END-OF-SELECTION.

    *

    AT LINE-SELECTION.

    *

    PERFORM SE38 USING REPORT-REPID REPORT-LINE.

    *

    FORM EINLESEN_DATEN.

    *

    CLEAR:: REPORT, REPORT_HEADER, ITAB.

    REFRESH: REPORT, REPORT_HEADER, ITAB.

    *

    SELECT * FROM TADIR WHERE PGMID = P_PGMID

    AND OBJECT = P_OBJ

    AND OBJ_NAME IN S_REPID.

    *

    SELECT SINGLE * FROM TRDIR WHERE NAME = TADIR-OBJ_NAME.

    *

    SELECT SINGLE * FROM TRDIRT WHERE SPRSL = SY-LANGU

    AND NAME = TADIR-OBJ_NAME.

    *

    REFRESH: ITAB.

    *

    READ REPORT TADIR-OBJ_NAME INTO ITAB.

    *

    REPORT-REPID = TADIR-OBJ_NAME.

    REPORT-DEVCLASS = TADIR-DEVCLASS.

    REPORT-CNAM = TRDIR-CNAM.

    REPORT-CDAT = TRDIR-CDAT.

    REPORT-UNAM = TRDIR-UNAM.

    REPORT-UDAT = TRDIR-UDAT.

    *

    LOOP AT ITAB.

    *

    REPORT-LINE = SY-TABIX.

    REPORT-TEXT = ITAB-TEXT.

    *

    APPEND REPORT.

    *

    ENDLOOP.

    *

    ENDSELECT.

    *

    ENDFORM.

    *

    FORM FUNKTION_SUCHEN.

    *

    SY-TVAR0 = 'Funktion Suche:'.

    SY-TVAR1 = P_SEATXT.

    *

    LOOP AT REPORT.

    *

    SEARCH REPORT-TEXT FOR P_SEATXT.

    *

    IF SY-SUBRC = 0.

    WRITE: / REPORT-REPID,

    REPORT-CNAM,

    REPORT-CDAT,

    REPORT-UNAM,

    REPORT-UDAT,

    REPORT-LINE RIGHT-JUSTIFIED,

    REPORT-TEXT.

    HIDE: REPORT-REPID, REPORT-LINE.

    ENDIF.

    *

    ENDLOOP.

    *

    ENDFORM.

    *

    FORM SE38 USING REPID LINE.

    *

    REFRESH BDCDATA.

    *

    PERFORM BDC_DYNPRO USING 'SAPLWBABAP' '0100'.

    PERFORM BDC_FIELD USING 'RS38M-PROGRAMM' REPID.

    PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SHOP'.

    *

    PERFORM BDC_DYNPRO USING 'SAPLS38E' '0400'.

    PERFORM BDC_FIELD USING 'RSTXP-TDFIRST' LINE.

    PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

    *

    CALL TRANSACTION 'SE38' USING BDCDATA MODE 'E'.

    *

    ENDFORM.

    *

    FORM BDC_DYNPRO USING PROGRAM DYNPRO.

    *

    CLEAR BDCDATA.

    BDCDATA-PROGRAM = PROGRAM.

    BDCDATA-DYNPRO = DYNPRO.

    BDCDATA-DYNBEGIN = 'X'.

    APPEND BDCDATA.

    *

    ENDFORM.

    *

    FORM BDC_FIELD USING FNAM FVAL.

    *

    CLEAR BDCDATA.

    BDCDATA-FNAM = FNAM.

    BDCDATA-FVAL = FVAL.

    APPEND BDCDATA.

    *

    ENDFORM.

    *

    FORM MELDUNG USING TEXT.

    *

    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

    EXPORTING

    • PERCENTAGE = 50

    TEXT = TEXT

    EXCEPTIONS

    OTHERS = 1.

    ENDFORM.

    Regards, Dieter

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.