Skip to Content
author's profile photo Former Member
Former Member

Open Dataset to Presentation server batch mode

I'd like to download an internal table to the presentation server. i.e. "C:\TEMP\MYFILE.TXT' in batch mode. Unfortunately, GUI_DOWNLOAD prevents this.

All of my attempts to use OPEN DATASET don't create a file, either in foreground or background mode. I don't get an open file error but nothing gets created.

Is there a way to do this?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Mar 01, 2006 at 07:58 PM

    You can not use OPEN DATASET to download or upload files to the presentation. You can only use this to upload/download to the application server. In doing this, it will work in both foreground and background. There is no "easy" way to download to the presentation server from a background process. I'm not saying that it can't be done, but you must jump thru a couple of hoops to do it.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2006 at 08:01 PM

    Hi ,

    OPEN DATA Sets -- For Uploading/Down loading fiels from Application server.

    Please define a file path in your program and then use "OPEN DATASET L_FILE FOR OUTPUT ".

    Then the O/P data will write to that file on application server.

    Example:

    *---opens application server file

    OPEN DATASET L_FILE FOR OUTPUT IN BINARY MODE.

    "encoding default.

    IF SY-SUBRC = 0.

    LOOP AT I_TAB1.

    TRANSFER I_TAB1 TO L_FILE.

    ENDLOOP.

    *--- closes error file

    CLOSE DATASET L_FILE.

    ELSE.

    • message i000 with 'Unable to download PDF file'.

    ENDIF.

    Regards,

    Lanka

    Rich : you are too fast and I am fully agree with Rich.

    Message was edited by: Lanka Murthy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 13, 2014 at 02:56 PM

    Hello,

    I'm got encountered with the same problem. We have generated file on application server successfully but download to presentation server is not working as i have used gui_download.We have set batchjob but because we used download function module job is getting cancelled as this is foreground activity.

    We removed gui_download code and i tried to download file using open dataset and transfer method but it is not writing file on ps.

    Please suggest other way to achieve the requirement.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.