Application Development and Automation 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: 
Read only

Getting 'Invalid argument' error while uisng OPEN DATASET. Help!

gopalkrishna_baliga
Participant
0 Likes
1,388

Hi Experts,

I am trying to read a file from a shared server location using OPEN DATASET as shown below.

OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING UTF-8 MESSAGE msg.

The file_name i gave is '
CNSGN-PRE-DM.COM\FUNCTIONAL\INVENTORY.CSV'.

The program compiles perfectly. But when I run the program I am getting 'Invalid argument' error. I have checked the authorization to the server, file name, file availability and everything is fine.

Strangely this code was working fine a week ago.

What could be the problem? Kindly help me!

Thanks

Gopal

5 REPLIES 5
Read only

Former Member
0 Likes
942

Is the File present in application server , check in AL11 Tcode.

You can use OPEN DATASET only if the file is in application server,

To access files using FTP , u can use FTP_CONNECT FM

Read only

0 Likes
942

Hi Chandrasekhar,

The file is in a application server.

What is AL11 transcation used for?

I don't have access to AL11 transaction. It is possible to see data in this transaction by some other way like querying the table involved?

Thanks

Gopal

Read only

0 Likes
942

AL11 is the transaction where all the SAP directories are stored,

Check with your basis to get access to AL11

Read only

0 Likes
942

Hi Chndrasekhar,

You mean to say the we cannot use OPEN DATASET for reading file in shared server location. For example a shared folder in my PC.

Is there something wrong in the file name path I have given? It started with '//'. Do I have to start the file path wih 'file://..'?

Thanks

Gopal

Read only

0 Likes
942

use GUI_UPLOAD FM to read files on ur Pc , check the documentation of that FM