GUI_DOWNLOAD in background

Hi,
Can any one guide me how to download a file from report to presentation server in background.
Iam using FM GUI_DOWNLOAD but it was throwing exception in background..
And i dont want to place the file in application server and then download to presentation server..

Hi Gautham,
I have already searched in forum, they have given suggestion that file to be downloaded to application server then to presentation server using OPEN DATASET..
but i dont want this..i want to use only function module to download this file to presentaion server..for this i have posted the thread here..

Similar Messages

  • Is it possible to tun the GUI_DOWNLOAD in background

    Hi guys,
    Is it possible to tun the GUI_DOWNLOAD in background?
    Thanks a lot!

    Hi
    It is not possible to run in background , Transfer file to  application server using OPENDATASET
    Download the file from application serevr to your folder by using Tcode CG3Y.
    For more information check with the following link
    [GUI_DOWNLOAD|Re: GUI Download In BackGround]
    Regards,
    Rajani

  • Control_flush_error with GUI_DOWNLOAD in Background mode

    Hi Friends
    When I have executed the FM: GUI_DOWNLOAD in Background mode,
    I am getting the error: Control_flush_error .
    Can anyone please let me know Is we can use the FM: GUI_DOWNLOAD & GUI_UPLOAD in Background mode?
    If not can anyone please provide me the relevant SAP(OSS) Note.
    Points are assured for useful answers.
    Thanks
    Regards,
    Sree

    Hi,
      No you can't do that, the GUI_DOWNLOAD method of the class CL_GUI_FRONTEND_SERVICES, and the function module GUI_DOWNLOAD are dependent on the gui. You can not use these in the background. You must download to the application server, using the dataset statements.
    OPEN DATASET
    TRANSFER
    CLOSE DATASET
    Regards
    Kiran Sure

  • To run GUI_DOWNLOAD in Background

    hi,
    i lokesh, i am trying to run GUI_DOWNLOAD in background, i am not able to get file in legacy. bcs the reason is in Background that is not unable to find File Type what we are given in file path, so is there any solution for this. if any body knows pls let me know.

    While executing programs in background, file handling will be done with application server.
    Hence use, OPEN DATASET for handling the same.
    Eg:
      data: l_file like rlgrap-filename value '/sap/usr/test.dat'.
      open dataset l_file for output in text mode encoding default.
      if sy-subrc ne 0.
         " Error Mesg Unable to open file
      else.
         loop at itab.
           transfer itab to l_file.
         endloop.
         close dataset l_file.
      endif.
      Hope this helps you.
    Kind Regards
    Eswar

  • Error in GUI_DOWNLOAD in background processing

    Hi All,
             We have a program that is using GUI_DOWNLOAD to download the results in text and .dbf format. In foreground it is working fine.But  in background the job is getting cancelled with a log that "Error in Downloading file."
    Please let me know if there is any solution for this.

    Hi,
    GUI_DOWNLOAD  does not work properly in the background.
    You can change the GUI_DOWNLOAD by
    'open dataset .. for output... ' and 'close dataset..' and use 'transfer..' to fill up the file.
    regards,
    Rolf

  • GUI_DOWNLOAD and background processing

    Hello,
    I have created a process which creates a file. this process uses GUI_DOWNLOAD to put the file on the users C drive or other directory on our network. The user wants to run this process in background and the program is returning a 6  (error unknown) from the GUI_DOWNLOAD FM. I was looking on SDN and found out the GUI_DOWNLOAD only works in foreground. You have to use OPEN and CLOSE DATASET statements to process in background. I am thinking about putting a button to denote foreground/background processing and using the appropriate statements to process the file. I will then have to get the file from the app server to a place will the user can get access to it.
    <b>first question</b> - is there a FM to do a FTP from the app server to a directory on our network for the user to access?
    <b>second question</b> - is this the right approach or is there something else that I should be doing.
    thanks in advance for your help

    Hi,
    Yes, your right, GUI_DOWNLOAD wil not work in background mode, you need to place the file in Application server, here.
    See the below link for a FTP program, use the proper commands(i do not know whether downloading the file is possible through the commands)
    http://www.sap-img.com/ab003.htm
    or else, write a small program which downloads the data from the application server, but it should run in the foreground
    Regards
    Sudheer

  • Data is not exported by the FD : GUI_DOWNLOAD in background.

    Hi all,
    Data is not Exported by the program scheduled in background by the FD "GUI_DOWNLOAD"
    its only exporting into the excel sheet and notepad in foreground.
    Plase me out how should I follow the process.
    Thanks & Regards,
    Rajeev

    You can write data to Application server in background. For path of file on Application server see TCode AL11
    e.g.
    file = '/tmp'.  "Path
    concatenate file '/itab.txt' into file.
    open dataset file for output in text mode.
    if SY-SUBRC = 0.
      write : /  'File opened on application server' .
    else.
      write : /  'Unable to open file on application server'.
    endif.
      loop at itab.
        transfer itab to file.
      endloop.
      if SY-SUBRC = 0.
        write : /  'Data transfer to file on application server complete.' .
      else.
        write : /  'Unable to transfer data to file on application server.'.
      endif.
      close dataset file.
      if SY-SUBRC = 0.
        write : /  'File closed on application server' .
      else.
        write : /  'Unable to close file on application server'.
      endif.

  • Why can't we use GUI_Download in background mode...........

    Hi experts as per the requirement my program should run at specific time in background mode, it need to upload the Personal numbers from the input file and for those personal numbers extract the data from multiple tables. but this report shd run in background.
    and download the output in the form of flat file.
    as i'm running in background mode can't use the F.M GUI_Download and GUI_Upload.
    can any one guide me how to solve this issue and why can't we use these F.M. if we can't use then what is the alternative to run in background mode.

    A program that runs in background mode doesn't have any connection to a frontend. After all, you can schedule it to run at a time where your frontend computer is not running.
    In this case you have to load your files on the application server (or a mount point) and use the FMs C13Z_FILE_DOWN(UP)LOAD_ASCII(BINARY)
    Regards
    Frank

  • Problem with GUI_download in background

    Hi all,
            When i ran the program in the background,the job has been canceled.
            the report should download the records into the local file have checked in debug mode the job has canceled when it comes to GUI_DOWNLOAD,GUI_download will not work in background or not.
    if i ran the program in foreground it will generate the file.
    please help me.
    thanks
    sriman.

    Hi Sriman,
    The FM GUI_DOWNLAOD will not work in background mode, as it has to download to the local PC, but when run in background it is being run on the APP server and thus loses the link with the Desktop, so it does not know what desktop to download the file to and hits an error which is why the program will dump.
    Better to use the open dataset commands if running in background as this will download the file to the server, where the code is being run, you can easily FTP the file back on to the desktop if need be.

  • Function like GUI_UPLOAD/GUI_DOWNLOAD for background

    Is there a function or functions that work the same way as GUI_UPLOAD and GUI_DOWNLOAD but can be run both in the foreground and background?

    GUI_UPLOAD and GUI_DOWNLOAD can only work in the foreground.  The reason for this is that they use some code which reside on the frontend PC.  A background process knows nothing of the PC connected thru SAPgui. In order to "download" data to files, you must write the files to the application layer using OPEN DATASET, TRANSFER DATASET, CLOSE DATASET.
    Regards,
    Rich Heilman

  • GUI_DOWNLOAD can not be used in Background Job?

    Hi,
       I tried to use GUI_DOWNLOAD to output a TXT file to my local disk. If I just execute my program, it is successful. I can find the file on my D disk. But if I try to scheculd a backgound job, it will fail. It job log says 'Could not ascertain code page Job cancelled after system exception ERROR_MESSAGE'.
      So I don't know whether the GUI_DOWNLOAD support background job, or I have to find another FM or method to output my TXT file.
       Thank you.
    Best Regards,
    Yan

    Hi Yan Chen
    While executing the program in background, we can not download to presentation server(i.e local disk). We have to download to application server using commands like OPEN DATASET, TRANSFER & CLOSE DATASET statements.
    Once downloaded to application server, we can bring the file to local disk using transactions like CG3Y.
    <u><b>Sample Coding for your reference:</b></u>
    open dataset <dsn> for output in text mode encodind default.
    if sy-subrc ne 0.
      write:/ 'Unable to open file:', <dsn>.
    else.
      loop at itab into <wa>.
             trasnfer <wa> to <dsn>.
      endloop.
      close dataset <dsn>.
    endif.
    Kind Regards
    Eswar

  • GUI_DOWNLOAD does not work for background printing

    Hi,
    Need some help urgently.
    Function moduel GUI_DOWNLOAD does not work for background printing. I want to know how this issue can be handled or we have to use some other function module.
    We are using this in a report and i get the error dump OBJECTS_OBJREF_NOT_ASSIGNED when we run this report in background.
    Kindly suggest.
    Best Regards,
    Abbasi

    you can not use gui_download in background.
    Try searching first, this thing has been posted a thousand times already

  • Report in  background using cl_gui_frontend_services= gui_download Method

    Hello all,
    I'm trying to run a report that uses the method cl_gui_frontend_services=>gui_download in background mode, to export data from an internal table to a xml file.
    In foreground everything works fine, but when I try to run the report in background the execution stops when the method is called. Does anyone know how to avoid this problem and run the report in background mode?
    Thanks in advance,
    Nuno A.

    Hi,
    For background processing you need to use syntax
    OPEN DATASET
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    aRs

  • Background job scheduling for CAT2_ISCR

    Hi Experts,
    I have a customized program that will triiger CAT2_ISCR to run in background, it is possible?
    When I execute the program, I had this message: Control Framework: Fatal error - GUI cannot be reached.
    Why is it so?
    This doesn't occurs when I execute the program online.
    Thanks,
    Shan

    Yong,
    U can not execute any programs using GUI Fms in background.
    say for e.g u can not download fiel via FM GUI_DOWNLOAD in background..
    GUI Programs or FMS needs to be executed in foreground only.
    amit

  • How many times can the same question be answered?

    Subject "Copy from client to client" in the SD forum today.
    I type a joking response after seeing multiple, almost exact same answers, and still someone posts the same answer again!
    How long do you think this can last ?
    I'm going to repost my answer again and ask for points anyway. This one's on my watch list

    Eric Cartman wrote:>
    > >
    Chris Bain wrote:
    > > ....on that note just how do you use GUI_DOWNLOAD in background? :-P
    >
    > and in xls format... :)
    Well, I would help, but you forgot to mention that it is urgent, and to ask for the complete source code.

Maybe you are looking for

  • Lenovo IdeaPad Y500, expand with ssd

    Hello Im from the Netherlands. i have a question. I want to buy the Lenovo IdeaPad Y Series Y500-00619. but it doenst have a ssd it only has a hdd 1tb. Now is my question does this notebook have a extra place for a ssd? Or do i need to replace the hd

  • Two Simultaneous USB Camera Image Acquisition and Saving

    Hello everyone, Recently my friends and I have begun a project which requires the simultaneous acquisition of images from two independent USB cameras. Throughout our project research we have encountered many difficulties. The major problem appears to

  • Adobe Audition Volume Levels Not Matching

    Hello everyone. I have a quick question and have been looking the answer for quite a while. I seem to not be able to find it thought. Every time I export let's say a multi track mix down from audition, the volume seems to be lower than the original t

  • Upload servlet: how to redirect the user back to the portlet

    Hi. From what I've read in this forum, Oracle Portal does not support "multipart/form-data" forms, so the way to upload a file is to use a standalone servlet. The problem is, how do I redirect the user back to the portlet? Should I pass the back URL

  • Where is the app Cox "TV Direct? " Cox claims it is on App Store, but I can't find it.

    I've read and re-read Cox Internet home page and it says I can use my MacBook with my Cox Cable TV to view live program that are on the Cable.  Now when I tried to find the app it is no where to be found and I looked everywhere. At least I think I di