<?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 conversion--unknown characters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756828#M1304114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt; Hi Pradeep, 

Here is the sample program for your requirement. 
&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_notepad.

"Variables
DATA:
   l_lay    TYPE pri_params-paart,
   l_lines  TYPE pri_params-linct,
   l_cols   TYPE pri_params-linsz,
   l_val    TYPE c.
*Types
TYPES:
   t_pripar TYPE pri_params,
   t_arcpar TYPE arc_params.
"Work areas
DATA:
   lw_pripar TYPE t_pripar,
   lw_arcpar TYPE t_arcpar.
DATA:
   it_t100 TYPE t100  OCCURS 0 WITH HEADER LINE,
   it_pdf  TYPE tline OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.
  l_lay   = 'X_65_132'.
  l_lines = 65.
  l_cols  = 132.
  "Read, determine, change spool print parameters and archive parameters
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      in_archive_parameters  = lw_arcpar
      in_parameters          = lw_pripar
      layout                 = l_lay
      line_count             = l_lines
      line_size              = l_cols
      no_dialog              = 'X'
    IMPORTING
      out_archive_parameters = lw_arcpar
      out_parameters         = lw_pripar
      valid                  = l_val
    EXCEPTIONS
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      OTHERS                 = 4.
  IF l_val &amp;lt;&amp;gt; space AND sy-subrc = 0.
    lw_pripar-prrel = space.
    lw_pripar-primm = space.
    NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS lw_pripar
      ARCHIVE PARAMETERS lw_arcpar
      NO DIALOG.
  ENDIF.
* Get data
  SELECT *
  FROM t100
  INTO TABLE it_t100
  UP TO 100 ROWS
  WHERE sprsl = sy-langu.

  LOOP AT it_t100.
    WRITE:/ it_t100.
  ENDLOOP.

  NEW-PAGE PRINT OFF.
  CALL FUNCTION 'ABAP4_COMMIT_WORK'.

  "Variables
  DATA:
      l_no_of_bytes TYPE i,
      l_pdf_spoolid LIKE tsp01-rqident,
      l_jobname     LIKE tbtcjob-jobname,
      l_jobcount    LIKE tbtcjob-jobcount.
  DATA:
        spoolno TYPE tsp01-rqident.
  spoolno = sy-spono.
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid   = spoolno
      no_dialog     = ' '
    IMPORTING
      pdf_bytecount = l_no_of_bytes
      pdf_spoolid   = l_pdf_spoolid
      btc_jobname   = l_jobname
      btc_jobcount  = l_jobcount
    TABLES
      pdf           = it_pdf.

  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename = 'C:\itab_to_pdf.pdf'
      filetype = 'BIN'
    TABLES
      data_tab = it_pdf.&lt;/CODE&gt;&lt;/PRE&gt;
I hope that it solves your problem.
Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jun 2009 06:48:58 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2009-06-29T06:48:58Z</dc:date>
    <item>
      <title>Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756827#M1304113</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;&lt;/P&gt;&lt;P&gt;I am trying to convert internal table to pdf fomrat.&lt;/P&gt;&lt;P&gt;I have used RSPO_OPEN_SPOOLREQUEST , RSPO_WRITE_SPOOLREQUEST , RSPO_CLOSE_SPOOLREQUEST  and finally CONVERT_ABAPSPOOLJOB_2_PDF. There is a table  PDF  in CONVERT_ABAPSPOOLJOB_2_PDF .But , when i debug the code,&lt;/P&gt;&lt;P&gt;i see some unknon chinese characters in the table PDF.Was there any problem or is this normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;--Pradeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pradeep nellore on Jun 29, 2009 7:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 05:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756827#M1304113</guid>
      <dc:creator>pradeep_nellore</dc:creator>
      <dc:date>2009-06-29T05:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756828#M1304114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt; Hi Pradeep, 

Here is the sample program for your requirement. 
&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_notepad.

"Variables
DATA:
   l_lay    TYPE pri_params-paart,
   l_lines  TYPE pri_params-linct,
   l_cols   TYPE pri_params-linsz,
   l_val    TYPE c.
*Types
TYPES:
   t_pripar TYPE pri_params,
   t_arcpar TYPE arc_params.
"Work areas
DATA:
   lw_pripar TYPE t_pripar,
   lw_arcpar TYPE t_arcpar.
DATA:
   it_t100 TYPE t100  OCCURS 0 WITH HEADER LINE,
   it_pdf  TYPE tline OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.
  l_lay   = 'X_65_132'.
  l_lines = 65.
  l_cols  = 132.
  "Read, determine, change spool print parameters and archive parameters
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      in_archive_parameters  = lw_arcpar
      in_parameters          = lw_pripar
      layout                 = l_lay
      line_count             = l_lines
      line_size              = l_cols
      no_dialog              = 'X'
    IMPORTING
      out_archive_parameters = lw_arcpar
      out_parameters         = lw_pripar
      valid                  = l_val
    EXCEPTIONS
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      OTHERS                 = 4.
  IF l_val &amp;lt;&amp;gt; space AND sy-subrc = 0.
    lw_pripar-prrel = space.
    lw_pripar-primm = space.
    NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS lw_pripar
      ARCHIVE PARAMETERS lw_arcpar
      NO DIALOG.
  ENDIF.
* Get data
  SELECT *
  FROM t100
  INTO TABLE it_t100
  UP TO 100 ROWS
  WHERE sprsl = sy-langu.

  LOOP AT it_t100.
    WRITE:/ it_t100.
  ENDLOOP.

  NEW-PAGE PRINT OFF.
  CALL FUNCTION 'ABAP4_COMMIT_WORK'.

  "Variables
  DATA:
      l_no_of_bytes TYPE i,
      l_pdf_spoolid LIKE tsp01-rqident,
      l_jobname     LIKE tbtcjob-jobname,
      l_jobcount    LIKE tbtcjob-jobcount.
  DATA:
        spoolno TYPE tsp01-rqident.
  spoolno = sy-spono.
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid   = spoolno
      no_dialog     = ' '
    IMPORTING
      pdf_bytecount = l_no_of_bytes
      pdf_spoolid   = l_pdf_spoolid
      btc_jobname   = l_jobname
      btc_jobcount  = l_jobcount
    TABLES
      pdf           = it_pdf.

  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename = 'C:\itab_to_pdf.pdf'
      filetype = 'BIN'
    TABLES
      data_tab = it_pdf.&lt;/CODE&gt;&lt;/PRE&gt;
I hope that it solves your problem.
Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 06:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756828#M1304114</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-06-29T06:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756829#M1304115</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;Instead of checking the result in debugging, please check the actual output. If that is fine, I don't think that you need to bother about chinese characters!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 06:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756829#M1304115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T06:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756830#M1304116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the standard report &lt;STRONG&gt;RSTXPDFT4&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 06:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756830#M1304116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T06:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756831#M1304117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the function module again and also its parameters.&lt;/P&gt;&lt;P&gt;U just need to give the spool no...and u'll get the pdf table...even if u dont give the other parameters, its ok...doesnt affect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: T_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_RQIDENT TYPE TSP01-RQIDENT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_RQ2NAME TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Retrieving Spool ID From TSP01 Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE V_RQ2NAME SY-UNAME INTO V_RQ2NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM TSP01&lt;/P&gt;&lt;P&gt;WHERE RQ2NAME EQ V_RQ2NAME ORDER BY RQCRETIME DESCENDING.&lt;/P&gt;&lt;P&gt;  V_RQIDENT = TSP01-RQIDENT.&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;  CLEAR V_RQIDENT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    SRC_SPOOLID              = V_SpoolNo&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    PDF                      = T_PDF&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    ERR_NO_OTF_SPOOLJOB      = 1&lt;/P&gt;&lt;P&gt;    ERR_NO_SPOOLJOB          = 2&lt;/P&gt;&lt;P&gt;    ERR_NO_PERMISSION        = 3&lt;/P&gt;&lt;P&gt;    ERR_CONV_NOT_POSSIBLE    = 4&lt;/P&gt;&lt;P&gt;    ERR_BAD_DSTDEVICE        = 5&lt;/P&gt;&lt;P&gt;    USER_CANCELLED           = 6&lt;/P&gt;&lt;P&gt;    ERR_SPOOLERROR           = 7&lt;/P&gt;&lt;P&gt;    ERR_TEMSEERROR           = 8&lt;/P&gt;&lt;P&gt;    ERR_BTCJOB_OPEN_FAILED   = 9&lt;/P&gt;&lt;P&gt;    ERR_BTCJOB_SUBMIT_FAILED = 10&lt;/P&gt;&lt;P&gt;    ERR_BTCJOB_CLOSE_FAILED  = 11&lt;/P&gt;&lt;P&gt;    OTHERS                   = 12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps u &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; If any problem still persists, then let us know&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;Radhika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 07:12:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756831#M1304117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T07:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756832#M1304118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have zero pages in the pdf file.Also the PDF-BYTECOUNT has very little bytes.what could have been the mistake and how to rectify it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;--Pradeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 10:16:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756832#M1304118</guid>
      <dc:creator>pradeep_nellore</dc:creator>
      <dc:date>2009-06-29T10:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pdf conversion--unknown characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756833#M1304119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pradeep, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check whether internal table has the data or not before it is sent to Spool..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Venkat.O&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 12:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-conversion-unknown-characters/m-p/5756833#M1304119</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2009-06-29T12:40:52Z</dc:date>
    </item>
  </channel>
</rss>

