<?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 file in application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405068#M195582</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;yes you can . you can upload the PDF file using &amp;lt;b&amp;gt;GUI_UPLOAD&amp;lt;/b&amp;gt; with filetype  = 'BIN' and then use open dataset , transfer, close dataset , store the fiel in application server.&lt;/P&gt;&lt;P&gt;it_pdf is the internal table to which you uploaded the pdf file using gui_upload fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset file for output in binary mode .&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at it_pdf.&lt;/P&gt;&lt;P&gt;transfer it_pdf file.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;close dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2006 08:25:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-14T08:25:29Z</dc:date>
    <item>
      <title>pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405064#M195578</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;I have a pdf file with me, can I store it in application server, through a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 08:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405064#M195578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T08:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405065#M195579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. CG3Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. U can use the above tcode to upload file&lt;/P&gt;&lt;P&gt;  on application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If u want to write your own z program,&lt;/P&gt;&lt;P&gt;   then u can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   GUI_UPLOAD (for uploading from front-end)&lt;/P&gt;&lt;P&gt;   OPEN DATASET, TRANSFER , CLOSE DATASET (to write to app server)&lt;/P&gt;&lt;P&gt;&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 08:20:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405065#M195579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T08:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405066#M195580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Vijay&lt;/P&gt;&lt;P&gt;Go through the following Code&lt;/P&gt;&lt;P&gt;&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&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;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&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;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 08:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405066#M195580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T08:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405067#M195581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to Rob's program in this thread...&lt;/P&gt;&lt;P&gt;&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="754996"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Prakashsingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 08:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405067#M195581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T08:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405068#M195582</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;yes you can . you can upload the PDF file using &amp;lt;b&amp;gt;GUI_UPLOAD&amp;lt;/b&amp;gt; with filetype  = 'BIN' and then use open dataset , transfer, close dataset , store the fiel in application server.&lt;/P&gt;&lt;P&gt;it_pdf is the internal table to which you uploaded the pdf file using gui_upload fm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset file for output in binary mode .&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at it_pdf.&lt;/P&gt;&lt;P&gt;transfer it_pdf file.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;close dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2006 08:25:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405068#M195582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-14T08:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405069#M195583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a spool from adobe form, so spool is already in pdf format, i want to read it and store it to app server in pdf format only. Can you please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 15:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405069#M195583</guid>
      <dc:creator>manubhutani</dc:creator>
      <dc:date>2010-11-08T15:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405070#M195584</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 this code it might help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;as im using some custom classes , modify it according to ur needs.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*---  Selection-Screen
SELECTION-SCREEN  BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_SPOOL TYPE RSPOID obligatory.

PARAMETERS: p_folder TYPE localfile obligatory.
* Output filename
PARAMETERS: p_ofile TYPE localfile obligatory .
* No encryption checkbox
PARAMETERS: p_nencr AS CHECKBOX MODIF ID fnm.

SELECTION-SCREEN END OF BLOCK B1 .


  DATA: ls_spooljobatt LIKE tsp01.

  DATA : L_FLAG.
  FIELD-SYMBOLS: &amp;lt;x&amp;gt; TYPE x.



  DATA: lv_objtype LIKE rststype-type,
        lv_pdf     TYPE xstring,
        lv_pdfsize TYPE i,
        lt_pdf     TYPE tline_tab,
        ls_pdf     TYPE tline.

DATA:
  gcl_util TYPE REF TO zcl_hr_ifm_pyout.
data : g_filename TYPE localfile.

*---  Selection screen events
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_folder.

    p_folder = zcl_hr_ifm=&amp;gt;f4_serverfile( ).

*---  Start-of-selection
START-OF-SELECTION.
  CREATE OBJECT gcl_util.
* Set output filename
  g_filename = gcl_util-&amp;gt;merge_path_file( im_path = p_folder
                                          im_file = p_ofile ).

      SELECT SINGLE * INTO ls_spooljobatt FROM tsp01 WHERE rqident = p_spool.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
        EXPORTING
          authority     = 'SP01'
          client        = ls_spooljobatt-rqclient
          name          = ls_spooljobatt-rqo1name
          part          = 1
        IMPORTING
          objtype       = lv_objtype
        EXCEPTIONS
          fb_error      = 1
          fb_rsts_other = 2
          no_object     = 3
          no_permission = 4.

      IF lv_objtype(3) = 'OTF'.
* OTF
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = ls_spooljobatt-rqident
            no_dialog                = 'X'
            dst_device               = ls_spooljobatt-rqdest
          IMPORTING
            pdf_bytecount            = lv_pdfsize
*            btc_jobname              = e_jobname
*            btc_jobcount             = e_jobcount
          TABLES
            pdf                      = lt_pdf
          EXCEPTIONS
            err_no_otf_spooljob      = 1
            err_no_spooljob          = 1
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_dstdevice        = 5
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 9
            err_btcjob_close_failed  = 9
            user_cancelled           = 10
            OTHERS                   = 10.
      ELSEIF lv_objtype(4) = 'TEXT'.
* Abap
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = ls_spooljobatt-rqident
            no_dialog                = 'X'
            dst_device               = ls_spooljobatt-rqdest
          IMPORTING
            pdf_bytecount            = lv_pdfsize
*            btc_jobname              = e_jobname
*            btc_jobcount             = e_jobcount
          TABLES
            pdf                      = lt_pdf
          EXCEPTIONS
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 1
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 9
            err_btcjob_close_failed  = 9
            user_cancelled           = 10
            OTHERS                   = 10.
      Endif.

      IF NOT lt_pdf IS INITIAL.
* Convert to xstring
        LOOP AT lt_pdf INTO ls_pdf.
          ASSIGN ls_pdf TO &amp;lt;x&amp;gt; CASTING TYPE x.
          CONCATENATE lv_pdf &amp;lt;x&amp;gt; INTO lv_pdf IN BYTE MODE.
        ENDLOOP.

        FREE lt_pdf.
       endif.


* Download to application server
translate g_filename to lower case.
    OPEN DATASET g_filename FOR OUTPUT IN BINARY MODE.
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      WRITE : / 'Unable to open filepath', g_filename .
.
      L_FLAG = 'X'.
    ENDIF.

  IF L_FLAG = 'X'.
    WRITE : / 'Files Download Incomplete'.
    EXIT.
  ENDIF.

lv_pdf = lv_pdf+0(lv_pdfsize).
      TRANSFER lv_pdf TO g_filename.
.
    CLOSE DATASET g_filename.


*---  End of Selection
END-OF-SELECTION.

  WRITE : / 'Files Download Complete, file path', g_filename .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: mohammed  abdul hai on Nov 8, 2010 4:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 15:18:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405070#M195584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-08T15:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405071#M195585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am down loading sales order as pdf to application server.&lt;/P&gt;&lt;P&gt;during this process, some data is missing out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used open dataset filename for output in binary mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the pdf file generated, i am using CG3Y to read the file from appl server and found that some tax values are missing.&lt;/P&gt;&lt;P&gt;do you any idea on what went wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 14:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405071#M195585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-04T14:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: pdf file in application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405072#M195586</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;I am down loading sales order as pdf to application server.&lt;/P&gt;&lt;P&gt;during this process, some data is missing out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used open dataset filename for output in binary mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after the pdf file generated, i am using CG3Y to read the file from appl server and found that some tax values are missing.&lt;/P&gt;&lt;P&gt;do you any idea on what went wrong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 14:53:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-in-application-server/m-p/1405072#M195586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-04T14:53:10Z</dc:date>
    </item>
  </channel>
</rss>

