Application Development 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: 

CL_GUI_FRONTEND_SERVICES

Former Member
0 Kudos
173

Hi,

Need a code for F4 help, to save the code in text format.This should be with CL_GUI_FRONTEND_SERVICES class and method will be FILE_SAVE_DIALOG.

Thanks in advance.

Regards,

Asha

1 ACCEPTED SOLUTION

Former Member
0 Kudos
119

hi,

goto pattern -> give required file name and method for that file [cl_gui_frontend_services=>FILE_SAVE_DIALOG ] , then system will automatically gives all importing n exporting parameters with relevant code.

CALL METHOD cl_gui_frontend_services=>FILE_SAVE_DIALOG

importing

DEFAULT_EXTENSION = 'txt'

DEFAULT_FILE_NAME = 'test'

Changing

FILENAME = ' test.txt'

PATH = ' c:/desktop/ '

FULLPATH = 'c:/desktop/test.txt'

for excuting this report check file exists in specified path or not.

if useful reward some points.

with regards,

suresh.

3 REPLIES 3

Former Member
0 Kudos
119

hI ASHA,

DATA l_ret(1) TYPE c.

CALL METHOD cl_gui_frontend_services=>file_exist

EXPORTING

file = l_filename

RECEIVING

result = l_ret

EXCEPTIONS

OTHERS = 1.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

EXIT.

ENDIF.

<b>*Reward points</b>

Regards

Former Member
0 Kudos
119

CALL METHOD cl_gui_frontend_services=>FILE_SAVE_DIALOG
 (
importing
DEFAULT_EXTENSION =   txt
DEFAULT_FILE_NAME = test
Changing
FILENAME   =  test.txt
PATH  =  c:/desktop/
FULLPATH =  c:/desktop/test.txt )

after executing see the file in the directory ...

reward points if it is usefull .

Girish

Former Member
0 Kudos
120

hi,

goto pattern -> give required file name and method for that file [cl_gui_frontend_services=>FILE_SAVE_DIALOG ] , then system will automatically gives all importing n exporting parameters with relevant code.

CALL METHOD cl_gui_frontend_services=>FILE_SAVE_DIALOG

importing

DEFAULT_EXTENSION = 'txt'

DEFAULT_FILE_NAME = 'test'

Changing

FILENAME = ' test.txt'

PATH = ' c:/desktop/ '

FULLPATH = 'c:/desktop/test.txt'

for excuting this report check file exists in specified path or not.

if useful reward some points.

with regards,

suresh.