Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can use Smartforms to display pdf in your app.

Step-by-step guide

  1. Create and design smartform layout.   
  2. Create an odata service to call and process created smartform returning pdf data. 
    1. Sample entity set definition:

...


3. Use function module CONVERT_OTF to convert OTF to PDF.

IF ls_return-otfdata[] IS NOT INITIAL.


lt_otf[] = ls_return-otfdata[].


CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_len_in
bin_file = lv_pdf_xstring
TABLES
otf = lt_otf
lines = lt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.

 ENDIF.

4. Pass bin_file parameter from FM CONVERT_OTF to PDFData form field.

...