Download  File in  Background mode

Hi SAP Gurus,
I want to download file in Background using fn mod GUI_DOWNLOAD , it raises an  execption 'CONTROL_FLUSH_ERROR'.
Is there any other way to do so.?
Thanks in advance.
Gaurav

Hello Gaurav,
GUI/WS_DOWNLOAD require an active GUI and are therefore not useable in batch mode. OPEN DATASET is the statement of choice.
There is a related thread which might be of interest to you.
WS_DOWNLOAD in background?
Kind Regards
Klaus

Similar Messages

  • Downloading file in Background mode?

    Hi gurus,
    When I run the program in Fore ground and Back ground (Immediately when press F9, without schedule) I am getting same result, I can able to download file in a local file. Please I like to know whether it is correct or not?
    If it is not correct, How to download the file into presentation server (Local file) when program run in back ground mode (Immediately when press F9, without schedule)?
    Please give your valuable suggestions. Please send the code if you have.
    Thanks and Regards,
    Pavan.

    Hi,
    you can not download file in a presentation server using your Background job. That is a limitation from SAP. Instead you can download file to presentation server. Or you can add mailing the file to user id functionality.
    Hope this helps.
    ashish

  • Download an excel file in background mode

    Hi All,
    I need to download a file from a ABAP  report to the local workstation in background mode. I tried GUI_DOWNLOAD but it is failing in the background.
    Is there any way to download the excel file in the background. I am thinking of generating the spool.
    Please let me know if anybody has worked on the same requirement. Any help would be highly appreciated.
    Thanks a lot.
    Regards,
    Priti

    You be able to use the function "WS_DONLOAD" ?
    parameters: p_fnam like  rlgrap-filename memory id fnam obligatory.
    data: begin of t_registro occurs 0,
            registro(1000),
          end of t_registro.
          describe table t_registro lines sy-tfill.
          if sy-tfill gt 0.
            l_tam = strlen( p_fnam ).
            call function 'WS_DOWNLOAD'
                 exporting
                      filename                = p_fnam
                 tables
                      data_tab                = t_registro
                 exceptions
                      file_open_error
                      file_write_error
                      invalid_filesize
                      invalid_type
                      no_batch
                      unknown_error
                      invalid_table_width
                      gui_refuse_filetransfer
                      customer_error.
            if sy-subrc <> 0.
              open dataset p_fnam for output in text mode.
              if sy-subrc = 0.
                loop at t_registro.
                  transfer t_registro to p_fnam.
                endloop.
                close dataset p_fnam.
                write:/ 'Se genero el archivo:', p_fnam(l_tam).
              else.
                write:/ 'No se pudo generar el archivo:', p_fnam(l_tam).
              endif.
              close dataset p_fnam.
            else.
              write:/ 'Se genero el archivo:', p_fnam(l_tam).
            endif.
       endif.
    I hope this works for you.
    See ya.
    Ar@

  • Local file in background mode

    Hi experts,
    Is it possible to upload data from local drive(presentation server) to sap in background mode.
    As I know ,in the background mode we can upload files from application server only.
    but here my functional consultant saying they did  upload data from local drive to sap in background mode.
    please suggest.
    thanks in advance.
    sastry.

    hey,
    Yes it can be made possible,
    The only way to access files in a background job is to have them on the application server and opened via OPEN DATASET or similar.
    *--Local Variables
    DATA : l_file TYPE string,
    l_line TYPE string,
    l_index TYPE sy-tabix.
    *--Clear
    CLEAR : l_file.
    l_file = p_ipfile.
    *--Read the data from application server file.
    OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    *--Error in opening file
    MESSAGE i368(00) WITH text-005.
    ENDIF.
    *--Get all the records from the specified location.
    DO.
    READ DATASET l_file INTO l_line.
    IF sy-subrc NE 0.
    EXIT.
    ELSE.
    SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
    INTO st_ipfile-vbeln
    st_ipfile-posnr
    st_ipfile-edatu
    st_ipfile-wmeng.
    APPEND st_ipfile TO it_ipfile.
    ENDIF.
    ENDDO.
    Regards,
    Midhun Abraham
    Edited by: Midhun Abraham on Oct 8, 2008 4:36 AM

  • Create an Excel format file in background w/DATASET Cmds?

    I have heard that you can create a file into an excel format file in background mode using dataset commands - anyone know how to do this?  Thanks!

    Hi Stephen,
    Use Open dataset, Transfer, Close dataset to create file on Application server.
    Use FM Z_CONV_ITAB_TO_TAB_DELIMITED to convert your lines in TAB delimited format. you can download file from your application server to presentation server using T Code CG3Y and give extension as .xls ...
    As you data is Tab delimited it will automatically get formatted in columns in your EXCEL file.
    Regards,
    Mohaiyuddin

  • RFC communication to presentation sever in background mode

    I need to download data in background mode to a presentation server.  I found documentation from 2005 regarding this process and have successfully set up an RFC to send the data.  In my ABAP program, I use RFC_REMOTE_FILE to send an internal table of data to the presentation server via the RFC connection.  The connection works fine except that only the first 80 characters of each line of the internal table are sent.  I found unanswered forum questions regarding the need to send more than 255 characters (which I could live with) so I am hoping that I can send more than an 80 character table.  We are on ECC 6.0 - EHP4 with GUI 720.
    Any help would be appreciated.
    Lisa

    Hi Lisa,
    Lisa Carr wrote:
    I found documentation from 2005 regarding this process and have successfully set up an RFC to send the data.
    > Lisa
    Could you provide a link of the above documentation on settiing up RFC to send data to file?
    Did you try using FM- DOWNLOAD?
    Regards,
    Ajay

  • Accessing presentation server file in background

    Hi gurus,
    my requirement is to access presentation server file in background mode.
    I got the below documentation regarding this ,but i'm not able to complete the setup as mentioned in this document.
    please help .
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/communication%20to%20presentation%20server%20in%20background%20mode.doc]
    As per documentation i need rfc.car and car.exe file in my system. I cant see any rfcsdk folder in my system. Please help.
    any other solutions ,please suggest.
    sastry.
    Edited by: prssastry on Oct 15, 2008 7:13 AM

    Hi,
    In general practice we don't access a file from presentation server in background because at that point of time i might not logon to SAP server, so it is always preferable to access the file from Application layer incase of background processing.
    Unless it is a client requirement, don't access files from the presentation layer in background./
    thanks,
    Mahesh.

  • Exporting Local File in background

    Hi,
      I want to export a flat file in background mode. I am currently using WS_DOWNLOAD but this doesn't work in background. What I think is that I will save it in UNIX directory. Can you please give some sample codes for this? or if there's still a way using WS_DOWNLOAD to do this in background?
    I appreciate your response.
    Thanks!

    Use the transaction CG3Z to upload your file into application server.
    Then you can use
    open dataset.
    transfer dataset.
    close dataset.
    commands to access that file from application server.

  • File download in Background mode

    Hi All,
    A file need to be downloaded to the folder
    dc20\nt71data\jsox\" while execution in background mode.
    It is also mentioned that the file need not be sent to the application server.
    I am sure in background mode file couldn't be downloaded to the presentation server.
    Can you please predict where would be this folder and how to proceed?
    Thanks & Regards,
    Lakshmanan

    hi,
    Please check in AL11 transaction.Where you will find the list of folders in Application server.
    Regards,
    Shan

  • Background Job - Requirement to download file to application server

    Dear All,
    If I want to execute one function module in background and the FM is downloading file to application server, the FM is not downloading file to application server. Can you please suggest whether it is possible to download file to application server when it is in background mode? I know it is not possible to download file to presentation server.
    Thanks and regards,
    Atanu

    Hi,
    Yes, it is possible to download a file to application server in background mode. check the path ur sepcifying to the Function module to download the file...in T-Code AL11 check if the path exits.
    reward if helpful
    Regards,
    Rahul

  • Why the background job for downloading file failed?

    I have a background job for downloading file with logical path.
    with
    'OPEN DATASET l_out_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT';
    Now, the program can be run in foreground;but when it running on background, it shows 'open file error'.
    I do not know what happen?
    Please help ~~

    Hi,
    The logical path you have provided might be incorrect or you might not have the necessary authorization to read/write on that folder.
    Please check the folder in transaction AL11 & check whether you have the authorization to read/write. BASIS consultant would be able to tell you about it.
    Best regards,
    Prashant

  • Download DMS attachment into an application server in background mode?

    Is it possible to download DMS attachment into an application server in background mode?
    Currently I am using the following code but does not work in background mode
      CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
        EXPORTING
          pf_dokar     = 'Z06'
          pf_doknr     = gs_drad-doknr
          pf_dokvr     = gs_drad-dokvr
          pf_doktl      = gs_drad-doktl
          pf_read_kpro = 'X'
        TABLES
          pt_files      = lt_file
        EXCEPTIONS
          not_found    = 1
          no_auth       = 2
          error            = 3
          OTHERS       = 4.
    *Copy Attachment from DMS to PC File
      CALL FUNCTION 'CVAPI_DOC_VIEW'
        EXPORTING
          pf_dokar      = 'Z06'
          pf_doknr      = gs_drad-doknr
          pf_dokvr       = gs_drad-dokvr
          pf_doktl          = gs_drad-doktl
          pf_appl_start = ' '
          pf_apptp      = '1'
          pf_filename   = 'C:\TEMP\ZLINK.BMP'
          ps_file       = ls_file
        IMPORTING
          pfx_file      = l_pfx_file
        EXCEPTIONS
          OTHERS        = 0.
    *Load BMP into SE78
      PERFORM import_bitmap_bds
        IN PROGRAM saplstxbitmaps
        USING l_filename             "Local File for Upload/Download
                   l_bmpnam             "Name
                  'GRAPHICS'           "Application Object
                  'BMAP'                   "ID
                  'BCOL'                   "Color
                  'BMP'                     "Extension
                  'ZLINK PICTURE'   "Title
                  space          "Resides in Printer Memory in Print Request
                 'X'                 "Reserve Height of Graphic Automatically
                 space           "Graphic Storage: Compressed Bitmaps
        CHANGING l_docid
               l_wf_res.   "Graphic Resolution
    Thanks

    Hi!
    You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
    You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
    Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
    Regards
    Tamá

  • Download business document (T-code: OAOR) in background mode

    I have attached a file to a production order and it is saved as a business document. From t-code OAOR (business document navigator), I can view the attachment (or directly from the production order).
    I would like to download the attachment in background mode. Up to now, I only find a method export_attachment in the ABAP object cl_gos_document_service which can download the attachment in frontend.
    Is there any ABAP object / FM which can cater this? Or please kindly suggest what can I do in order to achieve this. Your help is greatly appreciatedly. Thanks!
    Below is the material that I can find in this forum
    Re: Sales Order Attachment

    check out this weblog.
    /people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii
    this for loading gos documents in background (not downloading) but should give you a pointer on how to go about it.
    Regards
    Raja

  • Uploading Excel File in SAP In Background Mode

    Dear All,
    We require to upload Excel File in SAP in Background Mode.
    Could anyone suggest me the Function Module for this?
    Or any other method..........please.
    Thanks in advance for ur kind help.
    Best Regards,
    Prasad

    hi check this..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2
    Download in Background
    http://sapabap.iespana.es/sap/info/rfcexec/rfcexec_e.htm
    Reward if find useful

  • Issue in Background mode -Excel downloading using typepool OLE2

    Hi ,
    I am working a report using OLE type pool.
    Based on conditions the colors should display in excel sheet. As its displaying the colors correctly.
    Issue:
    1) How we will execute the OLE download in back ground
    as i am using the below code as visible '0', if Visible '1'. the file is executing in fore ground and viewing the records.
    SET PROPERTY OF H_EXCEL 'Visible' = 0 "in background
    Issue: But again there is a wait until the excel is downloaded completely. How can we avoid it is ,If we run in backgroundu2026.it doesn't create the file. What could be done such that user opts for excel output and should not wait on screen.
    Please let me know any option OLE to get the file in background with out waiting in selection screen.

    Hi samruth,
    The function of ABAP/4 OLE Automation Controller is to connect to  Desktop applications supporting OLE2 that can be thus be called from R/3.
    In background, there is no Desktop.
    Thats it.
    There is this really interesting [abap2xlsx|http://wiki.sdn.sap.com/wiki/display/ABAP/abap2xlsx] project. If you are prepared to forget OLE then this is the way to go.
    Regards,
    Clemens

Maybe you are looking for

  • HP LaserJet P1102 firmware update freezes

    HP LaserJet P1102w setup will not allow me to get the firmware update because it says I must complete all print jobs first. Only print job is the Test Page, which never printed at the end of the registration/install process.

  • My ipad went dead due to power outage.now it is asking for a passcode.it will not except any passwords that i use.it will not sync to my computer/itunes.help

    my ipad went dead due to a power outage.now when i turn it on it asks for a passcode.i have never used a passcode. it will not sync with computer/itunes help

  • Indesign cc crashes

    Process:     Adobe InDesign CC [929] Path:        /Applications/Adobe InDesign CC/Adobe InDesign CC.app/Contents/MacOS/Adobe InDesign CC Identifier:  com.adobe.InDesign Version:     9.2.0.69 (9200) Code Type:   X86-64 (Native) Parent Process:  launch

  • User exit for proforma invoice preparation vf01

    Hi experts, I using Enhancement SDVFX008 for VF01 its working fine, but its not fire while STO(JEX) invoice preparation. In Proforma invoice i need to check road permit. User should not save without roadpermit in particular states only. Kindly give U

  • Query in portal

    Hi I have  a query with free characteristics which enabled my reprot with the drill down. i want to publish in the portal , i know how to publish it. Now my question is 1) if create a webtemplate and publish will it have the that Drill Down functiona