Auto run program when user logon to SAP system

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
GL

Auto run program when user logon to SAP system

Post by GL » Sat Nov 09, 2002 1:13 pm

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

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Post by Rich » Sat Nov 09, 2002 2:05 pm

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

TwoABAPers
Posts: 990
Joined: Sun Oct 20, 2002 9:16 pm
Location: web
Contact:

Post by TwoABAPers » Sun Nov 10, 2002 1:49 am

Hi,
SUSR0001 is the user-exit rich is talking about.
This exit is triggered on logon to SAP system.

Regards,
Sudhir/Mohit

GL

Post by GL » Mon Nov 11, 2002 12:51 am

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

tandt
Posts: 136
Joined: Tue Oct 29, 2002 1:41 am

Re: Auto run program when user logon to SAP system

Post by tandt » Mon Nov 11, 2002 1:45 am

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

GL

Post by GL » Thu Nov 14, 2002 11:41 am

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

Post Reply