on 11-14-2006 9:57 AM
Hi,
I have some files on application server i.e. /usr/abc/xyz/1.txt
/usr/abc/xyz/2.txt etc.
Now I need to copy these files in different directory with different names i.e./usr/abc/xyz_copy/1_copy.txt
/usr/abc/xyz_copy/2_copy.txt
How can i do that in function module in ABAP instead of open dataset?
Can anybody tell me how to use unix command like cp(for COPY) in ABAP?
Thanks and regards,
Deepak
Hi,
Check this FM
DATA: BEGIN OF i_tabl OCCURS 0,
f1(132) TYPE c,
END OF i_tabl.
DATA: command(132) TYPE c,
command2(132) TYPE c.
CONCATENATE 'rm' i_param-unix_path INTO command SEPARATED BY space.
CONCATENATE command i_param-file_name INTO command2.
CALL FUNCTION 'RFC_REMOTE_PIPE' DESTINATION 'SERVER_EXEC'
EXPORTING command = command
read = 'X'
TABLES pipedata = i_tabl.
Here 'SERVER_EXEC' is the TCP/IP connection created in SM59.
Command is the Unix command
i_tab1 is for any error messages.
Hope this helps.
Thanks,
Sarika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.