Skip to Content
avatar image
Former Member

print smartform otf

Hi All,

i am converting smartform output in to otf in order to send it as email or fax or printout as per customer requirement. now my problem is i can convert otf to pdf and fax.

in script we can use .

PERFORM OTF_PRINT(SAPLSTXC) TABLES OTF

USING w_result.

But in smartform i want to know how to convert the otf to printout.

urgent requirement. Pls reply.

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Apr 23, 2007 at 04:56 AM

    hello

    Refer to this link

    https://wiki.sdn.sap.com/wiki/x/jkM.. here i have written complte code to convert the SMArtform to PDF.

    Please Close this thread.. when u r problem is solved. Reward all Helpful answers

    Regards

    Naresh Reddy K

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 23, 2007 at 04:57 AM

    Hi Madhu,

    When you call the smart form FM, you can get the OTF data in a tables parameter.

    You can convert the OTF data into PDF data using the function module.

    Hope this resolves your query.

    <b>Reward all the helpful answers.</b>

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 23, 2007 at 05:00 AM

    Hi,

    Function for generating PDF output

    CALL FUNCTION 'CONVERT_OTF'

    EXPORTING

    format = 'PDF'

    max_linewidth = 132

    IMPORTING

    bin_filesize = pdf_file_size

    TABLES

    otf = gs_output_info-otfdata

    lines = t_pdf_data

    EXCEPTIONS

    err_max_linewidth = 1

    err_format = 2

    err_conv_not_possible = 3

    err_bad_otf = 4

    OTHERS = 5.

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    endif.

    concatenate file ls_bil_invoice-HD_KOMK-BIL_NUMBER c_extn into filename.

    regards

    suresh krishnan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nagaraj,

      PERFORM OTF_PRINT(SAPLSTXC) TABLES OTF

      USING ITCPP.

      this itcpp values from which FM can i get.

      please give some reference codings.

      Thanks

  • avatar image
    Former Member
    Apr 23, 2007 at 10:57 AM

    CALL FUNCTION 'CONVERT_OTF_2_PDF'

    IMPORTING

    bin_filesize = v_bin_filesize

    TABLES

    otf = st_job_output_info-otfdata

    doctab_archive = it_docs

    lines = it_lines

    EXCEPTIONS

    err_conv_not_possible = 1

    err_otf_mc_noendmarker = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Add comment
    10|10000 characters needed characters exceeded