Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Commit is not working

Former Member
0 Likes
1,225

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,088

Instead of COMMIT WORK u use following FUNCTION


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.

6 REPLIES 6
Read only

Former Member
0 Likes
1,088

hi,

Call BAPI_TRANSACTION_COMMIT once the process is done and pass wait = 'X'.

Regards,

Lokeswari

Read only

0 Likes
1,088

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?

Read only

0 Likes
1,088

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.

Read only

Former Member
0 Likes
1,089

Instead of COMMIT WORK u use following FUNCTION


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.

Read only

Former Member
0 Likes
1,088

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.

Read only

0 Likes
1,088

Hi Ravi,

I have used BAPI_TRANSACTION_COMMIT and the document created is getting saved in the database.

Regards

Pavan