<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: pdf Print in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975233#M1159389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suprit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this link...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting Script to pdf..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6369004"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting SMARTFORM to pdf..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6709203"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2009 05:01:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-13T05:01:05Z</dc:date>
    <item>
      <title>pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975232#M1159388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;         when i execute my form i'll get two options i,e Print &amp;amp; Print Preview.&lt;/P&gt;&lt;P&gt;user needs when he clicks on Print he needs output in PDF format how to &lt;/P&gt;&lt;P&gt;approach to this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suprith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 04:58:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975232#M1159388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T04:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975233#M1159389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suprit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this link...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting Script to pdf..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6369004"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting SMARTFORM to pdf..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6709203"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 05:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975233#M1159389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T05:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975234#M1159390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the NACE transaction, you can assign PDF TYPE for the output type and the smartform which you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to Nace, find the appication and then output types and then click your output type then processing routines,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now check the printout as medium and at the last type as PDF..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkatesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 05:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975234#M1159390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T05:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975235#M1159391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;look after this wiki.&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/Snippets/Smartform%2boutput%2bto%2bPDF%2bformat" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/Snippets/Smartform%2boutput%2bto%2bPDF%2bformat&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If required make changes according to this wiki.It might help you a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 05:06:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975235#M1159391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T05:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975236#M1159392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try using the program 'RSTXPDFT4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also try to convert the spool job to PDF using function module CONVERT_OTFSPOOLJOB_2_PDF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aakash Banga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 05:08:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975236#M1159392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T05:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975237#M1159393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;click on the print button of Print Prieview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u will get the spool number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to SE38 -&amp;gt; report name 'RSTXPDFT4' run it and give the spool number and run that report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will ask you to save that print in PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 05:40:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975237#M1159393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T05:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975238#M1159394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at first put this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL FUNCTION 'K_KKB_POPUP_RADIO2'
    EXPORTING
      i_title   = 'Type Of OutPut'
      i_text1   = 'Normal Output'
      i_text2   = 'PDF Output'
      i_default = '1'
    IMPORTING
      i_result  = i_result
    EXCEPTIONS
      cancel    = 1
      OTHERS    = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  IF i_result = '2'.

    DATA:
    w_form_name TYPE tdsfname VALUE '&amp;lt;SAMRTFORM_NAME&amp;gt;',
    w_fmodule TYPE rs38l_fnam,
    w_cparam TYPE ssfctrlop,
    w_outoptions TYPE ssfcompop,
    w_bin_filesize TYPE i, " Binary File Size
    w_file_name TYPE string,
    w_file_path TYPE string ,
    w_full_path TYPE string .

*   Internal tables declaration
*   Internal table to hold the OTF data
*******************************************************************
    DATA:  t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
*Internal table to hold OTF data recd from the SMARTFORM
      t_otf_from_fm TYPE ssfcrescl,
*Internal table to hold the data from the FM CONVERT_OTF
      t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.


    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = w_form_name
        variant            = ' '
        direct_call        = ' '
      IMPORTING
        fm_name            = w_fmodule
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

*    Calling the SMARTFORM using the function module retrieved above
*GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
*format of the output:
*********************************************************************
    w_cparam-no_dialog = 'X'.
    w_cparam-preview = space. " Suppressing the dialog box
    " for print preview
    w_cparam-getotf = 'X'.
*   Printer name to be used is provided in the export parameter
*OUTPUT_OPTIONS
*********************************************************************
    w_outoptions-tddest = 'LOCL'.

    CALL FUNCTION w_fmodule
    EXPORTING
       wa_ekko                   = wa_ekko
         wa_adrc                 = wa_adrc
         wa_ecc                  = wa_ecc
         wa_range1               = wa_range1
         wa_range2               = wa_range2
         wa_bednr                = wa_bednr
         wa_banfn                = wa_banfn
         wa_revno                = wa_revno
         wa_vat                  = wa_vat
         wa_cst                  = wa_cst
         count                   = count
         wa_slfdt                = wa_slfdt
         wa_menge1               = wa_menge1
         wa_menge                = wa_menge
         wa_telfx                =  wa_telfx
         wa_month                = wa_month
         wa_year                 = wa_year
         wa_ernam                = wa_ernam
         wa_email                = wa_email
         wa_adrc_copy            = wa_adrc_copy
         wa_pspel                = wa_pspel
         wa_werks                = wa_werks
*        ARCHIVE_INDEX =
*        ARCHIVE_INDEX_TAB =
*        ARCHIVE_PARAMETERS =
        control_parameters = w_cparam

*        MAIL_APPL_OBJ =
*        MAIL_RECIPIENT =
*        MAIL_SENDER =
         output_options = w_outoptions

         user_settings = 'X'
        IMPORTING
        job_output_info = t_otf_from_fm
*        DOCUMENT_OUTPUT_INFO =
        TABLES
         it_eket                = it_eket
         it_text                = it_text
         line                   = line
         it_adrc_new            = it_adrc_new
         it_esll                = it_esll

*     JOB_OUTPUT_OPTIONS =
      EXCEPTIONS
      formatting_error = 1
      internal_error = 2
      send_error = 3
      user_canceled = 4
       OTHERS = 5
    .
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

    t_otf[] = t_otf_from_fm-otfdata[].

*Function Module CONVERT_OTF is used to convert the OTF format to PDF
*************************************************************************
    DATA : w_archive LIKE	toa_dara VALUE space.

    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
        max_linewidth         = 132
        archive_index         = w_archive
        copynumber            = 0
        ascii_bidi_vis2log    = ' '
        pdf_delete_otftab     = ' '
      IMPORTING
        bin_filesize          = w_bin_filesize
*        bin_file              =
        TABLES
        otf                   = t_otf
        lines                 = t_pdf_tab
      EXCEPTIONS
        err_max_linewidth     = 1
        err_format            = 2
        err_conv_not_possible = 3
        err_bad_otf           = 4
        OTHERS                = 5.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
********************************************************************************
*    to display file save dialog window
*********************************************************************************

    CALL METHOD cl_gui_frontend_services=&amp;gt;file_save_dialog

    EXPORTING
*     window_title =
*     default_extension =
*     default_file_name =
*     file_filter =
     initial_directory = 'c:\Documents and Settings\2q\Desktop' "'\\jumbo\fileshares'
*     with_encoding =
    prompt_on_overwrite = 'X'
    CHANGING
    filename = w_file_name
    path = w_file_path
    fullpath = w_full_path

*    user_action =
*    file_encoding =
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    not_supported_by_gui = 3
    OTHERS = 4
    .
    IF sy-subrc &amp;lt;&amp;gt; 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

*****************************************************************************
*    use the fm gui_download to download the generated pdf file onto the
*    presentation server
******************************************************************************

    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        bin_filesize              = w_bin_filesize
        filename                  = w_full_path
        filetype                  = 'BIN'
        append                    = ' '
        write_field_separator     = ' '
        header                    = '00'
        trunc_trailing_blanks     = ' '
        write_lf                  = 'X'
        col_select                = ' '
        col_select_mask           = ' '
        dat_mode                  = ' '
        confirm_overwrite         = ' '
        no_auth_check             = ' '
        codepage                  = ' '
        ignore_cerr               = abap_true
        replacement               = '#'
        write_bom                 = ' '
        trunc_trailing_blanks_eol = 'X'
        wk1_n_format              = ' '
        wk1_n_size                = ' '
        wk1_t_format              = ' '
        wk1_t_size                = ' '
*      IMPORTING
*        filelength                =
        TABLES
        data_tab                  = t_pdf_tab
*        fieldnames                =
        EXCEPTIONS
        file_write_error          = 1
        no_batch                  = 2
        gui_refuse_filetransfer   = 3
        invalid_type              = 4
        no_authority              = 5
        unknown_error             = 6
        header_not_allowed        = 7
        separator_not_allowed     = 8
        filesize_not_allowed      = 9
        header_too_long           = 10
        dp_error_create           = 11
        dp_error_send             = 12
        dp_error_write            = 13
        unknown_dp_error          = 14
        access_denied             = 15
        dp_out_of_memory          = 16
        disk_full                 = 17
        dp_timeout                = 18
        file_not_found            = 19
        dataprovider_exception    = 20
        control_flush_error       = 21
        OTHERS                    = 22.
    IF sy-subrc &amp;lt;&amp;gt; 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
*************************************************************************
*  ENDIF.


  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 05:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975238#M1159394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T05:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975239#M1159395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;copy-paste from: &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2856565"&gt;&lt;/A&gt; sixth such offense from the same user &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;If you repeat next time you will loose 100 points&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vijay Babu Dudla on Jan 21, 2009 7:15 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 06:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975239#M1159395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T06:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: pdf Print</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975240#M1159396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing what you can do is .....comment this code ...ST_CONTROL_PARAMETERS-GETOTF = 'X'. and pass space to ST_CONTROL_PARAMETERS-NO_DIALOG ...when you get the Pop-up screen for the Print and print priview ..click on the print privew you get the view window from the menu TEXT-&amp;gt;Print. then the spool is generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this RSTXPDFT4 to convert the spool to PDF. If the there is any error in generating the PDF then the what ever deveice type your getting in this V_E_DEVTYPE is enable to conver to PDF....try check for the any other Device Type and test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find the Device types from Tcode SPAD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 06:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-print/m-p/4975240#M1159396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T06:59:52Z</dc:date>
    </item>
  </channel>
</rss>

