‎2006 Jul 17 5:13 PM
Hi all.
I have problem with locks. I am using in loop BAPI:
CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
EXPORTING
post_wrong_entries = lv_post
testrun = lv_testrun
IMPORTING
return = ls_bapiret1
TABLES
timetickets = lt_bapi_pp_timeticket
goodsmovements = lt_bapi2017_gm_item_create
link_conf_goodsmov = lt_bapi_link_conf_goodsmov
detail_return = lt_bapi_coru_return.
But as a result of material movements with are triggered with that BAPI i often have mistake: Plant data for Material xxxx are blocked yb user yyyy (confirmation is ok but errors are shown for material movements in COGI transaction). It happens for posted material and for its ingrediens too.
TO avoid i have tried:
- enqueue and dequeue for :
FUNCTION 'DEQUEUE_EMMARCE'.
FUNCTION 'DEQUEUE_EMRKPF'.
FUNCTION 'DEQUEUE_ESORDER'.
- commit work and wait.
-'BAPI_TRANSACTION_COMMIT'
-'Dequeue_all' after bapi commit.
- set update task local
What more can i do ?? I am comletly exhausted of fimdimg a way to fix it.
(wait for x second of course work fine but it isnt a solution i want to use, i'd prefer lock managing based solution)
Any help will be appriciated.
BR< Jacek
Message was edited by: Jacek Slowikowski
Message was edited by: Jacek Slowikowski
Message was edited by: Jacek Slowikowski
‎2006 Jul 17 7:06 PM
SAP provided decoupling of goods movements from confirmations to avoid scenarios like this. Refer to the following SAP library documentation:
<a href="http://help.sap.com/saphelp_erp2004/helpdata/en/b1/c04d42439a11d189410000e829fbbd/frameset.htm">Decoupling Processes Carried out During Confirmation</a>
If the functionality is implemented, the BAPI posts the confirmations and stores the goods movemts to be processed by a background job later.
Regards
Sridhar
‎2006 Jul 17 5:21 PM
put a wait before the function module i think it wil lsolve the issue
Harish
‎2006 Jul 17 5:26 PM
‎2006 Jul 17 5:51 PM
Run program in debug mode, after BAPI call, go to SM12 to see locked objects, then add those 'DEQUEUE'.
Regards.
‎2006 Jul 17 7:06 PM
SAP provided decoupling of goods movements from confirmations to avoid scenarios like this. Refer to the following SAP library documentation:
<a href="http://help.sap.com/saphelp_erp2004/helpdata/en/b1/c04d42439a11d189410000e829fbbd/frameset.htm">Decoupling Processes Carried out During Confirmation</a>
If the functionality is implemented, the BAPI posts the confirmations and stores the goods movemts to be processed by a background job later.
Regards
Sridhar
‎2006 Jul 17 8:11 PM
I see that u've tried SET UPDATE TASK LOCAL. local update deactivates immediately after commit work.
if ur bapi call is in a loop, set update task local should be called before the bapi call every time.
Regards
Sridhar