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

Using DATASET - Not able to download file to desired destination

Hello experts,

I am using OPEN DATASET, TRANSFER and CLOSE DATASET instead of the GUI_DOWNLOAD since it is not able to work in batch mode.

When I used my program to donwload into some pre-defined logical path of my server GUI_DOWNLOAD worked OK.

Now, I am trying to do the same but as far as I experienced OPEN DATASET doesn't allows me to input a different path which is not the (internally, and I don't know how it is...) predetermined. This is an extract from the coding:

data: D_MSG_TEXT(50), myFN(128) type c.

open dataset myFN for output
     in text mode
     encoding default
     with WINDOWS LINEFEED
     message D_MSG_TEXT.
break-point.	"<-- When I debug D_MSG_TEXT shows "Permission denied" msg
if  sy-subrc ne 0.
*** ErrorMsg ***
else.
    loop at itab into xtab.
        transfer xtab to myFN.
    endloop.
endif.
close dataset myFN.

If I enter as parameter: mytest1.csv (then it creates the file into this path: "usr/sap/MYSRV/instance/work")

But if I enter the complete path as I want:
myserver\info\mytest1.csv, it doesn't works and D_MSG_TEXT shows "Permission denied", only in debugging mode.

I talked to the basis team and they say everything is ok in authorization matters. Is there something wrong or that I am forgetting to use? Please need your help.

Best regards,

Bernardo

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 14, 2011 at 04:43 PM

    Check whether you are using a path on the Application Server.

    OPEN DATASET cannot process files on presentation server. I guess, the path you are using is present on your PC or some other server that is not the SAP application server.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2011 at 07:52 PM

    Basis changed the location to another one having enough authorizations and it worked all Ok. Thank you all.

    Bernardo

    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.