cancel
Showing results for 
Search instead for 
Did you mean: 

R/3 records enqueue/dequeue

Former Member
0 Kudos

Hi all,

I have a scenario where I have to enqueue (lock) employee records (BAPI_EMPLOYEE_ENQUEUE) in the backend when the user is in edit mode of my web dynpro application.

I have some concerns regarding dequeue of these records. I can dequeue the records when the user comes out of edit mode in the application, but what if the user goes into edit mode and closes the browser window? There are a few things that I need clarification for:

1. Are the records automatically dequeued in the backend when the web dynpro connection is terminated?

2. If I use the wdDoExit of the interface controller to dequeue the records, will this be called in this scenario? Also, the documentation says it is called during garbage collection. In this case, is it ok to rely on the GC thread to do the job?

Other suggestions for logically locking records are also welcome.

Regards,

Nirav Mehta.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I am trying to change Employee Personal Data by calling BAPI_PERSDATA_CHANGE

from .Net through webservice created by using Function Module-> WebService Wizard.

Problem is that I get error "The employee/applicant is not locked yet".

I know that I must call the following three BAPI's :

BAPI_EMPLOYEE_ENQUEUE

BAPI_PERSDATA_CHANGE

BAPI_EMPLOYEE_DEQUEUE

The external call from .Net to BAPI_EMPLOYEE_ENQUEUE does not lock the record (as seen in SM12)

If I call BAPI_EMPLOYEE_ENQUEUE in SE37, it locks the record as seen in SM12.

In principle, what we need to do is exactly same as in following link, but without using IBM Websphere:

http://publib.boulder.ibm.com/infocenter/wpfhelp/v6r0m2/index.jsp?topic=/com.bowstreet.designer.doc/...

Can any one help how to lock Employee record by calling BAPI_EMPLOYEE_ENQUEUE fron .net environment ?

manuel_garcia3
Explorer
0 Kudos

Hi you need use BeginContext and EndContext Methods

I don´t have the correct syntax

IRfcFunction irfcBAPI_PERSDATA_CHANGE;

IRfcFunction irfcBAPI_EMPLOYEE_DEQUEUE;

IRfcFunction irfcBAPI_EMPLOYEE_ENQUEUE;

BeginContext

irfcBAPI_EMPLOYEE_ENQUEUE.Invoke(RfcDestination)

irfcBAPI_PERSDATA_CHANGE.Invoke(RfcDestination)

irfcBAPI_EMPLOYEE_DEQUEUE.Invoke(RfcDestination)

EndContext

you can search in NET connect help

I hope help you.

Former Member
0 Kudos

Hi,

From my experience, BAPI_EMPLOYEE_ENQUEUE and BAPI_EMPLOYEE_DEQUEUE should put in same FM.

  • begin of program

call function 'BAPI_EMPLOYEE_ENQUEUE'

exporting

number = qpernr

importing

return = return.

  • program logic

...........................................................

...........................................................

...........................................................

  • end of program

call function 'BAPI_EMPLOYEE_DEQUEUE'

exporting

number = qpernr

importing

return = return.

Former Member
0 Kudos

Hi,

I am facing exactly the same problem. Have you got solution for this?

Thanks,

Apurva