10-24-2008 7:10 PM
Hi,
I would like to execute clearing between 2 open items of either same contract account or different contract accounts by using BAPI_CTRACCONTRACTACCOUNT_CLR.
Before executing the above BAPI, I will execute BAPI_CTRACCONTRACTACCOUNT_GOI and get the open items and against those open items I will perform the clearing through the clearing BAPI mentioned.
Unfortunately after succesfully executing and getting result from open items BAPI, I am not able to execute the clearing BAPI. In clearinng BAPI I have given all the required data relating to document header and open items. On execution I am getting the following mentioned error:
T ID NUM MESSAGE
E >0 369 Internal error: Lock missing for change / clear document item
Kindly let me know what might me the sure reason for the above error message. I have tried very hard, but could not find any reason for this error message.
Kindly reply soon.
Thanks
Ganesh
10-27-2008 5:42 AM
Find open items for the contract by using function module FKK_OPEN_ITEM_SELECT.
To clear the open document use this FM 'FKK_CREATE_DOC_AND_CLEAR'
FM to Save the transaction CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards,
Shiva Kumar
01-09-2010 1:57 PM
Hi,
use the BAPI:
CALL FUNCTION 'BAPI_CTRACCONTRACTACCOUNT_GOI1'
EXPORTING
enqueue = l_enqueue
IMPORTING
return = lwa_return
TABLES
mainselections = lti_mainsel
openitems = lti_openitems
valueselections = lti_valsel.
the parameter l_enqueue allows you to block open items.
John M.