cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with function module SO_NEW_DOCUMENT_ATT_SEND_API1

Former Member
0 Kudos

Hi,

I am new to web dynpro abap.In my application ,im using 'SO_NEW_DOCUMENT_ATT_SEND_API1 function module to send mail.

Application is working fine ,but in code inspector im get error like

Undesirable statement SUBMIT !

Plz help me to solve

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = lt_mailsubject

put_in_outbox = 'X'

commit_work = 'X'

TABLES

packing_list = lt_packing_list

contents_bin = lt_attachment

contents_txt = lt_mailtxt

receivers = lt_mailrecipients

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 EQ 0.

SUBMIT rsconn01 WITH MODE = 'INT' AND RETURN.

ENDIF.

Edited by: amrutha_prabhu2000 on Mar 29, 2011 6:32 AM

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member184578
Active Contributor
0 Kudos

Hi amrutha.,

No need of this statement... SUBMIT rsconn01 WITH MODE = 'INT' AND RETURN. this statement is to push mails which are waiting., Instead of this u can schedule a background job for sending mails. Normally In every client organization background job is scheduled for sending mails., so u can comment or remove that statement (SUBMIT rsconn01 WITH MODE = 'INT' AND RETURN)..

Revert if u need some more clarifications.,

Thanks & Regards

Kiran

marcin_cholewczuk
Active Contributor
0 Kudos

Hi,

In general submiting report can overcome SAP authorization concept, co this can be one of reasons. For which check are you getting this error? Beside every error you have an info icon - these information are not helpful?

Appart from CI error, wouldn't it be better to run report rsconn01 as batch? I think that this how it should be handeld in production.

BR

Marcin Cholewczuk

Former Member
0 Kudos

Hi Amrutha and roopa,

Please go through this.. it might solve your problem.

Cheers,

Kris.

Former Member
0 Kudos

hi,

im also facing same problem,please help to get out of it...........