checking whether function module is obsolete or not
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
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.