Skip to Content
avatar image
Former Member

checking whether function module is obsolete or not

hi

i am developing a program that will have a selection screen where we can input name of the report program.

in that report program the program that i am developing has to check if it has any obsolete function modules like upload,download are obsolete function modules.the table that gives this data is RODIR.

so my report program must tel the function modules that are obsolete.

how can i pick the name of the function module used in the program.i have taken the report program in to internal table..so here how can i get the name of the function module.

thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 02, 2009 at 09:58 AM

    Hello

    Try this code:

    REPORT ZSEARCH.
    PARAMETERS: P_NAME LIKE D010SINF-PROG.
    DATA: PROGTXT(72) TYPE C OCCURS 0 WITH HEADER LINE.
    DATA: FUNCT TYPE RS38L_FNAM OCCURS 0 WITH HEADER LINE.
    
    READ REPORT P_NAME INTO PROGTXT.
    LOOP AT PROGTXT.
      IF PROGTXT CS 'CALL FUNCTION'.
        SEARCH PROGTXT FOR ''''.
        IF SY-SUBRC = 0.
          DO.
            SHIFT PROGTXT LEFT BY 1 PLACES.
            IF PROGTXT(1) = ''''.
              SHIFT PROGTXT LEFT BY 1 PLACES.
              DO.
                SHIFT PROGTXT RIGHT BY 1 PLACES.
                IF PROGTXT+71(1) = ''''.
                  SHIFT PROGTXT RIGHT BY 1 PLACES.
                  CONDENSE PROGTXT.
                  FUNCT = PROGTXT. COLLECT FUNCT. EXIT.
                ENDIF.
              ENDDO.
              EXIT.
            ENDIF.
          ENDDO.
        ENDIF.
      ENDIF.
    ENDLOOP.
    LOOP AT FUNCT.
      WRITE: FUNCT. NEW-LINE.
    ENDLOOP.
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 02, 2009 at 09:37 AM

    Use FM 'REPOSITORY_ENVIRONMENT_ALL' to get FM for a program.

    Pass Obj_type = PROG

    check all the checkbox for ENVIRONMENT_TYPES

    object_name = program name

    Deep = 1.

    You will get FM used inside the program, then goto RODIR table and get whether it is obsolete or not

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 02, 2009 at 09:38 AM

    This will help you.

    [function module used in the program|https://forums.sdn.sap.com/click.jspa?searchID=24370095&messageID=5842747]

    Add comment
    10|10000 characters needed characters exceeded