cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Workflow to unlock a specific user

Former Member
0 Kudos

I want to create a workflow to unlock a predefined user.

What must be done for this?

Accepted Solutions (0)

Answers (2)

Answers (2)

dirk_wittenberg
Contributor
0 Kudos

Hi,

BO USER has a method UNLOCK.

It uses BAPI BAPI_USER_UNLOCK .

Regards,

Dirk

Former Member
0 Kudos

Thanks. Found the BO.

But how can I change the USER in the Container of the WF because all parameters inside the container are greyed out

dirk_wittenberg
Contributor
0 Kudos

About which dataflow are you talking?

Method to task or task to workflow ?

Could you please provide a screenshot?

anjan_paul
Active Contributor
0 Kudos

Hi,

   how you want to do that depends on that. You can create a workflow with container element USER, where  USER is input enabled. Make the workflow as a general task. Give the workfLow no to user. He can run from SWUI passing userid which one he want to unlocked.

To input enable USER elemnet. Double click on the element. go to property tab. Select Input.

Former Member
0 Kudos

After I created a wf with BO USER a container element USER is automatically created. But this element is input disabled.

And when I create a USER container element manually I can´t create a data flow with this element.

anjan_paul
Active Contributor
0 Kudos

Hi,

share screenshot of binding in workflow and task.

Former Member
0 Kudos
anjan_paul
Active Contributor
0 Kudos

Hi,

   share the binding of workflow with task.

Former Member
0 Kudos
anjan_paul
Active Contributor
0 Kudos

Hi,

click on the bindin tab and share the screenshot

Former Member
0 Kudos
anjan_paul
Active Contributor
0 Kudos

Hi,

  That is ok.

   share the screenshot of property tab of container element USER

Former Member
0 Kudos

The Key is Initial because I can´t set it

anjan_paul
Active Contributor
0 Kudos

Hi,

you mean to say you not able to write USERNAME in field in yoellow place you mention upper for USER object key.

Try it.

Former Member
0 Kudos

Yes that´s the problem. I can´t write a user inside. And when I want to search there comes nothing

anjan_paul
Active Contributor
0 Kudos

Hi,

In properties tab input is checked. Just check it.

Former Member
0 Kudos

Yes, in the properties tab input is checked but all objects are not changeable

former_member185167
Active Contributor
0 Kudos

Hello,

If you want a workflow to unlock a user then generally it would be started with an event which would provide the username to the workflow (as a user object) in the event -> workflow binding.

The step to unlock the user would be a background step, your is not. I would change the Task to be set as a background task.

Or did you want something different?

regards

Rick

anjan_paul
Active Contributor
0 Kudos

Hi,

  why you require workflow to unlock userid. Do you have any special requirement after certain process user should be unlock. Share exactly what you want.

Former Member
0 Kudos

Hi,

the requirement is to create a workflow that a User can request a "emergency user" and the predefined emergency user should be unlocked and a password for the user should be generated and send to the requester

former_member185167
Active Contributor
0 Kudos

Hello,

Sure, it can be done.

First you'll need to know how to unlock a user programmatically. Is there a method or function that you have in mind?

regards

Rick Bakker / hanabi technology

anjan_paul
Active Contributor
0 Kudos

Hi,

  you can create a workflow with activity step, where you add custom task using custom BO method. In the method you use FM BAPI_USER_UNLOCK to unlock the user and reset the password.

Former Member
0 Kudos

That meens that it must be set a custom BO.

Is there anything with standard?

former_member185167
Active Contributor
0 Kudos

Unlikely that there's a custom BO. You may be able to find one based on User that you could sub-delegate and add a method to.

anjan_paul
Active Contributor
0 Kudos

Hi,

  You need to find out. I don't think there is any Standard BO.

Former Member
0 Kudos

Is there a possibilty to implement the bapi BAPI_USER_UNLOCK in a workflow without programming?

Former Member
0 Kudos

Use the standard BO USER, there are both methods that you need, Lock and Unlock.