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: 

Issues during posting and Clearing together in custom code SAP FICA

josep_collpiferrer
Discoverer
0 Kudos

Hello Experts,

We have a custom functionality for credit card refunds. For account update during refunds a new debit document is created and force cleared with the credit card payment posted earlier on customer account. Logic for posting the debit document and clearing it with an already existing payment is in the same RFC Function module. Once the document is posted code issues COMMIT work and then goes for clearing.

We are facing intermittent failures during this process. Clearing fails to happen on some accounts.

Can this be because we are trying to do two types of database update on same document( i.e., creation and then clearing)?

Kindly advice.

Thanks,

Josep

2 REPLIES 2

william_eastman
Advisor
Advisor
0 Kudos

Maybe commit work and wait.  And add some error capture to identify the real cause.

Former Member
0 Kudos

Hi Josep,

Same situation was faced by me in custom RFC FM,

so as a solution i put a wait of 2 second after debit document was posted and then credit card payment was executed after wait, moreover one more thing to be taken care is that while posting the debit document system apply some locking entry so if possible clear the lock entry and then start credit card payment.

Hope it helps.

Thanks