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 CL_GUI_FRONTEND_SERVICES

alfredo_gomezripoll
Participant
0 Likes
1,145

Does someone Knwos why following method doesn´t work?

Do I need something else ?

I simply get nothing in version .

REPORT zfrontend_file_get_version .

DATA : version TYPE string .

CLEAR version .

CALL METHOD cl_gui_frontend_services=>file_get_version

EXPORTING

filename = 'C:TEST_SAPREADME.TXT'

CHANGING

version = version

EXCEPTIONS

CNTL_ERROR = 1

ERROR_NO_GUI = 2

NOT_SUPPORTED_BY_GUI = 3

WRONG_PARAMETER = 4

others = 5 .

Thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,044

hope sap did not implement this class yet.

to confirm this

execute program TEST_FRONTEND_SERVICES in se38 to know the sameple usage of all the method in class cl_gui_frontend_services.

regards

gv

Does someone Knwos why following method doesn´t work?

Do I need something else ?

I simply get nothing in version .

REPORT zfrontend_file_get_version .

DATA : version TYPE string .

CLEAR version .

CALL METHOD cl_gui_frontend_services=>file_get_version

EXPORTING

filename = 'C:TEST_SAPREADME.TXT'

CHANGING

version = version

EXCEPTIONS

CNTL_ERROR = 1

ERROR_NO_GUI = 2

NOT_SUPPORTED_BY_GUI = 3

WRONG_PARAMETER = 4

others = 5 .

Thank you

3 REPLIES 3
Read only

Former Member
0 Likes
1,045

hope sap did not implement this class yet.

to confirm this

execute program TEST_FRONTEND_SERVICES in se38 to know the sameple usage of all the method in class cl_gui_frontend_services.

regards

gv

Read only

Former Member
0 Likes
1,044

what error message you are getting

regards

check if filename is also of type STRING

Message was edited by: Surpreet Singh Bal

Read only

Former Member
0 Likes
1,044

Hi,

I tried using this method but i also failed to get the version.

Data: ws_version TYPE STRING.

DATA: ws_filename TYPE STRING.

ws_filename = 'D:New Text Document.txt' .

CALL METHOD cl_gui_frontend_services=>file_get_version
  EXPORTING
    filename             =   ws_filename
  changing
    version              =    ws_version
  EXCEPTIONS
    CNTL_ERROR           = 1
    ERROR_NO_GUI         = 2
    NOT_SUPPORTED_BY_GUI = 3
    WRONG_PARAMETER      = 4
    others               = 5
        .
IF sy-subrc <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

write :/ ws_version.

As Venkat mentioned, in the sample code it is mentioned as not implemented but in the same we are able to use file_open_dialog and file_close_dialog too.

So not clear,if i get some inputs will let u know.