Ansicht Dokumentation

Wir wachsen stetig und suchen neue Kollegen (m/w/d)! Schauen Sie sich unsere offenen Position an, um eine passende Herausforderung zu finden!

ABAPDELETE_DATASET - DELETE DATASET

ABAPDELETE_DATASET - DELETE DATASET

ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
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.






BAL Application Log Documentation   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 2530 Date: 20230129 Time: 074810     sap01-206 ( 28 ms )