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

file delete on server

Former Member
0 Likes
745

How to delete a file on appl. server?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
682

Hai,

DATA: v_ucomm(1000) TYPE c.

PARAMETERS: p_aname TYPE salfile-longname DEFAULT 'N:\usr\sap\global\test'

v_ucomm = 'DEL'.

CONCATENATE v_ucomm p_aname INTO v_ucomm SEPARATED BY space.

  • Execute the delete command.

CALL 'SYSTEM' ID 'COMMAND' FIELD v_ucomm.

4 REPLIES 4
Read only

Former Member
0 Likes
683

Hai,

DATA: v_ucomm(1000) TYPE c.

PARAMETERS: p_aname TYPE salfile-longname DEFAULT 'N:\usr\sap\global\test'

v_ucomm = 'DEL'.

CONCATENATE v_ucomm p_aname INTO v_ucomm SEPARATED BY space.

  • Execute the delete command.

CALL 'SYSTEM' ID 'COMMAND' FIELD v_ucomm.

Read only

Former Member
0 Likes
682

Hi Rao,

When ever you want to delete a file from Application Server, Use the DELETE DATASET syntax.

Hope this will resolve your Query.

Reward alll the helpful answers.

Regards

Nagaraj T

Read only

Former Member
0 Likes
682

hi,

Try DELETE DATASET <dataset name> .

or use FM EPS_DELETE_FILE

ie;

You can use DELETE DATASET with target path.

Use statement

delete dataset '\tmp\file.txt'.

\tmp\file.txt is the file path on application server which you want to delete.

Reward points if found helpful…..

thanks and regards

suma sailaja

Read only

Former Member
0 Likes
682

hi

good

but using DELETE DATASET u can remove file for app server.

If u want to delete the data alone then give the same name without data it will overwrite.

U can check it in AL11.

regards

md zubair sha

U can also use the function module - EPS_DELETE_FILE

thanks

mrutyun^