Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPDELETE_DATASET - DELETE DATASET

ABAPDELETE_DATASET - DELETE DATASET

CPI1466 during Backup   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

DELETE DATASET

Short Reference



DELETE DATASET dset.

Effect

The statement deletes the file specified in dset. dset expects a character-like data object that contains the physical name of the file. The file can be opened or closed.

Note

When a file is deleted, automatic authorization checks are performed, but self-programmed checks may also be necessary.

Access to a file whose name dset is passed to a program from outside is a serious security risk. Any names passed to a program from outside must be checked thoroughly before being used. See Directory Traversal.

Return Value

sy-subrc Meaning
0 File has been deleted.
4 File could not be deleted.

Exceptions

Catchable Exceptions

CX_SY_FILE_AUTHORITY

  • Cause: No authorization for access to file
    Runtime Error: OPEN_DATASET_NO_AUTHORITY (can be handled)

CX_SY_FILE_OPEN

  • Cause: File cannot be opened
    Runtime Error: DATASET_CANT_OPEN (can be handled)

Example

Opening of a file for writing and reading and then deleting the file.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 2530 Date: 20221127 Time: 040420     sap01-206 ( 29 ms )