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

deleting file from AL11 Tcode

Former Member
0 Likes
11,602

Guy's

pls let me know ,how we can delete files which we have

in ALL11 tcode.

thanks

sanju

Guy's

pls let me know ,how we can delete files which we have

in ALL11 tcode.

thanks

sanju

4 REPLIES 4
Read only

Former Member
0 Likes
2,447

ask your Basis team to write a UNIX script which can be executed via SM49 to delete the file you want in the file system. This is the way we do it at our company.

thanks.

Read only

0 Likes
2,447

hi,

try fm EPS_DELETE_FILE

or

abap command :

delete dataset file.

regards Andreas

Read only

Former Member
0 Likes
2,447

HI,

Jus chk out this:

DELETE - Delete a file

Basic form

DELETE DATASET dsn.

Effect

Deletes the file specified in the field dsn.

The return code is set as follows:

SY-SUBRC = 0:

File deleted.

SY-SUBRC = 4:

File does not exist or could not be deleted.

Possible reasons:

1) The file does not exist.

2) The file is a directory.

3) The R/3 System has no search authorization

for a component of the file name.

4) The R/3 System has no search authorization

for the directory which contains the file.

5) A component of the search path is not a

directory.

6) The file is a symbolic link which cannot be

resolved (endless loop ?).

7) The file is a program which is currently

running.

You can refer this piece of code:

LOOP AT gt_files WHERE type <> 'directory file'

AND len EQ 0.

CONCATENATE p_path gt_files-name INTO test.

CONDENSE test NO-GAPS.

OPEN DATASET test.

IF sy-subrc EQ 0.

DELETE DATASET test.

IF sy-subrc EQ 0.

MESSAGE i000(0) WITH 'file deleted'.

ENDIF.

ENDIF.

ENDLOOP.

Regards,

Gayathri

Message was edited by: Gayathri Hariharan

Read only

Former Member
0 Likes
2,447

hI

AL11 is a tcode for SAP directories.So every directory contain files.If you want to delete the files than you must have to delete the directrories.

So no way you can delete the files without deleting the directory and directory can be deleted by the BASIS people only.

I hope this will help you to give some idea to delete the files.

Thanks

Mrutyunjaya Tripathy