Skip to Content
author's profile photo Former Member
Former Member

Dequeue function does not work in RFC call (using Starting New Task syntax)

Hi All,

Here's the issue:

I'm locking a bunch of sales orders in my program and submitting to a program for processing the sales orders (changing header/item data). The called program in turn calls an RFC (Z function module that calls standard BAPI for sales order change). The RFC is called using 'Starting New Task' (Parallel processing framework). Inside the Z function module, when the orders are changed one at a time in a loop, I need to unlock the sales order (using the DEQUEUE_EVVBAKE function). This function returns a sy-subrc = 0, but the unlocking does not happen.

Thanks in advance.

Please help.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jan 14, 2008 at 02:31 PM

    The enqueue/dequeue functions work only within the same LUW.

    You create the lock in the initial program, the locks are held as long as this program runs (or you release the locks in that program).

    Since you call the RFC with starting new task a new LUW is opened and any dequeue statement will not release the locks, because they were never created in that LUW.

    You have two options:

    Either try to find a logic to trigger the release of the locks in the main program or if that doesn't work, set the lock in the RFC itself, that way you are in the same LUW and can release them later again.

    Hope that explains it.

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Michael for your prompt response.

      I had tried the option of locking the orders in the RFC but the BAPI was releasing all the locks, instead of releasing the lock on just the order changed.

      I then figured the parameter _SCOPE in the Enqueue and Dequeue functions. Setting the value = 1 for this parameter worked for me.

      Regards,

      Shyam

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.