05-07-2007 1:33 PM
Hi,
According to the documentation in SAP library on SmartForms, you should be able mail a smartform as PDF, directly from the generated function module. For that, you have to set the CONTROL_PARAMETERS-DEVICE = 'MAIL'. Then you need to create recipient, sender and application BOR ID's and pass these to parameters MAIL_RECIPIENT, MAIL_SENDER and MAIL_APPL_OBJ. I have no experience with BOR objects, and I think something goes wrong at that point.
The SAP Library refers to sample code, in report RSSOKIF2. I have copied this code, and modified a little, to be able to send to an e-mail address, only changing the recipient type to 'U', and moving the e-mail address to the AddressString parameter.
This doesn't work. Does anyone have any working code to send smartforms to an e-mail address USING THE BUSINESS COMMUNICATIONS INTERFACE ?
I know how to send e-mail with PDF attachment. I am trying to find out how to use the BOR objects technique.
11-21-2007 6:30 PM
Hello Peter,
I did also follow this example but it was from the book - "SAP Smart Forms" by Werner Hertleif and Christoph Wacheter. Chapter 10 has a nice exaple that you can follow. You have to copy some of the source code from the back of the book's appendix. I wa not able to get it to work initially. I found that it was necessary to issue the commit work command if you are sending via external (internet) e-mail. It seemed to me that the commit work was not necessary if you just send to an internal sap user e-mail address.
Also be sure that you have set up the e-mail address for your current user in the SU01 user maintenance.