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

FM to delete files from application server

Former Member
0 Likes
26,337

Hi Experts,

I have the logical and physical address of Application server

please give me FM to delete files from application server.

Regards

Bikas

1 ACCEPTED SOLUTION
Read only

Former Member
9,866

Hi,

DELETE DATASET <p_filepath>
 ( give path of the file where it is stored )
if sy-subrc eq 0.
write : 'file is deleted'.
else.
write : 'it is not deleted'.
endif.

Check this FM,

EPS_DELETE_FILE

Regards

Adil

Hi Experts,

I have the logical and physical address of Application server

please give me FM to delete files from application server.

Regards

Bikas

11 REPLIES 11
Read only

Former Member
9,867

Hi,

DELETE DATASET <p_filepath>
 ( give path of the file where it is stored )
if sy-subrc eq 0.
write : 'file is deleted'.
else.
write : 'it is not deleted'.
endif.

Check this FM,

EPS_DELETE_FILE

Regards

Adil

Read only

Former Member
0 Likes
9,866

Hi,

there is no such function module.

tha approach will be different.

you have to use DATASET approach..

check out the functionality avilable with DATASET.

Regards

ricky

Read only

0 Likes
9,865

approach is that follow below

Open dataset.

Read dataset

and then

DELETE DATASET " Dataset name"

clsoe dataset.

Read only

Former Member
0 Likes
9,865

Hello

WS_FILE_DELETE

Read only

Former Member
0 Likes
9,865

Hi Bikas,

Try this way,

1. Validating the filename

First use the following FM to split the File Path & file name. TRINT_SPLIT_FILE_AND_PATH

E: if you give as D:\USR\SAP\CMI\DVEBMGS00\WORK\ZMM_LSMW_ZMM_LS_SUB_ZMM01_LSMW.LSMW.READ

If outputs as

STRIPPED_NAME ZMM_LSMW_ZMM_LS_SUB_ZMM01_LSMW.LSMW.READ

FILE_PATH D:\USR\SAP\CMI\DVEBMGS00\WORK\

2. Deleting the file

Now use delete dataset <filename>.

If you want to do this , u can develop the FM .

Read only

Former Member
0 Likes
9,865

This message was moderated.

Read only

Former Member
0 Likes
9,865

Hi,

Use the Function Module:

DX_FILE_DELETE

Regards,

Rama chary.Pammi

Read only

Former Member
0 Likes
9,865

This message was moderated.

Read only

Former Member
0 Likes
9,865

Thanx a lot for all your replyes my problem solved

Thanks

Bikas

Read only

0 Likes
9,865

Hi Bikas,

How you solved your problem ? Just used the DELETE statement or any FM ?

Read only

0 Likes
9,865

hi,

I have gone through the forum you have posted for deleting files from application server through process chain.

I have similar reuirement in my project ie. to delete the files after getting loaded.

Can you please provide me the solution?

Your inputs will be highly appreciated.

Thanks in advance.

Regards,

Lavanya