0% found this document useful (0 votes)
171 views8 pages

3 Methods To Generate A PDF Output and Send Using Floe SAP

The document discusses 3 methods for generating a PDF output and attaching it to an email sent using Floe from SAP. The easiest method is to design the PDF template in Floe Designer. Alternatively, Floe can be used with Varo or Interactive Forms by Adobe to generate the PDF before attaching it to the email. Using Floe alone is the simplest approach but other options allow leveraging existing PDF templates.

Uploaded by

koizak3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views8 pages

3 Methods To Generate A PDF Output and Send Using Floe SAP

The document discusses 3 methods for generating a PDF output and attaching it to an email sent using Floe from SAP. The easiest method is to design the PDF template in Floe Designer. Alternatively, Floe can be used with Varo or Interactive Forms by Adobe to generate the PDF before attaching it to the email. Using Floe alone is the simplest approach but other options allow leveraging existing PDF templates.

Uploaded by

koizak3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Community Topics Groups Answers Blogs Events Programs Resources

Ask a Question Write a Blog Post Login / Sign

Technical Articles

Chris Scott
November 24, 2022 | 3 minute read

3 methods to generate a PDF output and


send using Floe
 0  1  238
Follow

It’s never been easier to generate powerful dynamic emails from SAP using Floe.  In many cases,
 Like the email can replace old PDF outputs generated by SAPScript, Smartforms or Adobe forms. 
But in some scenarios there is still a valid business need to include an attachment with the
outbound email.
 RSS Feed
There are multiple ways to generate the PDF and attach it to the email.  Here are three methods,
rising in complexity…

1) Floe
By far the easiest method is to build the output template in Floe Designer.
The process is exactly the same as designing a dynamic email template in Floe, but you can add
PDF options:

Then simply reference the template type as an attachment in the outbound email settings:
Then, in your output program, simply call the Floe API and the PDF will be automatically
generated and added to the email:

CALL FUNCTION '/FLOE/EMAIL_OUT'


EXPORTING
im_etype = gv_etype
im_elang = gv_language
im_document = l_im_doc
im_rec_emails = gt_rec_emails
im_variables = gt_vars
im_send_immediately = 'X'
im_attachments = lt_attach
im_preview = gv_screen_display
im_no_commit = lv_no_commit
IMPORTING
ex_subrc = <gv_returncode>
ex_ebody = ev_ebody
ex_mess = lt_mess
ex_rec_emails = et_rec_emails
ex_attachments = et_attachments
ex_esubject_long = ev_esubject_long.

Check out the full code example here

This method requires a subscription to Renda.io, which integrates seamlessly with Floe for PDF
generation.

2) Floe and Varo


If you already have Varo and skills in Adobe Designer, then you may prefer this option to generate
your PDF.  This method requires no subscription to Renda.io, but you do need some Floe
Designer expertise.

The form �eld design is handled by Varo, and the �elds arranged in Adobe Designer.

Then when you call the output program, you need to pass in two template types – one for the
Floe email template and the other for the Varo form template:
Then in the output program you need to call the Varo function to return the PDF:

CALL FUNCTION '/FLM/OUTPUT_PDF_PDL_OUT'


EXPORTING
im_ftype = lv_ftype
im_fid = lv_fid
im_fver = lv_fver
im_toption = lv_template
im_document = lv_doc
im_variables = lt_variables
im_no_print = 'X'
* IM_PDLTYPE =
* IM_XDCNAME =
IMPORTING
ex_pdf = lv_pdf
* EX_PDL =
* EX_PAGECOUNT =
* EX_JOB_ID =
ex_subrc = <gv_returncode>
ex_mess = ls_mess.

And then add this to the Floe attachments import parameter before calling the Floe API:

*-------------------------------------------------------------------
* Fill attachment
*
CONCATENATE 'Order_' lv_order '.pdf' INTO ls_attach-att_filename.
ls_attach-att_description = 'Order_output'.
ls_attach-att_data = lv_pdf.
APPEND ls_attach TO lt_attach.
ENDIF.
ENDIF.
*
*-------------------------------------------------------------------

CALL FUNCTION '/FLOE/EMAIL_OUT'


EXPORTING
im_etype = gv_etype
im_elang = gv_language
im_document = l_im_doc
im_rec_emails = gt_rec_emails
im_variables = gt_vars
im_send_immediately = 'X'
im_attachments = lt_attach
im_preview = gv_screen_display
im_no_commit = lv_no_commit
IMPORTING
ex_subrc = <gv_returncode>
ex_ebody = ev_ebody
ex_mess = lt_mess
ex_rec_emails = et_rec_emails
ex_attachments = et_attachments
ex_esubject_long = ev_esubject_long.

See the full code example here.

3 ) F l o e a n d I f BA
In scenarios where you already have a PDF template de�ned using Interactive Forms by Adobe,
then you can generate the PDF, then add it to the Floe attachments table as above.

In order to generate the PDF you �rst need to set output settings:

ls_outputparams-nodialog = abap_true.
ls_outputparams-connection = 'ADS'.
ls_outputparams-getpdf = abap_true.
ls_outputparams-preview = abap_false.

Then follow the process to call ADS to print the PDF, but the output settings will return the PDF
�le rather than send to the SAP Spool.


PERFORM get_output_params

CALL FUNCTION 'FP_JOB_OPEN'


CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'


CALL FUNCTION lv_fm_name


CALL FUNCTION 'FP_JOB_CLOSE'


Note that the function call returns parameter ls_pdf_�le:


This has the following structure:

So it’s very simple to add to the Floe attachments table as follows:

CONCATENATE 'Order_' lv_order '.pdf' INTO ls_attach-att_filename.


ls_attach-att_description = 'Order_output'.
ls_attach-att_data = ls_pdf_file-pdf.
APPEND ls_attach TO lt_attach.

Summary
Using Floe alone (with Renda.io) is comfortably the easiest way to manage PDF output
templates, but you can use any other means to generate a PDF and then send as an email
attachment with Floe.

Of course, it’s even better if you can get rid of the attachment entirely.
Assigned Tags Alert Moderator

SAP ERP | SAP Interactive Forms by Adobe | SAP S/4HANA | �oe

Similar Blog Posts 


Replacing SAPScript and SMARTFORMS Send PDF Copy of document to email & Business
By Chris Scott May 10, 2021 workplace from Spool Request Number
By Shashank Gupta Jul 08, 2013

Generate PDF Copies from Spool Request Number


By Jignesh Mehta Apr 25, 2012

Related Questions 
PO output as PDF PDF format PO send to Vendor
By Former Member Aug 04, 2008 By sapman man Aug 25, 2011

Con�guration of Purchase order to send thro' MAIL


By Former Member Jul 03, 2008

Be the �rst to leave a comment

You must be Logged on to comment or reply to a post.


Find us on

You might also like