‎2010 Aug 14 6:46 AM
Hi All,
I have used the following function modules for posting SKF Quantitis against WBS Elements for executing KB31N transaction in my program.
'K40C_COBK_CHECK_POST'
'K40C_DOCUMENT_LINE_CHECK'
'K40C_DOCUMENT_CREATE'
'K40C_DOCUMENT_POST'
After the k40c_document_post module, i will be writing this code.
if not lwa_cobk-belnr is initial.
commit work.
endif.
Even i have tried with BAPI_Transaction_commit..
After this code, the document number is getting generated. But the same document is not getting saved in the database.
After this, i m getting a message in SAP inbox (Express message) with subject 'Update was terminated'.
Can anyone suggest me how to resolve this issue?
Regards
Pavan
Edited by: Pavan Sanganal on Aug 14, 2010 11:22 AM
‎2010 Aug 14 9:28 AM
Instead of COMMIT WORK u use following FUNCTION
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
‎2010 Aug 14 6:53 AM
hi,
Call BAPI_TRANSACTION_COMMIT once the process is done and pass wait = 'X'.
Regards,
Lokeswari
‎2010 Aug 14 7:00 AM
Hi Lokeshwari,
Whn i pass 'X' to WAIT, still i m getting SAP inbox express message that 'Update was terminated'.
The details of this message as follows.
Update was terminated
System ID.... DR1
Client....... 030
User..... PSANGANAL
Transaction.. SE38
Update key... 4C664C1D18FC672DE10000000A89208F
Generated.... 14.08.2010, 01:59:08
Completed.... 14.08.2010, 01:59:09
Error info... 00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
Any idea?
‎2010 Aug 14 10:21 AM
Hi,
check sm13 transaction for detailed error description and call every FM in update task mode so that it will update data base if entries all already existed.
ex: call function ' K40C_DOCUMENT_CREATE' in update task.
Regards,
Lokeswari.
‎2010 Aug 14 9:28 AM
Instead of COMMIT WORK u use following FUNCTION
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
‎2010 Aug 31 7:09 AM
HI Pavan,
Did you find the answer to your question?
I am also facing the same issue, if yes could you please let me know how you have did it.
Please suggest,
Thanks & Regards,
Ravi Kasnale.
‎2010 Sep 01 10:37 AM
Hi Ravi,
I have used BAPI_TRANSACTION_COMMIT and the document created is getting saved in the database.
Regards
Pavan