FILE_SET_ATTRIBUTES

Use

Allows changing the attributes of a file. It is possible to set the archive, hidden, read only or normal flags. Other flags cannot be set.

Arguments

[IMPORTING] filename TYPE STRING

Name file whose attributes should be changed

[IMPORTING] readonly TYPE ABAP_BOOL

Specifies whether the read only flag for the file should be set or not.

This is an optional parameter.

[IMPORTING] normal TYPE ABAP_BOOL

Flag indicating that no other flag should be set. If this flag is set, no other flag should be specified. The result is undefined if the normal flag and any other flags are set at the same time. For compatibility reasons no exception will be thrown though.

This parameter is optional.

[IMPORTING] hidden TYPE ABAP_BOOL

If set to ABAP_TRUE, the hidden flag will be set for the specified file.

This is an optional parameter.

[IMPORTING] archive TYPE ABAP_BOOL

The file will be marked for back up, if this flag is set to ABAP_TRUE.

This parameter is optional.

[EXPORTING] rc TYPE I

Return code indicating whether the specified file attributes were set successfully or not.

Possible values:

  • <0

    no file name was specified

  • 0

    file attributes could not be changed

  • >0

    the file attributes were changed successfully

Exceptions

CNTL_ERROR

This exception is fired, if neither Windows nor Java nor Web GUI is being used or calling the front end method fails.

ERROR_NO_GUI

Currently not used.

NOT_SUPPORTED_BY_GUI

This exception is thrown, if the method called when a Java or Web is being used.

WRONG_PARAMETER

Raised if no file name or no flags were supplied