‎2010 Dec 15 9:47 AM
Hi experts,
I am using SO_NEW_DOCUMENT_ATT_SEND_API1 FM to send a mail to vendors....this is the logic they have written..
LT_MAIL1[] having 4 mails id's...but problem is mail is not going.... can any body plz help me...
DATA: LT_MAIL1 LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
IF LT_CONTENT[] IS NOT INITIAL AND LT_MAIL1[] IS NOT INITIAL.
LOOP AT lt_mail1.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = LV_DOC_HEADER "subject of message
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD "file name
CONTENTS_BIN = OBJBIN "attachment content
CONTENTS_TXT = OBJTXT
RECEIVERS = LT_MAIL1 "Mail id
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
MESSAGE S000(MES).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
Thanks & regards,
Praveena..
‎2010 Dec 15 9:55 AM
Hope you can try this way:
DATA l_sender TYPE soextreci1-receiver.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = v_emailattr
put_in_outbox = 'X'
sender_address = l_sender
sender_address_type = 'INT'
commit_work = 'X'
TABLES
packing_list = it_objpack
object_header = it_objhead
contents_bin = it_objbin
contents_txt = it_objtxt
receivers = it_reclist
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 = 8Edited by: K.Manas on Dec 15, 2010 10:56 AM
‎2010 Dec 15 10:00 AM
Have you checked the transaction SOST. Are there errors from this FM call.
‎2010 Dec 15 10:15 AM
Hi martin..
Thank for giving reply...
Ya i am getting errors? is it technical problem?
‎2010 Dec 15 10:25 AM
‎2010 Dec 15 10:25 AM
‎2010 Dec 15 10:32 AM
Hi...
It is showing
via Internet Payment From XXX Limited For Vendor 2000002095 some name email id
and one more column i there status i.e error symbol
is it technical problem?
can you plzzz help me..
‎2010 Dec 15 10:40 AM
Hi manas..
This is the exact error i am facing
Cannot process message, no route from 90003427 to mail id..
can you tell me is it technical problem?
‎2010 Dec 15 10:48 AM
Veena,
At what point is the FM raising this exception and what exactly is this route from 90003427 to mail id.
Check if return for FM is equal to 0 i.e. sy-subrc = 0.
‎2010 Dec 15 10:49 AM
‎2010 Dec 15 10:53 AM
Did you check your NACE settings properly. Ask your functional consultant to check it.
Try using some other test scenarios. If it works fine then the issue is with the doc no supplied.
Do you have any output type setting for this program?
If all above are proper then it's a tech problem.
‎2010 Dec 15 11:03 AM
HI manas
Thanks a lot for giving reply...
I will check with my Functional consultent i will let u know....
ThanQ
‎2010 Dec 15 11:08 AM
Veena,
Do check with other invoice no too..The cause may be with the invoice no given to be tested. Anyhow check the settings for the output types, transmition medium etc
‎2010 Dec 16 10:47 AM
Also check that the mail ids have been maintained for sender and receiver in transaction SU01.
‎2010 Dec 20 7:57 AM
Hi manas...
My problem was solved....actaully There is no SMTP connection.
‎2010 Dec 15 10:04 AM
‎2010 Dec 15 10:29 AM
‎2010 Dec 15 11:51 AM
Hi Veena
Not the vendor must to have e-mail, but the sap user sender must to have e.mail assigned in SU01
best regards