‎2009 Mar 10 12:40 PM
Hi Gurus.
I come from a mainframe environment where it was quite easy to determine when an object was created, last used and the number of times it was used.
Now I have moved over to SAP and I was wanting to know is it possible to determine the same for the various objectts on the system: Programs
Tables
Function Modules, etc
At this point I'm just looking for a way to do this manually.
Many Thanks
Panduranga
‎2009 Mar 10 2:21 PM
‎2009 Mar 10 12:43 PM
‎2009 Mar 10 12:58 PM
hi ,
copy the below pgm and execute i will show the all the pgm and reports and every thing in last two years...
* Internal tables and variables Declaration.
TABLES : trdir , tstc.
DATA : BEGIN OF t_output OCCURS 0,
name TYPE progname, "ABAP Program Name
tcode TYPE tcode, "Transaction Code
appl TYPE rdir_appl, "Application
secu TYPE secu, "Authorization Group
cnam TYPE cnam, "Author
cdat TYPE rdir_cdate, "Created on
unam TYPE unam, "Last changed by
udat TYPE rdir_udate, "Changed On
END OF t_output.
DATA : t_trdir TYPE STANDARD TABLE OF trdir WITH HEADER LINE,
t_tstc TYPE STANDARD TABLE OF tstc WITH HEADER LINE.
DATA : w_date TYPE sy-datum.
DATA : r_rname TYPE RANGE OF progname ,
wa_rname LIKE r_rname.
SELECT-OPTIONS : s_date FOR sy-datum.
INITIALIZATION.
* Taking two years past date
s_date-sign = 'I'.
s_date-option = 'BT'.
s_date-low = sy-datum - 730.
s_date-high = sy-datum .
APPEND s_date.
START-OF-SELECTION.
* Fetching details fpr program name
SELECT * FROM trdir INTO TABLE t_trdir
WHERE cdat IN s_date.
IF sy-subrc = 0.
* Fetching t-code for Program name
SELECT * FROM tstc INTO TABLE t_tstc
FOR ALL ENTRIES IN t_trdir
WHERE pgmna = t_trdir-name.
IF sy-subrc = 0.
ENDIF.
ENDIF.
* Sorting T-code data
SORT t_tstc BY pgmna.
* Arranging the Data into output table
LOOP AT t_trdir.
MOVE-CORRESPONDING t_trdir TO t_output.
READ TABLE t_tstc WITH KEY pgmna = t_trdir-name
BINARY SEARCH.
IF sy-subrc = 0.
MOVE-CORRESPONDING t_tstc TO t_output.
APPEND t_output.
CLEAR t_output.
ENDIF.
ENDLOOP.
END-OF-SELECTION.
IF t_output IS NOT INITIAL.
SORT t_output BY name DESCENDING.
* Displaying the Output report in LSI Standard
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
current_report = sy-repid
TABLES
data_tab = t_output.
IF sy-subrc <> 0.
ENDIF.
ELSE.
WRITE : ' No Data(Programs) found for given Date Range'.
ENDIF.
regards,
Prabhudas
‎2009 Mar 10 2:21 PM
‎2009 Mar 10 2:29 PM
‎2009 Mar 10 7:33 PM
Panduranga,
I always use, probably just an old habit, SAP table TVARV for storing my update times.This table was created for this.
Good Luck.
*get the last date
SELECT low high FROM tvarv INTO (zlast_rundt, zlast_runtm)
WHERE name = 'ZZISP_LAST_GM_DATE_TIME'.
ENDSELECT.
*Update TVARV with latest run info.
IF p_test IS INITIAL.
CLEAR: tvarv.
MOVE 'ZZISP_LAST_GM_DATE_TIME' TO tvarv-name.
MOVE 'S' TO tvarv-type.
MOVE '0000' TO tvarv-numb.
MOVE vnew_lastrun_dt TO tvarv-low.
MOVE vnew_lastrun_tm TO tvarv-high.
****************UPDATE TVARV EXEC DETAILS HERE****************
UPDATE tvarv.
‎2009 Mar 16 5:17 AM
So Many Answers
Thanks to all who contributed.
Regards
Panduranga