2009 Mar 13 5:17 AM
I am trying to send mail by using function module
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
and running the program rsconn01 also
but in SOST its giving message MSG 672 - No entry in queue yet.
Mail has not sent to recipent. any solutions?
Regards
Rajanbabu
I am trying to send mail by using function module
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
and running the program rsconn01 also
but in SOST its giving message MSG 672 - No entry in queue yet.
Mail has not sent to recipent. any solutions?
Regards
Rajanbabu
2009 Mar 13 5:25 AM
Hi Rajanabu,
Please check if the Incomming/Outgoing Email Connections is Activate (check with basis)
Regards,
Peter
2009 Mar 13 5:27 AM
2009 Mar 13 5:28 AM
Hi ,
pass some more parameters to the FM as in the below example
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL = gd_sent_all
NEW_OBJECT_ID =
tables
packing_list = it_packing_list
OBJECT_HEADER =
CONTENTS_BIN =
CONTENTS_TXT = it_message
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = it_receivers
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
.
hope it works ..
regards ,
Gowri
2009 Mar 13 5:29 AM
Hello,
Please check SCOT setting.
Following will help you in case of SCOT setting are not done.
Do this and chk notes
Note 129950 - Required Customizing for use of SAP connect
Note 957412 - Troubleshooting automatic email transmission in SAP Solution
Set-Up SAPconnect
Use
E-mails sent from an SAP application are first sent to a queue. The queued e-mails are subsequently sent by a periodic background job.
Therefore, for automatic e-mailing you need to:
u2022 set up SAPconnect
u2022 set up a periodic job for SAPconnect
This IMG activity is a prerequisite for the following scenarios:
u2022 Testing
u2022 Monitoring
Activities
Setup SAPConnect
1. In transaction SAPconnect: Administration (SCOT) choose View -> System status.
2. Choose Settings -> Default Domain.
3. Specify your default domain and confirm. For example, "mydomain.com".
4. In the Administration screen, double-click the SMTP node.
5. Check the box "node in use".
6. Specify the mail host for SMTP. For example, "mail.mydomain.com".
7. Specify a mail port. The default port is 25.
8. Choose "Set" (for "Internet").
9. Enter an asterisk (*) for "address area".
10. Choose Continue.
Schedule the periodic background job to send queued e-mails
11. Call transaction SCOT.
12. Choose View - Jobs.
The SAPconnect Job Administration screen is displayed.
13. Choose Job - Create.
A dialog box is displayed.
14. Specify a job name.
15. Confirm.
16. In the next window, select the variant SAP&CONNECTALL.
17. Choose Schedule job.
18. Choose Schedule Periodically.
A dialog box is displayed.
19. Specify a time period.
For example, 10 minutes.
20. Choose Create.
Regards,
Sameer
Edited by: Sameer on Mar 13, 2009 12:30 AM
2009 Mar 13 5:33 AM
Hi,
Refer wiki code:
To send 2 int tables data as two attachments to mail id outside sap system
Or weblog:-
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
Hope this helps you.
Regards,
Tarun
2009 Mar 13 5:34 AM
Is there is a parameter 'Commit work ' in the function module which you can set to 'X' .
Mathews
2009 Mar 13 5:51 AM
Hello,
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = c_set
commit_work = c_set "X
TABLES
packing_list = i_objpack[]
object_header = wa_objhead
contents_bin = i_objbin[]
contents_txt = i_objtxt[]
receivers = i_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 = 8.
try adding commit_work, to make it workk... please note that if u r executibg it in background , the option commit_wok will make it dump.. you will have to put a flag to determine when it is beign executed in background and execute teh FM withotu the commit work option...
hope it helps
regards
2009 Mar 13 5:54 AM
Hi,
After bringing your final alv data in the final internal table,
go through this link , i also had an same requirement to send data after converting to excel file and
send it as an attachment to mail id outside Sap,
Check here the parameters which i have passed in that function module.
Hope it helps
Regrds
Mansi
2009 Mar 13 11:46 AM
2009 Mar 17 1:35 PM
Hi
After using the function module "SO_NEW_DOCUMENT_ATT_SEND_API1" You can check it for sy-subrc.
if sy-subrc <> 0. then there is an error in your passing parameters of your function module.
if sy-subrc = 0.
commit work.
endif.
and then go to the SCOT transaction and check INT Internet is present or not. If its present then click on Start send process (Ctrl+F7) then the mail will send to the receipient.
In the SCOT trasaction there is no INT Internet type you have to configure first.
Please try this one. If still you are not getting send the code. I will solve it and send it you
Thanks
Srikanth(sriiii)