cancel
Showing results for 
Search instead for 
Did you mean: 

Newly created PERNR is locked till I log off from my webdynpro application

Former Member
0 Kudos

Hi All,

I have created a webdynpro application to call an RFC using Adaptive RFC model. The RFC creates a PERNR with all the details provided from portal and returns PERNR number generated.

I am able to call the RFC successfully and PERN is also being returned. So far so good.

But if I try to edit the PERNR in backend using PA30 immediately after RFC call is finished,I get an error saying that PERNR is locked by the user accessing Webdypro Application.

The lock will be released only when I log off and log in again to the application

or When I refresh the application.

I tried using BAPI_EMPLOYEE_DEQUEUE to unlock the generated PERNR immediately after calling the RFC(which creates PERNR) but still the lock is not going to be released. Also I had my ABAPER written unlock PERNR statements with in the RFC.

Nothing works.

Please let me know if I am missing some thing...

Thanks

Santhosh

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Santhosh

1. Add the below line after modelObject().execute() statement

<model Object>.disconnectIfAlive();

2. if you are using try statement for your modelObject().execute() statement

then add the below code

finally

{

<model Object>.disconnectIfAlive();

}

you can use the same statement at the end of all Read and Write

<Model Object> - object name for your used model class

Regards

Sivakumar Jayabalan

Former Member
0 Kudos

Thanks a lot Shiva. I was struggling with this issue for quite some time..

I have used the following code in finally block

*wdContext.current< RFC NAME>_InputElement().modelObject().modelInstance().disconnectIfAlive(); *

Former Member
0 Kudos

Thanks a lot Shiva. I was struggling with this issue for quite some time..

I have used the following code in finally block

*wdContext.current< RFC NAME>_InputElement().modelObject().modelInstance().disconnectIfAlive(); *

Former Member
0 Kudos

Thanks a lot Shiva. I was struggling with this issue for quite some time..

I have used the following code in finally block

*wdContext.current< RFC NAME>_InputElement().modelObject().modelInstance().disconnectIfAlive(); *

Answers (0)