Skip to Content
0
Jul 26, 2011 at 07:46 AM

PDF file write to application server

738 Views

Hi All,

I want to write PDF file to application server while downloading its writing but in this manner

%PDF-1.6#%####

108 0 obj#<</First 17/Length 108/Filter/FlateDecode/N 3/Type/ObjStm>>stream

xڲT0P04Q07W05#2,#ll##K#J*#R#C####Sbq#[^##GjNYjIfr##SN##kr~Jf#~xf#c^q&##Ҧ##agG#a####X###T##XR### ##b#

Please let me know where i am doing wrong.

Please see below my code .

(the scenario is when i download the pdf file i want to write the same file in to app server )

  call function fm_name
    exporting
      /1bcdwb/docparams  = fp_docparams "
      ls_header          = ls_waste
      lt_item            = gt_rkpf
      aufnr              = lv_aufnr
    importing
      /1bcdwb/formoutput = fp_formoutput
    exceptions
      usage_error        = 1
      system_error       = 2
      internal_error     = 3
      others             = 4.
 
 concatenate 'D:\temp\PROCESSORDER_' ls_waste-rsnum   '.PDF' into lv_file.
    pr_file = lv_file.
 
  open dataset pr_file for output in binary mode."text mode encoding  NON-UNICODE.
  if sy-subrc  0.
    exit.
  endif.
  transfer fp_formoutput-pdf  to pr_file.
  close dataset pr_file.
  clear :fp_formoutput-pdf,lv_file.

Please any one help me thanks,

Thanks,

Kumar