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: 

error to open a net directory with abap

javierbarneo
Explorer
0 Kudos

Hi gurus.

I have created a report that executes a process chain when a file exits in one net directory.

The report runs the function module EPS_GET_DIRECTORY_LISTING to obtain the list of files in the directory, but it returns always the exception u201Cread_directory_failedu201D. The open dataset instruction returns the same error.

I have tried to open the directory from windows explorer and it runs fine, so, I donu2019t think that the error is the authorization.

I have created a record in the al11 transaction with the path but the transaction returns u201CWrong order of calls <- CALL opendir(,,..) Nº message: S1204u201D.

Can anybody help me?

Thanks in advantage.

5 REPLIES 5

Clemenss
Active Contributor
0 Kudos

Hi Javier,

first of all: If the net directory can be reached from PC, it can usually not be reached, at least not using the same name, from SAP server.

Functions like WS_upload/download(obsoltete), GUI_upload/download can be used in online process connected to local SAPGUI.

OPEN/READ/TRANSFR dataset is for access of files from SAP server, online, background.

If the access is via GUI, then the file/directory access must be granted to the local PC user, for access from SAP server the current SAP user needs the rights to access the file/directory.

Please discuss this with basis administrator, she may check the access rights on server and client side.

Regards,

Clemens

Former Member
0 Kudos

Is your file stored in unix directory in Application server? If yes, how did you give the directory name? Does it have a '/' at the end. It should be like /SAPOUT/HR/PAYROLL/.

Its usually throws that error when we miss the last '/' or when there is no unix directory by that name.

If your file is in your local PC you should use, function GUI_UPLOAD.

0 Kudos

Remember, also, that apps server folder/file names are usually case sensitive....if you're running on Unix/AIX/Sun Solaris servers, check to be sure you're using correct case, precisely as it appears in the folder/file display (-ls).

Try to open the file with open dataset command, making sure you have exactly the correct /folder/filename....if you get return code 8, the file/folder permissions don't allow the SAP username to open or read files!

0 Kudos

The problem was the authority between servers.

Solved

javierbarneo
Explorer
0 Kudos

The problem Was the authority between servers.