Application Development 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: 

Run SM20 in background with variant

Former Member
0 Kudos

I need to supply SM20 report of a particular user and trying to schedule it as a batch job. I am unable to do so in 46C environment.

Has anyone able to achieve something like this?

8 REPLIES 8

Former Member
0 Kudos

Hi,

I think it is not possible with a variant. Instead you can use the BAPI's explained in RSAU_AUDITLOG_EXTERNAL example.

ferudun

Former Member
0 Kudos

Hi Annie,

As mention by Ferudun it is not possible to execute SM20 in background as such. The best appraoch will be to execute SM20 and then save output as local file and then send it across to the concerned person in e-mail.

Regards.

Ruchit.

0 Kudos

Got the answer from SAP that starting from 46C Support Pack 52, we can run SM20(report RSAU_SELECT_EVENTS) in background with variant.

0 Kudos

I thought of that but didn't know that it was available for 46C.

Did you see / try RSAU_READ_AUDITLOG_EXTERNAL?

0 Kudos

Julius,

I try to limit the report reading to a particular user in Report RSAU_READ_AUDITLOG_EXTERNAL but it still produce the report for all users. The instance name parameter makes me wonder if it only reads the audit file from that particular instance. In SM20, we can read the audit logs from all instances. Not too sure if RSAU_SELECT_EVENTS reads from all instances as I am unable to test at the moment. Are you able to confirm this?

Thanks,

Annie

0 Kudos

<b>RSAU_READ_AUDITLOG_EXTERNAL</b>

It looks like it runs on the application server which the system user is logged into. This is default local:

PARAMETERS:
         RFCDEST   LIKE  RFCDES-RFCDEST        DEFAULT 'NONE',

... until you go outside of the system by changing the destination or explicitly to a different application server.

<b>RSAU_SELECT_EVENTS</b>

Here you can choose which application server you want to read from:

SELECT-OPTIONS server     FOR rsauentr-slginst.  "Instanzen"
    SELECT-OPTIONS client     FOR rsauentr-slgmand.  "Mandanten"
    SELECT-OPTIONS user       FOR rsauentr-slguser.  "Benutzer"
    SELECT-OPTIONS terminal   FOR rsauentr2-slgltrm2."Terminals"
    SELECT-OPTIONS tcode      FOR rsauentr-slgtc.    "Transaktionen"
    SELECT-OPTIONS report     FOR rsauentr-slgrepna. "Programme

... so you can choose 1, or more (select single values or ranges), or all application servers from within the same SID.

  call function 'TH_SERVER_LIST'
    tables
      list   = sys_tabl
    exceptions
      others = 1.
  if sy-subrc = 1.
    raise not_available.
  endif.

0 Kudos

Hi Guru,

i want to have this rsau_select_events program in 4.7 with support pack 38 .Can this program be downloaded just with snote and support pack 38.Can anybody give the step by step procedure for having this rsau_select_event( detail from support packs to snote in 4.7)

Thanks

Khaiser

0 Kudos

Hi Anni,

we are on 4.7 with sp level SAPKB62038 .I want to know for 4.7 what is the minimum required sp level

Thanks

Khaiser