Hello,
I think you are facing the issue because the commit is yet to be done on the PGI.
One option that you can go about is -
1 - Create a Z function module with importing parameters like table CT_LIKP.
2 - Inside the FM, Put a wait for 1 or 2 seconds, using WAIT FOR 2 SECONDS.
3 - After the waiting time is over, call the BAPI to create the invoice.
4 - Call the new function module created with "STARTING IN A NEW TASK".
CALL FUNCTION ZINVOICE
STARTING IN A NEW TASK
EXPORTING
IT_LIKP = CT_LIKP
Let me know in case of issues.
Cheers!
Abhinab.