Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

function module SET_ENQUEUE_OWNER

Former Member
0 Likes
612

Hi,

We need the possibility to set the same enqueus used in a transaction also before we execute the transaction with a CALL TRANSACTION in the same report. In another forum for SAP developers I found this solution:


1.) before calling the transaction:
        call 'C_ENQUEUE'
             id 'OPCODE' field '7'
             id 'ENQKEY' field <enqueue userid>.
2.) export <enqueue userid> to memory
3.) Call Transaction ....
4.) import <enqueue userid> from memory
5.) set the imported  <enqueue userid> to your current enqueue user id:
      call function 'SET_ENQUEUE_OWNER'
                exporting user                = <enqueue userid>
                              usvb                = <enqueue userid>
                exceptions illegal_input   = 1
                                others            = 2.

Function module SET_ENQUEUE_OWNER was not released for customer development. But SAP still uses it.  I tried this solution and it did work. But afterwards I realized a big problem. The system says there is still an enqueue but doesn't display it in SM12. So there is no possibility to delete the enqueue. Was here anyone faced with the same problem and can tell me how I can remove this enqueu? Have I done it wrong or is there a bug fix from SAP?

1 REPLY 1
Read only

former_member183804
Active Contributor
0 Likes
449

Hello Heidrun,

the SAP documentation explicitely states that calling c functions is a poor practice. Besides "Cannot be used" is a misleading translation "Mustnot be used" is the correct term.

Regards

  Klaus