cancel
Showing results for 
Search instead for 
Did you mean: 

SAP enqueue and dequeue from WD

fabio_bellocchio
Participant
0 Kudos

Hi SDN,

please, can anybody tell me if there is a way to call an Action when user leaves the application?

Actually, what I have to do is work with ABAP enqueue and dequeue resources, but so far I just could think about calling RFC to do that, but my problem is when to call de "dequeue", once the transaction must be dequeued after user has finished the process, either this has been done through the right way (by clicking some button in the application) or the wrong way (i.e. leaving the page unexpectedly).

I would appreciate any kind of suggestion!

Thank you again!

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Fabio,

Are you still facing the problem? I exactly faced this problem one year back and could resolve it. Do like this.

1.Create RFC for calling dequeue

2.Import RFC into your project.

3.Create a method execUnlock(); call dequeue RFC in this method. Like this:

try

{

wdContext.current<mainRFC>Element().modelObject().modelInstance().disconnectIfAlive();

wdContext.current<unlockRFC>Element().modelObject().execute();

}

catch (WDDynamicRFCExecuteException e)

{

}

catch (NullPointerException e)

{

}

You can call execUnlock() after user has finished the process or provide a button to exit. In onActoin of that button and wdDoExit() to prevent unnecessary locking problems.

regards,

Siva

fabio_bellocchio
Participant
0 Kudos

Thank you Siva,

a lot helpful this piece of code.

Regards.

Answers (0)