Application Development 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: 

COMMIT_WORK in FM, SO_DOCUMENT_SEND_API1

Former Member
0 Kudos

Hi,

I use this FM to send e-mail in VA01 for a certain output type. I passed a parameter, COMMIT_WORK with an 'X'. But then when creating sales order upon saving, i got an update terminate. Studying the dump error, it is an error of COMMIT_IN_POSTING. The error explains that is is the invalid commit_work in an update function module. This function module is SO_DOCUMENT_SEND_API1. When I tried to delete the parameter, COMMIT_WORK, i can save the order but then cannot send the e-mail when executing the output type to send e-mail. But the message to be sent is still no entry in queue when checking in transaction SOST.

Please help me in analyzing the cause.

4 REPLIES 4

former_member156446
Active Contributor
0 Kudos

remove commit and use this code:

SUBMIT rsconn01 WITH mode = 'INT'
                WITH output = 'X'
                AND RETURN.

[Send external email from within ABAP program |http://wiki.sdn.sap.com/wiki/x/-dc]

0 Kudos

Thanks for the tip but then I still got a dump, POSTING_ILLEGAL_STATEMENT because of the submit syntax. I put this FM inside a print program.

Former Member
0 Kudos

This is already solved. I use an alternative solution not this FM.

0 Kudos

Can you please provide the alternate solution that you have used? Is it through BCS API