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

Connect external file server

Former Member
0 Likes
855

Hi All,

I want to connect an external file server, and used the function WS_FILENAME_GET to search file list on the server.

During the process , I should input the username and pwd of the server.

How can I save the username and pwd, so the user needn't input

username and pwd once executing the program.

thanks,

4 REPLIES 4
Read only

Former Member
0 Likes
683

WS_FILENAME_GET - local server ( presentation server )..

you want to connect unix server then use opendatset command.

Read only

Former Member
0 Likes
683

See the some notes for unix server and i used ftp command

Below is the code to get all the files falling in the directory...... .

data: begin of t_tabl occurs 0,

line(132),

end of t_tabl,

data: lc_command(100) type c.

  • Get all the file name falling under specified directory...

lc_command(3) = 'ls '.

lc_command+3(45) = p_dir. " Directory of file path

call 'SYSTEM' id 'COMMAND' field lc_command

id 'TAB' field t_tabl-sys.

  • Check any files exits in the directory.......................

if t_tabl[] is initial.

message e006 with 'No files exist in the specified directory ' p_dir.

endif.

Above step will give you the all the fiels falling under the directory specified. But you have to loop through the internal table t_tabl to find the required files for eg: if you know the start few letters of the file name which are going to be constant always....like CWD_CNF*..

To delete the files.

loop at t_tabl.

lc_command(3) = 'rm'.

lc_command+3(45) = t_tabl-line.

call 'SYSTEM' id 'COMMAND' field lc_command

id 'TAB' field t_tabl-sys.

endloop.

Read only

0 Likes
683

The file server just like an sharing file. And i use WS_FILENAME_GET can find all

the files. Now I just want to keep the user name and pwd of the sharing file.

Read only

Former Member
0 Likes
683

You can store it in a table TVARVC.

Create 2 different entries for username and pwd in TVARVC. You can change them manually or by program.

Or you can create your own Z table and store it there.

Or you can use SET/GET PARAMETER. Look at this: