<?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 resize in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294152#M1635068</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My pblm solved.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Oct 2011 04:38:12 GMT</pubDate>
    <dc:creator>former_member209696</dc:creator>
    <dc:date>2011-10-29T04:38:12Z</dc:date>
    <item>
      <title>PDF resize</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294148#M1635064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai guyz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have one requirement to download the alv report as PDF. Am using CONVERT_ABAPSPOOLJOB_2_PDF function module to convet to pdf and GUI_DOWNLOAD to download. My ALV consist of 36 fields. When am trying to download its going to runtime error. When am trying with least alv  fields (10-15 fields ) its downloading perfectly. I think I want to increase the width of the pdf&lt;/P&gt;&lt;P&gt;is there any solution for this? kindly help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;am passing following parameters in   CONVERT_ABAPSPOOLJOB_2_PDF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'CONVERT_ABAPSPOOLJOB_2_PDF'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      src_spoolid = w_spno      -&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;spool no&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      pdf         = it_pdf.----&lt;/P&gt;&lt;HR originaltext="------------" /&gt;&lt;P&gt;internal table&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;thanks in advance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Riyas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 04:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294148#M1635064</guid>
      <dc:creator>former_member209696</dc:creator>
      <dc:date>2011-10-28T04:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: PDF resize</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294149#M1635065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi riyas,&lt;/P&gt;&lt;P&gt; After converting the ALV output to PDF you must  change the width of the PDF generated from spool by using &lt;STRONG&gt;SX_TABLE_LINE_WIDTH_CHANGE&lt;/STRONG&gt;  function module.&lt;/P&gt;&lt;P&gt;[Reference|&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1485574"&gt;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid              = g_spool_no
        no_dialog                = ' '
      IMPORTING
        pdf_bytecount            = l_no_of_bytes
        pdf_spoolid              = l_pdf_spoolid
        btc_jobname              = l_jobname
        btc_jobcount             = l_jobcount
      TABLES
        pdf                      = i_pdf
      EXCEPTIONS
        err_no_abap_spooljob     = 1
        err_no_spooljob          = 2
        err_no_permission        = 3
        err_conv_not_possible    = 4
        err_bad_destdevice       = 5
        user_cancelled           = 6
        err_spoolerror           = 7
        err_temseerror           = 8
        err_btcjob_open_failed   = 9
        err_btcjob_submit_failed = 10
        err_btcjob_close_failed  = 11
        OTHERS                   = 12.
 
    CASE sy-subrc.
      WHEN 0.
      WHEN 1.
        MESSAGE s000(0k) WITH 'No ABAP Spool Job'.
        EXIT.
      WHEN 2.
        MESSAGE s000(0k) WITH 'Spool Number does not exist'.
        EXIT.
      WHEN 3.
        MESSAGE s000(0k) WITH 'No permission for spool'.
        EXIT.
      WHEN OTHERS.
        MESSAGE s000(0k)
           WITH 'Error in Function CONVERT_ABAPSPOOLJOB_2_PDF'.
        EXIT.
    ENDCASE.
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
      EXPORTING
        line_width_src              = 134
        line_width_dst              = 255
      TABLES
        content_in                  = i_pdf
        content_out                 = l_attachment
      EXCEPTIONS
        err_line_width_src_too_long = 1
        err_line_width_dst_too_long = 2
        err_conv_failed             = 3
        OTHERS                      = 4.
    IF sy-subrc NE 0.
      MESSAGE s000(0k) WITH 'Conversion Failed'.
      EXIT.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;koolspy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 04:41:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294149#M1635065</guid>
      <dc:creator>koolspy_ultimate</dc:creator>
      <dc:date>2011-10-28T04:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: PDF resize</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294150#M1635066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;as mentioned in a link,follow the code may help u:&lt;/P&gt;&lt;P&gt;report zabap_2_pdf.&lt;/P&gt;&lt;P&gt;*-- Enhancements: only allow to be run with variant. Then called&lt;/P&gt;&lt;P&gt;*-- program will be transparent to users&lt;/P&gt;&lt;P&gt;*-- TABLES&lt;/P&gt;&lt;P&gt;tables:&lt;/P&gt;&lt;P&gt;tsp01.&lt;/P&gt;&lt;P&gt;*-- STRUCTURES&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;mstr_print_parms like pri_params,&lt;/P&gt;&lt;P&gt;mc_valid(1) type c,&lt;/P&gt;&lt;P&gt;mi_bytecount type i,&lt;/P&gt;&lt;P&gt;mi_length type i,&lt;/P&gt;&lt;P&gt;mi_rqident like tsp01-rqident.&lt;/P&gt;&lt;P&gt;*-- INTERNAL TABLES&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;mtab_pdf like tline occurs 0 with header line,&lt;/P&gt;&lt;P&gt;mc_filename like rlgrap-filename.&lt;/P&gt;&lt;P&gt;*-- SELECTION SCREEN&lt;/P&gt;&lt;P&gt;parameters:&lt;/P&gt;&lt;P&gt;p_repid like sy-repid, " Report to execute&lt;/P&gt;&lt;P&gt;p_linsz like sy-linsz default 132, " Line size&lt;/P&gt;&lt;P&gt;p_paart like sy-paart default 'X_65_132'. " Paper Format&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;concatenate 'c:\'&lt;/P&gt;&lt;P&gt;p_repid&lt;/P&gt;&lt;P&gt;'.pdf'&lt;/P&gt;&lt;P&gt;into mc_filename.&lt;/P&gt;&lt;P&gt;*-- Setup the Print Parmaters&lt;/P&gt;&lt;P&gt;call function 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;authority= space&lt;/P&gt;&lt;P&gt;copies = '1'&lt;/P&gt;&lt;P&gt;cover_page = space&lt;/P&gt;&lt;P&gt;data_set = space&lt;/P&gt;&lt;P&gt;department = space&lt;/P&gt;&lt;P&gt;destination = space&lt;/P&gt;&lt;P&gt;expiration = '1'&lt;/P&gt;&lt;P&gt;immediately = space&lt;/P&gt;&lt;P&gt;in_archive_parameters = space&lt;/P&gt;&lt;P&gt;in_parameters = space&lt;/P&gt;&lt;P&gt;layout = space&lt;/P&gt;&lt;P&gt;mode = space&lt;/P&gt;&lt;P&gt;new_list_id = 'X'&lt;/P&gt;&lt;P&gt;no_dialog= 'X'&lt;/P&gt;&lt;P&gt;user = sy-uname&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;out_parameters = mstr_print_parms&lt;/P&gt;&lt;P&gt;valid = mc_valid&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;archive_info_not_found = 1&lt;/P&gt;&lt;P&gt;invalid_print_params = 2&lt;/P&gt;&lt;P&gt;invalid_archive_params = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;P&gt;*-- Make sure that a printer destination has been set up&lt;/P&gt;&lt;P&gt;*-- If this is not done the PDF function module ABENDS&lt;/P&gt;&lt;P&gt;if mstr_print_parms-pdest = space.&lt;/P&gt;&lt;P&gt;mstr_print_parms-pdest = 'LOCL'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;*-- Explicitly set line width, and output format so that&lt;/P&gt;&lt;P&gt;*-- the PDF conversion comes out OK&lt;/P&gt;&lt;P&gt;mstr_print_parms-linsz = p_linsz.&lt;/P&gt;&lt;P&gt;mstr_print_parms-paart = p_paart.&lt;/P&gt;&lt;P&gt;submit (p_repid) to sap-spool without spool dynpro&lt;/P&gt;&lt;P&gt;spool parameters mstr_print_parms&lt;/P&gt;&lt;P&gt;via selection-screen&lt;/P&gt;&lt;P&gt;and return.&lt;/P&gt;&lt;P&gt;*-- Find out what the spool number is that was just created&lt;/P&gt;&lt;P&gt;perform get_spool_number using sy-repid&lt;/P&gt;&lt;P&gt;sy-uname&lt;/P&gt;&lt;P&gt;changing mi_rqident.&lt;/P&gt;&lt;P&gt;*-- Convert Spool to PDF&lt;/P&gt;&lt;P&gt;call function 'CONVERT_ABAPSPOOLJOB_2_PDF'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;src_spoolid= mi_rqident&lt;/P&gt;&lt;P&gt;no_dialog = space&lt;/P&gt;&lt;P&gt;dst_device = mstr_print_parms-pdest&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;pdf_bytecount = mi_bytecount&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;pdf = mtab_pdf&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;err_no_abap_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_destdevice = 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;call function 'DOWNLOAD'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;bin_filesize = mi_bytecount&lt;/P&gt;&lt;P&gt;filename = mc_filename&lt;/P&gt;&lt;P&gt;filetype = 'BIN'&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;act_filename = mc_filename&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;data_tab = mtab_pdf.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORM get_spool_number *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the most recent spool created by user/report *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; F_REPID *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; F_UNAME *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt; F_RQIDENT *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------" /&gt;&lt;P&gt;form get_spool_number using f_repid&lt;/P&gt;&lt;P&gt;f_uname&lt;/P&gt;&lt;P&gt;changing f_rqident.&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;lc_rq2name like tsp01-rq2name.&lt;/P&gt;&lt;P&gt;concatenate f_repid+0(8)&lt;/P&gt;&lt;P&gt;f_uname+0(3)&lt;/P&gt;&lt;P&gt;into lc_rq2name separated by '_'.&lt;/P&gt;&lt;P&gt;select * from tsp01 where rq2name = lc_rq2name&lt;/P&gt;&lt;P&gt;order by rqcretime descending.&lt;/P&gt;&lt;P&gt;f_rqident = tsp01-rqident.&lt;/P&gt;&lt;P&gt;exit.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;clear f_rqident.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endform." get_spool_number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;u can use other method:&lt;/P&gt;&lt;P&gt;First convert the output internal table data to OTF using FM 'CONVERT_OTF' and then download it using 'GUI_DOWNLOAD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND CHECK Sample programs:&lt;/P&gt;&lt;P&gt;RSTXPDFT4&lt;/P&gt;&lt;P&gt;RSTXPDFT5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anusha25 on Oct 28, 2011 10:17 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 04:46:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294150#M1635066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-28T04:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: PDF resize</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294151#M1635067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Riyas , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spool length  is defined  by sap of length 255 char only  , so it will dispaly  only  limited field .&lt;/P&gt;&lt;P&gt;would like to suggest  you  to use   gui_download  just after the   'reusee_alv_list_display' and download it into   pdf format .&lt;/P&gt;&lt;P&gt;&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;ranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 07:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294151#M1635067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-28T07:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: PDF resize</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294152#M1635068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My pblm solved.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Oct 2011 04:38:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-resize/m-p/8294152#M1635068</guid>
      <dc:creator>former_member209696</dc:creator>
      <dc:date>2011-10-29T04:38:12Z</dc:date>
    </item>
  </channel>
</rss>

