Page 1 of 1

Auto run program when user logon to SAP system

Posted: Sat Nov 09, 2002 1:13 pm
by GL
Hi

Is there any function module or command that i can use in the program,
when the user logon to the system, i can auto trigger a program to run.
I only need to run once for each user.

Thank
Regards
GL :D

Posted: Sat Nov 09, 2002 2:05 pm
by Rich
You say 'Only run once per user'.

If that's literally once only, then how about selecting your data from the USR01... tables which will give you a list of users to work on.

If you mean once per login, then there is a user exit that is fired as the user completes logging in. I'm not on SAP at the moment but you can find these exits by using SMOD and the development class of the program.

Once per day will mean keeping a flag somewhere that is reset at midnight.

Rich

Posted: Sun Nov 10, 2002 1:49 am
by TwoABAPers
Hi,
SUSR0001 is the user-exit rich is talking about.
This exit is triggered on logon to SAP system.

Regards,
Sudhir/Mohit

Posted: Mon Nov 11, 2002 12:51 am
by GL
TwoABAPers wrote:Hi,
SUSR0001 is the user-exit rich is talking about.
This exit is triggered on logon to SAP system.

Regards,
Sudhir/Mohit
Thanks, will grive it a try. I actually need to run once for each user when they login. This is needed because only when the user login i will run a BDC program which will made some changes that will be saved in user-setting. I have setup a customised table to mainatin username and update flag. Once this user has run before it, it should not trigger this program anymore.

Regards
Gin Lai

Re: Auto run program when user logon to SAP system

Posted: Mon Nov 11, 2002 1:45 am
by tandt
You can set a transaction from 46X onwards, whenever a user logon to SAP using standard program ADMIN_SET_START_TRANSACTION_FO or use function module NAVIGATION_SET_START_TCODE.

Regards
TandT
GL wrote:Hi

Is there any function module or command that i can use in the program,
when the user logon to the system, i can auto trigger a program to run.
I only need to run once for each user.

Thank
Regards
GL :D

Posted: Thu Nov 14, 2002 11:41 am
by GL
TwoABAPers wrote:Hi,
SUSR0001 is the user-exit rich is talking about.
This exit is triggered on logon to SAP system.

Regards,
Sudhir/Mohit
Thanks Sudhir

I have tried and it works.. however, I have use cmod(customer user exit) instead of smod. Thanks for all other advices too. :p