2013 Mar 04 8:01 PM
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?
2013 Mar 04 10:09 PM
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