‎2009 May 07 3:09 PM
Hello,
Frequently, our auditors request ST03N information that we run for them and send to them. this information includes the number of users logged on in a certain period, the transactions that theuser has executed in the certain period, the number of times a tcode was executed in a certain period. we would like to create a process where the auditors could perform this themselves.
I am looking for a way to accomplish this. I would to create a something that could call ST03N with the selction criteria by the auditors , but I am not sure if ST03N can be called in the program and pass the parameters. I am also looking at using the CDHDR and CDPOS tables to get the information.
my question is if anyone has done anything like this before and if so, what process did you use.
I am also looking for any others ideas on how to do this and if the ideas that I mentioned above would work
thanks in advance for the help.
‎2009 May 08 6:02 PM
Hello
I have been searching the SDN and I found the following FM SAPWL_STATREC_DIRECT_READ that I could get to work.
does anyone have any information on this.
I am comparing the output from the FM that I ran selecting information for my id and the output from the ST03N on my ID that I ran. In ST03N I can see the tcodes that I executed for a certain period of time. in the output from the FM I cannot see this tcode information.
is there something that I am missing on this or is it that this FM does not produce this type of information
thanks..
‎2009 May 07 3:34 PM
For ST03N you can call fm SAPWL_AS_WORKL_GET_STATISTIC
and for CDHDR/CDPOS you can use like the following
submit rsscd100 with objekt = object_class
with objektid = objectid
with udate = yctc-erdat
and return.
a®
‎2009 May 07 3:43 PM
I am looking a the CDHDR and CDPOS tables and I am not seeing the information that I thought I would. I did some transactions and then I looked in the CDHDR table and I did nto see the entries.
can someone tell me what tables store the user and the tocde information that is used for the ST03N transaction or if there are other tables that store this information
thanks...
‎2009 May 07 3:56 PM
ST03N data get stored in file in OS level.( that also have limitation of some MB of filesize maintained by basis) Its not getting stored in any sap database tables. If you want to read the data you need to use function module mentioned in my earlier reply,
and CDHDR or CDPOS will not contain any data related to user transactions. its meant for change documents ( on field level)
a®
‎2009 May 07 4:08 PM
u can have a look in transactions of STAU, STAH(if my memory is correctly working, these r the transactions!).....and take F1 help in these transactons.....currently i dont hv SAP access, so, i can not
thanq
‎2009 May 07 4:28 PM
I am on my development system and I have entered some tcode.
I am now running the function module SAPWL_AS_WORKL_GET_STATISTIC with the following information
periodtype = M
hostid = my host id
startdate = 05/01/2009
and the FM is returning NO_DATA_FOUND
I am not sure if I am entering the correct data or not
I have tried SAPWL_TABSTAT_GET_STATISTIC, and SAPWL_WORKLOAD_GET_STATISTIC and I am getting the same NO_DATA_FOUND message
‎2009 May 08 6:02 PM
Hello
I have been searching the SDN and I found the following FM SAPWL_STATREC_DIRECT_READ that I could get to work.
does anyone have any information on this.
I am comparing the output from the FM that I ran selecting information for my id and the output from the ST03N on my ID that I ran. In ST03N I can see the tcodes that I executed for a certain period of time. in the output from the FM I cannot see this tcode information.
is there something that I am missing on this or is it that this FM does not produce this type of information
thanks..
‎2009 May 08 7:02 PM
Please check this code, its working fine for me
select instshort from sapwlserv into rsystem
up to 1 rows
where host = sy-host.
endselect.
data : speriod(1) type c default 'D', "Period type D, M, Y
call function 'SAPWL_WORKLOAD_GET_STATISTIC'
exporting
periodtype = speriod
hostid = rsystem
startdate = sdate
only_application_statistic = 'X'
tables
application_statistic = tt_summu
exceptions
unknown_periodtype = 1
no_data_found = 2
others = 3.
a®
‎2009 May 12 1:59 PM
a®s
thanks for sending the code. I am working with this in a test program and I am not sure about the statement
tables
application_statistic = tt_summu
I am tihinking that this is a internal table.
do you have the definition or layout for this table?
thanks
‎2009 May 12 2:09 PM
Here it is
data tt_summu like sapwlustcx occurs 250 with header line.
and check for
loop at tt_summu.
move tt_summu-entry_id(40) to v_tcode. " Contains the report name or Tcode
a®
‎2009 May 12 2:45 PM
a®s
thanks for the update!!
this is working great. one more thing - is there a way to get the short text for the report/transaction field?
I did not see it in the tt_summu table after the function call.
if this is not possible, I think I can get from the TSTCB unless you know of a better wsay to get this information
thanks..
‎2009 May 12 2:48 PM
‎2009 May 12 2:58 PM
Description of Tcode you need to select from TSTCT table using Tcode, fm will not return the Tcode description
a®
‎2009 May 12 3:02 PM
a®s
okay. that is what I thought I would have to do if the FM could not send it back
I think I am good to go here.
thanks for all of the help on this.
‎2011 Jan 05 3:15 PM
I have gone through the entire thread. I am trying to implement a similar scenario but the FM returns NO_DATA_FOUND for me.
Can somebody help me with why is this happening?
I have given the required parameters still its not working.
Roshan