No Data in PDF file in FTP server

Hi All,
I am trying to place a PDF file in FTP server.
Used
CONVERT_OTFSPOOLJOB_2_PDF to convert spool to PDF
SCMS_TEXT_TO_XSTRING
FTP_R3_TO_SERVER to transfer data to FTP.
I am able to see PDF file in FTP and no of pages matches with that of R/3 but there is no data in PDF file.

To get pdf file , you need to set the itcpo-tdgetotf = 'X' and need to pass in the exporting parameter (options in open_form  function module ).Then in close_form function module take all the data of otfdata table into an internal table . Then use SX_OBJECT_CONVERT_OTF_PDF function module to convert it to pdf.
I will show with an  example.
tables itcpo.
DATA: ch_otf  TYPE  STANDARD  TABLE OF  itcoo.
DATA: w_otf TYPE itcoo.
DATA: w_pdf TYPE solisti1. "For PDF
DATA: i_content_txt TYPE soli_tab.   
DATA: temp1 TYPE sx_format VALUE 'OTF',
        temp2 TYPE sx_format VALUE 'PDF'.
  DATA: c_printer TYPE sx_devtype VALUE 'PRINTER'.
  DATA: w_transfer_bin TYPE sx_boolean. "Content
  DATA: i_content_bin TYPE solix_tab, "Content
        wa_content_bin TYPE solix,
        i_objhead TYPE soli_tab.
itcpo-tdnoprint  = 'X'.
  itcpo-tdpreview = 'X'.
  itcpo-tdgetotf = 'X'.
These three parameters need to be passed along with other required parameters
  CALL FUNCTION 'OPEN_FORM'
       EXPORTING form = xformular
                 language = ekko-spras
                 OPTIONS = itcpo
                 archive_index  = toa_dara
                 archive_params = arc_params
                 device = xdevice
                 dialog = xdialog
                 mail_sender        = sender
                 mail_recipient     = recipient
       EXCEPTIONS canceled = 01.
  CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT  = RESULT
    tables
      otfdata = ch_otf.
LOOP AT ch_otf INTO w_otf.
    CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
    INTO w_pdf.
    APPEND w_pdf TO i_content_txt.
  ENDLOOP.
converting otf file to pdf file
  CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
      format_src      = temp1        "'OTF'
      format_dst      = temp2        "'PDF'
      devtype         = c_printer
    CHANGING
      transfer_bin    = w_transfer_bin
      content_txt     = i_content_txt
      content_bin     = i_content_bin
      objhead         = i_objhead
      len             = v_len_in
    EXCEPTIONS
      err_conv_failed = 1
      OTHERS          = 2.
Then open dataset and transfer to ftp of the content of table content_bin(i_content_bin) as shown in above example.
I think this will be helpful for you

Similar Messages

  • Error while downloading PDF file from FTP Server

    Hi Friends,
    I have sent a PDF file with data to FTP , Then i want to check that uploaded pdf file , whether that is correct or not?
    for that , i have downloaded that file from FTP and i am trying to open the file . but it is giving this problem .
    "There was an error opening the document . The file is damaged and could not be repaired."
    will you suggest me regarding this.
    thanks in advance.
    balaji.T.

    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
              EXPORTING
           SRC_SPOOLID                    = spoolno
                src_spoolid                    = wa_file-rqident
                no_dialog                      = ' '
          DST_DEVICE                     =
          PDF_DESTINATION                =
              IMPORTING
                pdf_bytecount                  = numbytes
                pdf_spoolid                    = pdfspoolid
          OTF_PAGECOUNT                  =
                btc_jobname                    = jobname
                btc_jobcount                   = jobcount
              TABLES
                pdf                            = pdf
              EXCEPTIONS
                err_no_otf_spooljob            = 1
                err_no_spooljob                = 2
                err_no_permission              = 3
                err_conv_not_possible          = 4
                err_bad_dstdevice              = 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.
    because of this one PDF internal table is obtained.
           OPEN DATASET L_FILENAME  FOR OUTPUT in text mode  MESSAGE MSG.
      LOOP AT pdf.
        CONCATENATE pdf-tdformat       "Material group
                     pdf-TDLINE       "Basic Material
               INTO ITEXT-TLINE ..
        APPEND ITEXT.
        TRANSFER ITEXT TO L_FILENAME.
      ENDLOOP.

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

  • Need to copy .txt file from FTP server and downloaded on local server directory.

    I need to figure out a way to copy .txt file from ftp server in local server directory using sql jobs.

    Below links will help achieving it:
    https://www.virtualobjectives.com.au/sqlserver/ftp_scripts.htm
    http://www.mssqltips.com/sqlservertip/2884/sql-server-integration-services-ssis-ftp-task-for-data-exchange/

  • How to read XL file from FTP server

    Hi all,
    I have a requirement like to read file from FTP server using path
    ftp:
    10.212......\DTR\DTR_ Accounted_Out
    and again save  other file in same location ,
    to doing this RFC connection is required?
    give a  procedure or program to do this requirement ..
    To create rfc for FTP which connection type can i use ?
    Give complete settings to create rfc destination

    Hi Rakhi,
    Use the below code to check if you have received the proper data.
    call function 'FTP_SERVER_TO_R3' "Get data as character instead of BLOB
        exporting
          handle         = hdl
          fname          = docid
          character_mode = 'X'
        tables
          text           = chardata.
    If the data is incorrect, it is possible that you are in the wrong directory.
    Use
    call function 'FTP_COMMAND'
        exporting
          handle        = hdl
          command       = 'cd mydir\mysubdir' "cd <space> your path
        tables
          data          = result
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3.
    Regards,
    Jovito.

  • Reading a file from ftp server

    Hi
    I am able to put file on ftp server using ftp adapter.But same settings are not working while polling file on ftp.
    Do i need to do some settings for get operation??

    Hi,
    Check the file permissions and for testing give all read/write/execute permissions to the file to be read from FTP. Also check the file modification date of the file.
    Check for the logs at 2 places for any error messages:
    - SOA server diagnostics logs
    - FTP server logs
    You can also enable the FINEST level of Adapter logs for adapters and see for the detailed errors in the diagnostic logs.
    FMW Console > right click soa-infra > Logs > Log Configuration > expand oracle.soa > set Trace32 : FINEST for oracle.soa.adapter
    Regards,
    Neeraj Sehgal

  • Regaring file from FTP server to application server

    Hi frnds,
    Below is my code where i am transferring Presentation server file to FTP server.
    Now i want to transfer that file from FTP server to application server.
    any help. below i am providing my code.
    <code>
    *& Report  demo
    report  z_demo_ftp.
    Variables declaration
    data : mi_handle type i,
           pwd       type char30,
           slen      type i,
           key type i value 26101957,
           it_file2 type filetable,
           w_file2 like   line of it_file2,
           l_rc type i,
           v_index type i,
           v_file(30) type c,
           v_path(100) type c,
           v_path_tmp(100) type c.
    *Internal table declaration
    data: begin of mtab_data occurs 0,
           line(132) type c,
          end of mtab_data.
    Selection scree parameters
    parameters: p_file type string default 'C:\'.
    Get the file path
    at selection-screen on value-request for p_file.
      data: p_file1 type string.
      p_file1 = p_file.
      call method cl_gui_frontend_services=>file_open_dialog
        exporting
          default_filename        = p_file1
        changing
          file_table              = it_file2
          rc                      = l_rc
        exceptions
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        read table it_file2 into w_file2 index 1.
        p_file = w_file2-filename.
        clear w_file2.
        refresh it_file2.
        split p_file at '\' into table it_file2.
        describe table it_file2 lines v_index.
        read table it_file2 into w_file2 index v_index.
        concatenate 'put' w_file2-filename into v_file separated by space.
        delete it_file2 index v_index.
        clear w_file2.
        loop at it_file2 into w_file2.
        if sy-tabix = 1.
        v_path = w_file2-filename.
        endif.
        if sy-tabix ge 2.
        concatenate v_path '\' w_file2 into v_path.
        endif.
        endloop.
        concatenate 'lcd' v_path into v_path_tmp separated by space.
      endif.
    Start of selection
    start-of-selection.
    pwd = 'file456'.
    slen = strlen( pwd ).
    call function 'HTTP_SCRAMBLE'
      exporting
        source      = pwd
        sourcelen   = slen
        key         = key
      importing
        destination = pwd.
    Connect to FTP
    call function 'FTP_CONNECT'
      exporting
        user            = 'client'
        password        =  pwd
        host            = 'saturn'
        rfc_destination = 'SAPFTP'
      importing
        handle          = mi_handle
      exceptions
        not_connected   = 1
        others          = 2.
    if sy-subrc = 0.
    Excute FTP command
    call function 'FTP_COMMAND'
        exporting
          handle        = mi_handle
          command       = 'cd staff
        tables
          data          = mtab_data
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          others        = 4.
    Excute FTP command
          call function 'FTP_COMMAND'
        exporting
          handle        = mi_handle
          command       = v_path_tmp
        tables
          data          = mtab_data
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          others        = 4.
    Excute FTP command
      call function 'FTP_COMMAND'
        exporting
          handle        = mi_handle
          command       = v_file
        tables
          data          = mtab_data
        exceptions
          tcpip_error   = 1
          command_error = 2
          data_error    = 3
          others        = 4.
      if sy-subrc = 0.
        loop at mtab_data.
          write: / mtab_data.
        endloop.
      endif.
    endif.
    *FTP disconnect
    call function 'FTP_DISCONNECT'
      exporting
        handle = mi_handle
      exceptions
        others = 1.call function 'FTP_DISCONNECT'
      exporting
        handle = mi_handle
      exceptions
        others = 1.
          end-of-selection.
    </code>
    so what more code shuld i write.
    regards,
    kamal

    Hi Che Eky  ,
                          Actually the above code is for putting the presentation server file to FTP Server.
    But now i need to Put the same file present in the FTP server to Application server.
    So any help or code which will be helpful.
    regards,
    kamal

  • Copy file from FTP server to sap application server

    Hi,
    I am able to copy a particular file from FTP server to sap application server using FTP_CONNECT, FTP_COMMAND and FTP_DISCONNECT. But here my problem is, it copies into default application server path(DIR_HIOME). I want to copy into specified folder in the application server. How can I specify the required destination path.
    Can you please suggest how to achieve this.
    Thanks,
    Shiva Kankanala

    try something like this:
    data: user(30) type c value 'ftpuser', "ftp username
                  pwd(30) type c value 'ftppass', "ftp password
                  host(64) type c value '255.255.255.255', "ftp server IP
                  cmd1(80) type c value 'lcd /dump', "location on app server where you want to copy the file
                  cmd2(80) type c value 'get', "specifies you are going to get the file from ftp server
                  dest like rfcdes-rfcdest value 'SAPFTPA',
                  file(15) type c value 'file.txt'. "specifies file that you want to get from ftp server
    data: hdl type i,
            key type i value 26101957,
            slen type i.
    slen = strlen( pwd ).
    call function 'HTTP_SCRAMBLE'
        EXPORTING
          source      = pwd
          sourcelen   = slen
          key         = key
        IMPORTING
          destination = pwd.
    call function 'FTP_CONNECT'
        EXPORTING
          user            = user
          password        = pwd
          host            = host
          rfc_destination = dest
        IMPORTING
          handle          = hdl.
    call function 'FTP_COMMAND'
        EXPORTING
          handle        = hdl
          command       = cmd1
        TABLES
          data          = result
        EXCEPTIONS
          command_error = 1
          tcpip_error   = 2.
      loop at result.
        write at / result-line.
      endloop.
    CONCATENATE cmd2 file INTO cmd2 SEPARATED BY SPACE.
    call function 'FTP_COMMAND'
          EXPORTING
            handle        = hdl
            command       = cmd2
          TABLES
            data          = result
          EXCEPTIONS
            command_error = 1
            tcpip_error   = 2.
        loop at result.
          write at / result-line.
        endloop.
        refresh result.

  • Downloading file from ftp server

    hii
    how do i download the file from ftp server. plz suggest wat are the function modules for tht.. and plz do give the values of the parameters used in the fn modules
    points guranteed:-)

    <i><b>*--> Scramble the password.</b></i>
      CALL FUNCTION 'SCRAMBLE_STRING'
           EXPORTING
                source = password
                key    = 26101957
           IMPORTING
                target = password.
    <i><b>*--> Connect to the FTP server.</b></i>
    <i>*  user is the logon user for the FTP server.
    password is the password you have just scrambled.
    host is the ip address of the FTP server.
    rfc_destination is 'SAPFTPA'.</i>
      CALL FUNCTION 'FTP_CONNECT'
           EXPORTING
                user                = user
                password        = password
                host                = host
                rfc_destination = rfc_destination
           IMPORTING
                handle          = wa_handle
           EXCEPTIONS
                not_connected   = 1
                OTHERS          = 2.
    <i><b>*--> Carry out the command on the FTP server</b></i>
    <i>*  wa_command is the command you wish to carry out on the FTP server (e.g.   
    wa_command = 'ascii' will specify ascii mode).  Result_itab will contain the
    result of your commands.</i>
      CALL FUNCTION 'FTP_COMMAND'
           EXPORTING
                handle           = wa_handle
                command       = wa_command
           TABLES
                data          = result_itab
           EXCEPTIONS
                tcpip_error   = 1
                command_error = 2
                data_error    = 3
                OTHERS        = 4.
    <b>*--> Disconnect from the target host.</b>
      CHECK NOT wa_handle IS INITIAL.
      CALL FUNCTION 'FTP_DISCONNECT'
           EXPORTING
                handle = wa_handle
           EXCEPTIONS
                OTHERS = 1.
    <u><i><b>Hope this helps :)</b></i></u>

  • Convertion pdf file from App. server to Pre.server

    Hi,
      I have file pdf file in application server. i want to convert this PDF file into presention server.
    plese send simple progrme.
    Thank&
    Regards,
    Madhu

    Also try
    FYI
    REPORT ztrans01 .
    *Parameters(files)
    PARAMETERS: ux_dir TYPE epsf-epsdirnam OBLIGATORY
                DEFAULT '/usr/sap/trans',
                filename TYPE epsf-epsfilnam OBLIGATORY DEFAULT 'test1',
                pc_dir TYPE rlgrap-filename OBLIGATORY
                DEFAULT 'c:\tmp'.
    *DATA(Strings)
    DATA itab TYPE TABLE OF string.
    DATA wa TYPE string.
    DATA file TYPE string.
    DATA size TYPE epsf-epsfilsiz.
    DATA ux_file TYPE epsf-epspath.
    DATA mode TYPE epsf-epstxtmod.
    *start-of-selection
    START-OF-SELECTION.
    *1) transfer
      CONCATENATE ux_dir '/' filename INTO ux_file.
      OPEN DATASET ux_file FOR INPUT IN TEXT MODE.
      IF sy-subrc <> 0.
        MESSAGE i502(me) WITH ux_file.
      ENDIF.
      DO.
        READ DATASET ux_file INTO wa.
        IF sy-subrc <> 0. EXIT . ENDIF.
        APPEND wa TO itab.
      ENDDO.
      CLOSE DATASET ux_file.
    *2)download
      CONCATENATE  pc_dir  '\' filename  INTO file.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                filename = file
           TABLES
                data_tab = itab.
    OR
    *&      Form  f1104_download_to_lofile
          Download to data from internal table to Logical File/application server
    FORM f1104_download_to_lofile.
    Open the file in application server
      OPEN DATASET v_filepht FOR OUTPUT IN TEXT MODE.
      IF sy-subrc <> 0.
        MESSAGE s185 WITH v_filepht.          
        LEAVE LIST-PROCESSING.
      ENDIF.
      LOOP AT i_logfile INTO w_logfile.
        TRANSFER w_logfile TO v_filepht.
        CLEAR w_logfile.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE:/ text-055, v_filepht, text-056.
      ELSE.
        WRITE:/ text-057, v_filepht.     
      ENDIF.
    Closing the file
      CLOSE DATASET v_filepht.
    and also check link
    http://sap.ittoolbox.com/code/archives.asp?d=2285&a=s
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Files from FTP server to Application server

    Hi All,
    I am new to SDN and SAP XI, can anyone tell me whether its possible to move the files (different strcuture files i.e. some are master data files and some are transaction data file) from FTP server to Application server with one interface. Actually the process is already established at clientsite for placing master data files like product, plant etc from FTP server to App server through FTP adapter. Now my requirement is to move transaction data file with completely different structure as master data to App server. If we place these trasaction data file in same folder/directory as master data files does SAP XI pick this file also. If not what are the steps I need to follow to achieve this. I know that if we create new configuration it will work but I question is does master data interface picks this transaction data file also.
    Right now our process for master data files is SAP XI picks the files and deletes the file from FTP server folder. The master data file names are plant_attr.csv, product_attr.csv etc and transcation data file name is salestrasactiondata.csv. I need to move these files to application server on daily bases.
    I appreciate your help .
    Regards
    Bob.

    > I am new to SDN and SAP XI, can anyone tell me whether its possible to move the files (different strcuture files i.e. some are master data files and some are transaction data file) from FTP server to Application server with one interface.
    Hello Bob,
    Yes it is possible.
    There can be two ways of doing it.
    1. N:1 mapping, BPM will require for this.
    N:1 Mapping refer this blog
    IDOCs (Multiple Types) Collection in BPM
    BpmPatterns CollectMerge
    part1  BPM with Patterns explained Part-1
    part2  BPM with Patterns explained Part-2
    Second option
    Create 3 scanarios in integration directory and correspondingly in integration repositoy create different data types, message types, mappings & interface mappings and then in each of scenario us different message interface and interface mapping.
    > I know that if we create new configuration it will work but I question is does master data interface picks this transaction data file also.
    >
    If you are using N:1 scenario then use *.csv in your sender adapter under file name parameter and then all the files will be picked up from same directory.
    If you are using second option (3 different scenarios) then also you can pick the different files from same directory. You will be having 3 sender adapters in this case, So, one for picking master data, and another for product data and the last one for transaction data.
    So, in case of master data use "plant_*.csv" as a file name and directory name.
    In case of product data, use "product_*.csv " as a file name and source directory will remain same.
    similarly do it for transaction data.
    So by this way all 3 sender adapters will perform their job to pick the different files from same source directory.
    Regards,
    Sarvesh

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • Java code to create a new .txt file in FTP server  --- Help

    Hi,
    I wrote a standalone java app which creates a .txt file in my local machine and transfers it to FTP server. But my requirement now is to create a new .txt file with the same content in FTP server itself instead of creating locally with basic java code.
    I'm aware of transfering file from local machine to the FTP server using STOR command of FTP. But i never tried creating a new file & writing content into that in FTP server.
    So, if any one did this before please help me out with source code or any idea ???
    Thank you.
    Vj.

    simply_vijay wrote:
    thanks for your reply. yes i've seen the Apache Commons NET API , but there is no method or class to create a new file in FTP server. I'm really worried how to solve this problem ???Sure there is.
    There's a method where you can write data to a file on the server using an OutputStream, right? Well, instead of writing to a FileOutputStream, write to that OutputStream instead. Remember to close the OutputStream and call the method which says you're finished with the command (I forget what it's called).

  • Receiver-File-Adatper creates empty files on FTP-Server

    Hi experts,
    I have a problem with my IDOC-to-File-scenario. My Mapping converts IDOCs to XML-files. Then the xml-files should be send to a ftp-server in New York. but only the filename is created on the ftp-server in New York. but without any content.
    At first I tested the scenario with a ftp-server in our company. and it works. the files and the right content were created. so the scenario and the mapping are working correctly.
    Have you any idea what the problem is?
    Thanks and best regrads
    Christopher

    Dont use anonymous login. Please provide user name and password.
    Also go to adapter engine queue. There see the details description of your message. There it will specify which file got created, on which FTP server, in which folder and also how many bytes XI has transferred. If possible let me know these details.
    Also try uploading any other file to FTP.
    For this got to Command prompt.
    1. open (o) IP ADDRESS
    2. User name
    3. Password
    4. go to specified folder
    5. Use PUT command to save the file on FTP server.
    If after all these empty files is getting created then contact your system administrator and tell him to check firewall settings. Because there are few parameters which allows data transfer.
    Because if firewall problem is there then u wont be able to put a file manually on that FTP server.
    Let me know the output.
    Warm Regards,
    Gouri

  • How to Generate PDF file on the server

    Hello Everybody !
    I Need to generate a PDF File on the server, and I'm usin the command :
    "OPEN DATASET p_path FOR OUTPUT IN BINARY MODE message l_verro .
           LOOP AT t_lines.
             TRANSFER t_lines-tdline TO p_path.
           ENDLOOP.
           CLOSE DATASET p_path.  "
    The File was generated, but is corrupt . Don't Open the file, It's wrong.
    When I use the function GUI_DOWNLOAD the file is generated  right. But in the server not.
    Can someone help me please ??
    Best Regards,
    Wagner Duarte

    Hi.
    did you check this post?
    Download PDF File to SAP Application Server
    It doest the same as you are asking.
          " Write PDF Binary Data to App Server
        OPEN DATASET lv_filename FOR OUTPUT IN BINARY MODE.
        IF sy-subrc = 0.
          LOOP AT lines INTO ls_data.
            TRANSFER ls_data TO lv_filename.
          ENDLOOP.
        ENDIF.
        CLOSE DATASET lv_filename.
    Regards
    Miguel

Maybe you are looking for

  • Setting input fields to an empty string BIG PROBLEM

    Hi Rob, thanks for your rerply, It makes sense alright, but I am using 2 seperate input fields. I have discovered what is causing the problem . After the user types into the inputfield and moves on to a different frame, I have set the input field to

  • PeriodsToDate with Parameter in SSRS

    I have the following MDX query in SSRS:   SELECT   NON EMPTY   { [Measures].[Gross Premium] } ON COLUMNS,   NON EMPTY  PeriodsToDate([Date].[Date Hierarchy].[Year],[Date].[Date Hierarchy].[Quarter].[Qtr 3 - 2013]),  [Broker].[Master Broker Name - Big

  • Can i set an allowance for myself in the itunes store?

    i want to set monthly or weekly spending limits. for obvious reasons. can i set an allowance?

  • How to attach new fileds to a message componemt layout in a seeded page

    Dear Friends, I have a requirement like , I have to add three message styled texts in message componemt layout (Which have no VO attached ) in a seeded page . This message componemt layout region is using hash map to print (set) values to the existin

  • URL_TO_CLIENT must be declared

    Hello, I am working on a customer form that uses the webutil library. I am trying to implement a URL_TO_CLIENT call with: WEBUTIL_FILE_TRANSFER.URL_To_Client(:crash_images.filename, '\\voyager\oh1_images\' ||:CRASH_IMAGES.folder || '\' || :crash_imag