Вы находитесь на странице: 1из 4

3/19/2018 Converting Smart Forms to PDF output - SAP ABAP Advanced Cookbook

  

 You're currently viewing a course from Mapt logged out


Sign In (/mapt/login)

Converting Smart Forms to


PDF output

In this recipe, we will see how the form output may


be suppressed and returned as internal table to our
calling program and then how a PDF is generated
within the program. We will set values to some
elds in the control structure of the Smart Form
and use it with the CONVERT_OTF_2_PDF

function module.

How to do it...

Feedback
For generating PDF output without showing the




Smart Form on the screen, follow these steps:

1
First, we de ne two structures
cont_parameters and myoutput

based on the dictionary structures


ssfctrlop and ssfcrescl

respectively.

https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781849684880/7/ch07lvl1sec52/converting-smart-forms-to-pdf-output 1/4
3/19/2018 Converting Smart Forms to PDF output - SAP ABAP Advanced Cookbook

2
Then, we assign 'X' to the setotf

and no_dialog elds of the control


structure.

3
The dynamic call of the Smart Form
function module is then carried out.

4
Appropriate variables are then de ned.
The most important is the internal table
pdf_content used for storing the
converted PDF output of the form. The

Feedback
filesize and doc_archive tables
are necessary for calling the function




module CONVERT_OTF_2_PDF .

5
The function module
CONVERT_OTF_2_PDF is then called. The
OTF parameter passes the value of the
eld otfdata of the myoutput

structure.

https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781849684880/7/ch07lvl1sec52/converting-smart-forms-to-pdf-output 2/4
3/19/2018 Converting Smart Forms to PDF output - SAP ABAP Advanced Cookbook

How it works...

The control...

Access every
Packt eBook and Video for
FREE today!

Access all 5,500+ eBooks & Videos


100 new titles every month

Feedback
Assess your skill set with
assessments
Learn more effectively with 



curated Skill Plans and Projects
1 Free eBook/Video to keep every
month

o/free-trial-14-days/)

oduct=2c92a0fd5fe284cd015fe42d83f0492d&freeTrial)

https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781849684880/7/ch07lvl1sec52/converting-smart-forms-to-pdf-output 3/4
3/19/2018 Converting Smart Forms to PDF output - SAP ABAP Advanced Cookbook

 Previous Section (/mapt/book/big_data_and_b

Next Section  (/mapt/book/big_data_and_busin

    

Feedback



https://www.packtpub.com/mapt/book/big_data_and_business_intelligence/9781849684880/7/ch07lvl1sec52/converting-smart-forms-to-pdf-output 4/4

Вам также может понравиться