SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error while executing BAPI_CTRACCONTRACTACCOUNT_CLR

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

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.