Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ST03N - process needed for user to perform this function

Former Member
0 Likes
1,784

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,651

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..

14 REPLIES 14
Read only

former_member194669
Active Contributor
0 Likes
1,651

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®

Read only

Former Member
0 Likes
1,651

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...

Read only

0 Likes
1,651

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®

Read only

0 Likes
1,651

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

Read only

Former Member
0 Likes
1,651

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

Read only

Former Member
0 Likes
1,652

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..

Read only

0 Likes
1,651

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®

Read only

0 Likes
1,651

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

Read only

0 Likes
1,651

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®

Read only

0 Likes
1,651

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..

Read only

0 Likes
1,651

sorry

should be TSTCT table

Read only

0 Likes
1,651

Description of Tcode you need to select from TSTCT table using Tcode, fm will not return the Tcode description

a®

Read only

0 Likes
1,651

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.

Read only

0 Likes
1,651

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