How to calculate Tcode execution count
Hello Friends ,
I request your help with a few points. I need to customize a GRC report which is currently fetched from NWBC. I need to replicate most of the functionality of the standard report. But the challenge is that I dont know the standard report which fetches raw data because it is triggered from NWBC.
1. Need to calculate how many times ( execution count ) a tcode was run by a user.
2. Is it possible to get the standard reports which fetch data from NWBC. The report is generated as shown in attached screenshot.
Please let me know if I can add any further details for clarity.
Alessandro Banzer replied
the program synchronises each execution of an action to the table GRACACTUSAGE for action usage and role usage to GRACROLEUSAGE.
To get the calculated number of executions by a user you need to count the entries in the table. Last execution can also be read since the execution date for each single execution is stored with a timestamp.
From SQL point of view you can use:
SELECT user, max(execution_date), count(*) from GRACACTUSAGE GROUP BY user
Hope this helps.