cancel
Showing results for 
Search instead for 
Did you mean: 

event for triggering workflow when user locked

Former Member
0 Kudos

All,

I need you peoples support in doin this. Actually i'm trying to trigger a workflow when user types wrong password thrice and the user gets locked.

Can anyone tell me in doin that ?

Thanks and regards,

Suseendran

Accepted Solutions (1)

Accepted Solutions (1)

suresh_subramanian2
Active Contributor
0 Kudos

Hi!

Once the user have incorrectly entered password thrice times , a message will appear.Capture that message class and area with which using SWUY transaction code ,you can make a workflow to trigger.

Regards,

S.Suresh

former_member193382
Active Contributor
0 Kudos

Hi!

use business object USER and create a custom event to, say ZUSERLOCKED, and register it in tcode SWEC.

Then your workflow will be triggered.

Regards,

Raj

Former Member
0 Kudos

Raj,

No change document object is being identified in swec for the BO USER. Anyway thanks for ur support.

Former Member
0 Kudos

You need to create a custom event " UserLocked " by customizing "USER" business object.

In SWEC, use USR02 table where you have fields for LOCNT (Incorrect logon attempts) or UFLAG (User Lock Status).

You can use LOCNT change value and check in check function module if it is greater than 3 and UFLAG is 128 then raise no exception and trigger your workflow.

Hope this helps.

Thanks,

Sudhir.

Former Member
0 Kudos

Sudir,

Can u brief me little bit more.....

Former Member
0 Kudos

Hello Suseendran,

Create a custom business object 'ZUSER' by copying the USER business object.

Create a event in 'ZUSER' as "UserLocked".

Delegate the BO 'ZUSER' to 'USER'.

Use a Userexit "SUSR0001-EXIT_SAPLSUSF_001" to trigger the workflow.

sy-uname will have the username value.

By using it go to USR02 table and get that record. for eg: T_USER

Now compare T_USER-LOCNT = 3 AND T_USER-UFLAG = 128.

If true, trigger the workflow by using "SAP_WAPI_CREATE_EVENT"

DATA: event_object_key LIKE sweinstcou-objkey.

CONSTANTS:

c_zuserwf LIKE sweinstcou-objtype VALUE 'ZUSER_WF', --> Worklfow name

c_UserLocked LIKE sweinstcou-event VALUE 'UserLocked'.

event_object_key = sy-uname.

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

EXPORTING

object_type = c_zuserwf

object_key = event_object_key

event = c_UserLocked

commit_work = ' '.

will trigger your worklfow and it will process through your custom workflow.

Remember to have the "UserLocked" event in the triggering event of worklfow.

Thanks,

Sudhir.

0 Kudos

Hi Sudhir,

I tried to do what you said but nothing happened. That user exit works when a login is successfully only.

Regards

Answers (0)