on 04-19-2010 3:24 PM
Hello everybody!
I want to send a pdf, generated by Adobe Forms function module, as an email attachment to a certain external mail receiver. I have read that the methods of the Business Communication Services can render this, but I couldn't create a working solution. Can somebody give me a coding example for this scenario?
I would be very happy if somebody could help me!
Best regards,
Markus
Howdy
The mail request should be in the queue (transaction code SOST), but if you can also try the following before you call the send method:
lo_send_request->set_send_immediately( 'X' );
This will cause the mail to bypass the queue and send straight away. If that doesn't work make sure you catch any exceptions and see if there is an error message.
Cheers
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Markus,
have you set the mail sender properly?
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send TYPE adr6-smtp_addr VALUE 'email of sender'.
lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
You need both, sender and recipient defined in the coding. In your example there is a comment "Set sender" but you define the recipient. So you should check your coding if you create both objects.
Regards
Ralf
Howdy,
Apart from the above the only things I can suggest are seemingly obvious:
1) Make sure you are calling the lo_send_request->send( ); method
2) Have you got a COMMIT WORK after the send?
3) Are the any other similar reports using CL_BCS that are working in your system (ie is there definitely not a basis issue?)
Cheers
Alex
Hi markus.birner,
You mentioned that you generated Adobe Forms using FM what is the FM you used? I have attached PDF from Script and Spool.
If you could send me the FM, so that can give you idea how to attach it to mail.
Regards,
Suneel Kumar G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Note 190669 contains additional options for sending lists from
customer-specific programs.
Comments concerning Release 6.10 and higher
The SBCOMS package in your system contains sample reports for sending documents using BCS.
The reports are named BCS_EXAMPLE_* where * denotes 1 to 5.
Regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Howdy,
I found this contribution to be valuable - coded this yesterday based off the code starting on page 8 and it works a treat.
Cheers
Alex
Hello Alex!
your link to this document was very helpful. The scenario described in the pdf is almost what I was looking for. The only problem is, that the mail is sent to the Business Workplace Inbox. I want to send it to an external e-mail address. When I change the programm part where the recipient is defined like this:
Create recipient
DATA lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
DATA l_reci TYPE adr6-smtp_addr VALUE 'somemailaddress'.
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_reci ).
Set sender
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient ).
then no mail is sent to the recipients mailbox. I tried several variants but no mail is sent. Does somebody know how to set an external e-mail as recipient in this case?
Best regards!
Markus
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.