2007 Jun 11 6:45 AM
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
2007 Jun 11 8:12 AM
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.
2007 Jun 11 6:48 AM
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
2007 Jun 11 8:02 AM
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
2007 Jun 11 8:12 AM
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.