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

Reading MONI table to obtain tcode usage data

Former Member
0 Likes
1,403

Hello,

Could you please help me with the following question?

I am trying to write a program that reads the MONI table and obtain tcode execution data, basically I need the user id and tcode that was executed.  It will be fine if additional information is provided.  I know this could be obtained manually thorugh ST03N, but it would take too long to do it manually. 

What would be the right function call/program to use here so that we can retrieve that information?  It would be great if you have the piece of code to accomplish this and share it.

Thanks in advance,

2 REPLIES 2
Read only

Former Member
0 Likes
854

Hi Jose,

***************************************************

1. Table MONI field Clustd , contains RAW DATA

   SO THE FIRST THING IS TO KNOW WHICH KIND OF DATA

   IE. FIELDS, INTERNAL TABLE ETC.

   IT CONTAINS.

***************************************************

   This can be known via IMPORT Command.

   Sample Program is:

-


DATA : CDIR LIKE TABLE OF CDIR WITH HEADER LINE.

*----


IMPORT META DATA

IMPORT DIRECTORY INTO CDIR FROM DATABASE MONI(DB)

ID 'SYSEVENT20041008074601'.

BREAK-POINT.

just look into internal table CDIR, it contains 3 fields.

1 SY-DATUM -- FIELD

2. SY-UZEIT --- FIELD

3. V_SYSTEM_EVENT_TAB  -- TABLE

2. NOW TO GET DATA U CAN AGAIN USE IMPORT COMMAND

DATA : MYDATE TYPE SY-DATUM.

IMPORT SY-DATUM  TO MYDATE FROM DATABASE MONI(DB)

ID 'SYSEVENT20041008074601'.

BREAK-POINT.

3.  JUST TAKE CARE OF

    A: DB

    B: SYSEVENT20041008074601

    A and B should be in your moni table.

4. for the 3rd field, V_SYSTEM_EVENT_TAB

   I don't know what is the related structure.

   otherwise we can import it in the same way,

   by declaring an internal table of the related

   structure.

HOPE THIS HELPS.

Have a look at the link for more discussions   http://scn.sap.com/thread/28323

Regards,

Vikram

Read only

Former Member
0 Likes
854

Vikram,

Thanks for your response.  Does this take into account that the data in the MONI table is encrypted?  Basically, I would need the function program that the ST03N tcode uses to decrypt and then show the actual tcode usage information on the screen.  Is this program that you suggest going to address that?

Thanks again!