Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Using DATASET - Not able to download file to desired destination

Former Member
0 Kudos
195

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
135

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.

4 REPLIES 4

Former Member
0 Kudos
136

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.

0 Kudos
135

Hello Vishnu,


myserver\info\

is a server's location, not in my PC.

Regards,

Bernardo

0 Kudos
135

The path has to already exist on the application server. If it does not then OPEN DATASET with not work

Former Member
0 Kudos
135

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

Bernardo