Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Commit Work giving Dump

Hi,

I am using FM to send external mail in a user exit.For that i have to write a commit work otherwise mail is not sent to external user although sy-subrc = 0. I tried to use COMMIT WORK but it is giving me A DUMP

showing calling program is not committed. Is it ok to call commit in an exit or else what need to be done.

i tried using standard parameter of FM while commit but it is also giving me dump.

Send External Mail To Sales Associate{

code} CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = lf_doc_data

document_type = lf_doc

  • COMMIT_WORK = c_x

put_in_outbox = c_x

TABLES

object_content = lt_mailbody

receivers = lt_receiver_tab

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

operation_no_authorization = 4

parameter_error = 5

x_error = 6

enqueue_error = 7

OTHERS = 8.

IF sy-subrc 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Tags:
Not what you were looking for? View more on this topic or Ask a question