‎2014 Jan 15 3:14 AM
Hi Experts,
I am using FM 'SO_NEW_DOCUMENT_SEND_API1'.
I am looking for somewhere to type the mail-address.
Can someone give me some idea?
BR,
King
‎2014 Jan 15 3:25 AM
Hello King,
I am not sure where exactly you want to type email address?
1) In case of direct FM execution from SE37, pass email ids in table-receivers
2) If you are using this FM somewhere in your code, you can have a screen element for Email address and pass that...
I am not sure if your question was something else. In that case please explain your query.
Warm Regards,
Shyam
‎2014 Jan 15 3:41 AM
Thanks Shyam.
I am directly using FM execution from SE37. I passed email ids (XXXX@gmail.com)in table-receivers.
Then exception: PARAMETER_ERROR occur after running the FM.
What parameter am I missing?
BR,
King
‎2014 Jan 15 3:46 AM
Hi King,
You need to pass Receiver Type also in RECEIVER table for all email IDs.
Please check.
Warm Regards,
Shyam
‎2014 Jan 15 4:06 AM
Thanks Shyam.
In RECEIVER table, I need to pass Receiver Type.
Is that means the folIowing?
Create a table with table type for Receiver in se11.
Insert email IDs
Pass the type in RECEIVER table.
BR,
King
‎2014 Jan 15 4:10 AM
Hello King,
No. No need to create anything in SE11.
As you are trying to execute it in SE37, you just need to pass value for field Receiver_Type in RECEIVER table for each row you are passing an email-id.
When I say you need to pass some values, it means fill the value in required structure-field.
Warm Regards,
Shyam
‎2014 Jan 15 4:20 AM
Hello Shyam,
It seems that I solved the problem. I was missing fields in RECEIVER table in left.
I run the FM with no exception now.
I am waiting 2-5 min to see if I can receive the mail.
BR,
King
‎2014 Jan 15 4:42 AM
Hello Shyam,
I am sorry to ask one more question.
I found T-code : SCOT to set up a mailsever.
However, is there any T-code to show a mailsever is setup or not?
BR,
King
‎2014 Jan 15 5:52 AM
hi King
Goto tcode SMICM, then menu->goto->services, you will see the SMTP with port 25,if the SMTP server is running, it`s should be actived with green.
Archer
‎2014 Jan 15 6:13 AM
Thanks so much!
I saw a green click under field 'Actv' but there are no SMTP service info available.
Is that still means SMTP sever is running?
BR,
King
‎2014 Jan 15 3:39 AM
hi King
using the parameter 'receivers' in this function.
regards,
Archer
‎2014 Jan 15 6:36 AM
Hi,
Please consider below code:
DATA rec_tab LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
MOVE: "your reciever email ID" TO rec_tab-receiver,
'U' TO rec_tab-rec_type.
APPEND rec_tab.
Pass this receiver tab in FM SO_DOCUMENT_SEND_API1
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
sender_address = ''Sender E-mail ID
sender_address_type = 'B'
TABLES
packing_list = plist
contents_bin = so_ali
receivers = rec_tab " This table contains receiver address
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 e208(00) WITH 'Error in sending email'.
ENDIF.
Regards,
Ramiz
‎2014 Jan 15 8:19 AM
King Kong wrote:
Hi Experts,
I am using FM 'SO_NEW_DOCUMENT_SEND_API1'.
Don't use that FM. Use the CL_BCS and associated classes. There is a lot of material on how to use these if you will search.