‎2010 Apr 20 12:25 PM
Hi All,
I am getting the short dump with message "Invalid COMMIT WORK in an update function module. "
Calling a COMMIT WORK in an update process is not allowed
because the function modules triggered in a Logical Unit
of Work cannot then be processed correctly.
in FM : SO_DOCUMENT_SEND_API1
Prev. it was giving error in one of my driver program where I had written the commi Work after calling FM for sending fax :
"CONVERT_OTF_AND_FAX" .
call function 'CONVERT_OTF_AND_FAX'
exporting
FAXOPTIONS = W_ITCPP
USER = NAST-USNAM
importing
MSGID = W_MSGID
MSGNO = W_MSGNO
MSGV1 = W_MSGV1
MSGV2 = W_MSGV2
MSGV3 = W_MSGV3
MSGV4 = W_MSGV4
tables
OTF = IT_OTF.
if sy-subrc eq 0.
commit work.
submit RSCONN01 with MODE = 'FAX' and return.
endif.
Please explain me where and how I can change my code so that this error should not come?
Rgds.
MAdhuri
‎2010 Apr 20 12:31 PM
Hi,
Create a function module as update module. Call this fm and process your code in this fm without "commit work" statement. It will be committed then with the standard commit.
Regards,
‎2010 Apr 20 12:31 PM
Hi,
Create a function module as update module. Call this fm and process your code in this fm without "commit work" statement. It will be committed then with the standard commit.
Regards,
‎2010 Apr 20 12:43 PM
Hi Madhuri,
When calling the FM - SO_DOCUMENT_SEND_API1, do not pass an "X" to commit work parameter, this should fix your issue.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data =
COMMIT_WORK = ' '
Regards,
Chen
‎2010 Apr 20 1:19 PM
Even if for the output type in whose driver program, that commit work is given, is given the option "Send with application own transaction", its calling the RSNAST00 program , and through that its calling the driver program, and I think this one is creating a problem.
I am trying with ur solution. This error is happening in Quality system only.
Hi Chen,
If I remove the commit_work = 'X'. its not sending the email to the corresponding addresses.
Edited by: madhuri sonawane on Apr 20, 2010 6:00 PM
‎2010 Apr 20 1:39 PM
Hi,
Did you check if entry exist in SOST with out commit = 'X'? If yes, then you can RSCONN01 program as 5 min batch job for dispatching the entries in waiting state.
Thanks,
Vinod.
‎2011 Dec 26 11:31 AM
HI ,
I am facing same issue . i am working on object to send email with smartform PDF with attachemts.
email is not going when i check in SOST its not going in queu i am geting error message still no entry in queue (Message S0672) .
I tryied to put COMMIT WORK. But its getting dump on Quality server.
‎2023 Oct 14 7:25 AM
I wants to call a bapi to create a order inside a badi. But immediately after the Order is created I need to do goods movement for the same order ,(which means I need the details of the order i created for further steps), Before actual commit is going to happen, I need data. is there any way to execute a piece of code after commit happens?? Or any other ways.
My question is I have done the same as u said, created UPDATE fm and called in update task but then my database is not getting updated and showing error goods movement not possible since data not found.
‎2023 Oct 16 10:59 AM
‎2010 Apr 20 12:39 PM
Hello Madhuri,
Note from SAP documentation says:
Whilst processing an update function module in the update work process, the statements SUBMIT, CALL DIALOG, CALL SCREEN, CALL TRANSACTION, COMMIT WORK, ROLLBACK WORK, as well as all other statements which create a database commit, must not be executed.
Source: [http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_UPDATE.htm]
Are you getting this dump in a standard func. module or a custom one ?
BR,
Suhas
‎2012 Apr 26 1:50 PM
Hello, Suhas!
I am getting the short dump with message "Invalid COMMIT WORK in a COMMIT WORK or ROLLBACK WORK."
Short text
Invalid COMMIT WORK in a COMMIT WORK or ROLLBACK WORK.
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_FDT_CC_SERVICES============CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
The call of a COMMIT WORK in a FORM, that will not be executed until
the commit or rollback point of the caller using the variant
PERFORM ... ON COMMIT or PERFORM ... ON ROLLBACK is not permitted.
etc.
Could you help me to solve the issue?
Regards,
Kseniya Tsyganchuk