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

Class interface

Former Member
0 Likes
473

Hi

what is the use of this Class interface. <b>CL_GUI_FRONTEND_SERVICES</b>

PLease explain this.

Regards

Prajwal.

3 REPLIES 3
Read only

Former Member
0 Likes
439

Call method GET_GUI_VERSION of class CL_GUI_FRONTEND_SERVICES.

from the command line without using any kind of visual user interface

Use the Class cl_gui_frontend_services,In this class use the method ... Presentation - Web Dynpro Component Interface Defintions in Practice

Read only

Former Member
0 Likes
439

It is a wrapper class provided for frontend services .

for example FILE_OPEN_DIALOG for opening file.

For this create a instance of the class and call the method desired

Read only

Former Member
0 Likes
439

Hi

See the doc of this class

Short text

Frontend Services

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)

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 features have 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.

<b>Reward points for useful Answers</b>

Regards

Anji