CL_GUI_FRONTEND_SERVICES - Frontend Services

BAL_S_LOG - Application Log: Log header data   General Material Data  
This documentation is copyright by SAP AG.

Functionality

The class CL_GUI_FRONTEND_SERVICES contains static methods for the following areas:

File functions

Directory functions

Registry

Environment

Write to / read from clipboard

Upload / download files

Execute programs / open documents

Query functions, such as Windows directory, Windows version, and so on

Standard dialogs (open, save, directory selection)

Relationships

Example

Determine the temp directory on your PC:

DATA: TEMP_DIR TYPE STRING.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY

,,CHANGING

,,TEMP_DIR = TEMP_DIR

,,EXCEPTIONS

,,,,CNTL_ERROR = 1

,,,,ERROR_NO_GUI = 2.

IF SY-SUBRC <> 0.

* Error handling

ENDIF.

* flush to send previous call to frontend

CALL METHOD CL_GUI_CFW=>FLUSH

,,EXCEPTIONS

,,,,CNTL_SYSTEM_ERROR = 1

,,,,CNTL_ERROR = 2

,,,,OTHERS = 3.

IF SY-SUBRC <> 0.

* Error handling

ENDIF.

WRITE: / 'Temporary directory is:', TEMP_DIR.

Notes

The class CL_GUI_FRONTEND_SERVICES is based on the Control Framework. See the documentation for more information, in particular on CL_GUI_CFW=>FLUSH which must be called after many CL_GUI_FRONTEND_SERVICES methods.

Migration Information

The old file transfer model was based on function modules of the function group GRAP. The old featureshave been replaced by the class CL_GUI_FRONTEND_SERVICES. The following list contains the old function modules (italic) and the new methods (bold) that replace them:

  • CLPB_EXPORT
CLIPBOARD_EXPORT
  • CLPB_IMPORT
CLIPBOARD_IMPORT
  • DOWNLOAD
GUI_DOWNLOAD, dialog replaced by FILE_SAVE_DIALOG
  • PROFILE_GET
No replacement, use REGISTRY_* methods instead
  • PROFILE_SET
No replacement, use REGISTRY_* methods instead
  • REGISTRY_GET
REGISTRY_GET_VALUE, REGISTRY_GET_DWORD_VALUE
  • REGISTRY_SET
REGISTRY_SET_VALUE, REGISTRY_SET_DWORD_VALUE
  • UPLOAD
GUI_UPLOAD, dialog replaced by FILE_OPEN_DIALOG
  • WS_DDE
Obsolete: This function is no longer supported.
  • SET_DOWNLOAD_AUTHORITY
Obsolete: This function is no longer supported.
  • WS_DOWNLOAD
GUI_DOWNLOAD
  • WS_DOWNLOAD_WAN
Obsolete: This function is no longer supported.
  • WS_EXCEL
Obsolete: This function is no longer supported.
  • WS_EXECUTE
EXECUTE
  • WS_FILENAME_GET
FILE_SAVE_DIALOG, FILE_OPEN_DIALOG
  • WS_FILE_ATTRIB
FILE_SET_ATTRIBUTES, FILE_GET_ATTRIBUTES
  • WS_FILE_COPY
FILE_COPY
  • WS_FILE_DELETE
FILE_DELETE
  • WS_MSG
Obsolete: This function is no longer supported.
  • WS_QUERY
  • CD (current directory)

DIRECTORY_GET_CURRENT
  • EN (read/write environment)

ENVIRONMENT_GET_VARIABLE
  • ENVIRONMENT_SET_VARIABLE
  • FL (determine file length)

FILE_GET_SIZE
  • FE (check if file exists)

FILE_EXIST
  • DE (check if directory exists)

DIRECTORY_EXIST
  • WS (determine Windows system)

GET_PLATFORM
  • OS (operating system)

GET_PLATFORM
  • WS_UPLDL_PATH
Obsolete: This function is no longer supported.
  • WS_UPLOAD
GUI_UPLOAD
  • WS_VOLUME_GET
Obsolete: This function is no longer supported.

Further information






ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.


Length: 6042 Date: 20120526 Time: 155311     triton ( 104 ms )