cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out the Transactions used per month & the USER who used that

Former Member
0 Kudos

Hi,

1)How to find out the Transactions used per month & the USER who used that?

2)and can i get the above same for minimum 20 month?

System : SAP- Enterprise Core Component.

Accepted Solutions (0)

Answers (3)

Answers (3)

JPReyes
Active Contributor
0 Kudos

and can i get the above same for minimum 20 month?

ST03N and STAD only keep 2 days of information if you did not have the security audit log configured thats as much as you will get.

This topic has been discussed extensively, please do some research before posting

Regards

Juan

Former Member
0 Kudos

Hi Juan,

I'm Ok with 2 days for STAD but for ST03N it is configurable.

In our systems we keep data for

- the last 35 days

- the last 10 weeks

- the last 12 months

Regards,

Olivier

JPReyes
Active Contributor
0 Kudos

Certainly, but the standard is 2 days for statistical data, right?

Regards

Juan

Former Member
0 Kudos

You can use my program...

&----


*& Report Z_ABAP_TCODE_MONITOR

&&----


*

*****& Program Type : Report *

*****& Title : Z_ABAP_TCODE_MONITOR *

*****& Transaction code : ZTCODE_USAGE *

*****& Developer name : Shailendra Kolakaluri *

*****& Deveopment start date : 26 th Dec 2011 *

*****& Development Package : ZDEV *

*****& Transport No : DEVK906086 *

*****& Program Description : This program is to display

*List all tcodes executed during previous day.

*& Show the number of users executing tcodes

****&----


*& Modification history

&----


*&

*&

&----


REPORT Z_ABAP_TCODE_MONITOR.

&----


*& List all tcodes executed during previous day.

*& Show the number of users executing tcodes

&----


TYPE-POOLS : slis.

DATA: ind TYPE i,

fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,

layout TYPE slis_layout_alv,

variant TYPE disvariant,

events TYPE slis_t_event WITH HEADER LINE,

heading TYPE slis_t_listheader WITH HEADER LINE.

*REPORT z_report_usage.

TYPES: BEGIN OF zusertcode,

date TYPE swncdatum,

user TYPE swncuname,

mandt TYPE swncmandt,

tcode TYPE swnctcode,

report TYPE swncreportname,

count TYPE swncshcnt,

END OF zusertcode.

*data : date type n.

DATA: t_usertcode TYPE swnc_t_aggusertcode,

wa_usertcode TYPE swncaggusertcode,

wa TYPE zusertcode,

t_ut TYPE STANDARD TABLE OF zusertcode,

wa_result TYPE zusertcode,

t_result TYPE STANDARD TABLE OF zusertcode.

PARAMETER: month TYPE dats DEFAULT sy-datum.

*PARAMETER: date TYPE dats.

*select-options : username for wa_usertcode-account.

START-OF-SELECTION.

PERFORM get_data.

PERFORM get_fieldcatalog.

PERFORM set_layout.

  • PERFORM get_event.

  • PERFORM get_comment.

PERFORM display_data.

FORM get_data .

*date = sy-datum - 2 .

  • After start-of-selection add this line (parameter Month required 01 as day).

concatenate month+0(6) '01' into month.

CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'

EXPORTING

component = 'TOTAL'

ASSIGNDSYS = 'DEV'

periodtype = 'M'

periodstrt = month

TABLES

usertcode = t_usertcode

EXCEPTIONS

no_data_found = 1

OTHERS = 2.

wa-date = month.

*wa-date = date.

wa-mandt = sy-mandt.

  • wa_usertcode-account = username.

LOOP AT t_usertcode INTO wa_usertcode.

wa-user = wa_usertcode-account.

IF wa_usertcode-entry_id+72 = 'T'.

wa-tcode = wa_usertcode-entry_id.

wa-report = space.

ELSE.

wa-tcode = space.

wa-report = wa_usertcode-entry_id.

ENDIF.

COLLECT wa INTO t_ut.

ENDLOOP.

SORT t_ut BY report ASCENDING.

CLEAR: wa, wa_result.

endform.

FORM get_fieldcatalog .

  • fcat-tabname = 't_ut'.

  • fcat-fieldname = 'DATE'.

  • fcat-seltext_l = 'Date'.

  • fcat-key = 'X'.

  • APPEND fcat.

CLEAR fcat.

fcat-tabname = 't_ut'.

fcat-fieldname = 'MANDT'.

fcat-seltext_l = 'Client'.

fcat-key = 'X'.

APPEND fcat.

CLEAR fcat.

fcat-tabname = 't_ut'.

fcat-fieldname = 'USER'.

fcat-seltext_l = 'User Name'.

fcat-key = 'X'.

APPEND fcat.

CLEAR fcat.

fcat-tabname = 't_ut'.

fcat-fieldname = 'TCODE'.

fcat-seltext_l = 'Transaction Code'.

fcat-key = 'X'.

APPEND fcat.

ENDFORM.

&----


*& Form SET_LAYOUT

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM set_layout .

layout-colwidth_optimize = 'X'.

ENDFORM. " SET_LAYOUT

&----


*& Form GET_EVENT

*&----


    • text

*----


    • --> p1 text

    • <-- p2 text

*----


*FORM get_event .

*

  • events-name = slis_ev_top_of_page.

  • events-form = 'TOP_OF_PAGE'.

  • APPEND events.

*

*ENDFORM. " GET_EVENT

*&----


**& Form GET_COMMENT

*&----


    • text

*----


    • --> p1 text

    • <-- p2 text

*----


*FORM get_comment .

*

  • DATA: text(30).

*

  • text = 'Billing Report'.

  • heading-typ = 'H'.

  • heading-info = text.

  • APPEND heading.

*

*ENDFORM. " GET_COMMENT

*&----


**& Form top_of_page

*&----


    • text

*----


    • --> p1 text

    • <-- p2 text

*----


*FORM top_of_page .

*

  • CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

  • EXPORTING

  • it_list_commentary = heading[]

    • I_LOGO =

    • I_END_OF_LIST_GRID =

  • .

*ENDFORM. " top_of_page

&----


*& Form DISPLAY_DATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM display_data .

sort t_ut[].

  • DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

is_layout = layout

it_fieldcat = fcat[]

i_save = 'A'

is_variant = variant

it_events = events[]

TABLES

t_outtab = t_ut

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFORM. " DISPLAY_DATA

Former Member
0 Kudos

Hi,

In ST03 -> switch to Expert mode

In the Workload -> Expand Total -> Now you will get the Detailed analysis Menu for Days,months etc..

There double click on the desired month -> Under Analysis Views you see Transaction Profile and User Profile.

Select Tranaction profile -To see the Transactions in that Month.

Select User Profile _ To see Users in that Month.

Also T-code STAD will help you on this.

If you enable audit logs ,you can see the report from SM20 .

Regards,

Srini Chapa.

Former Member
0 Kudos

Hi,

If u enable the audit log trace their u can find.

And one more is t-code ST03 or ST03N here u can see the list of user id's what t-codes they used and also how much time.

U can see in STAD t-code also.

Regards,

Anil