11-21-2007 10:02 AM
Hi all,
can anybody tell me the alternative ECC6.0 function modules of the following Obsolete function modules
WS_FILENAME_GET
WS_QUERY
POPUP_TO_CONFIRM_STEP
POPUP_TO_CONFIRM_WITH_MESSAGE
Thanks
Sandeep
11-21-2007 10:24 AM
Hi,
<b>For ws_filename_get</b>
Use Class
CL_GUI_FRONTEND_SERVICES
For saving you can use
cl_gui_frontend_services=>file_save_dialog
and for opening file
cl_gui_frontend_services=>file_open_dialog
<b>for ws_query</b>
The Equivalent Function Module for WS_QUERY-File Exist in ABAP 4.7 is
CL_GUI_FRONTEND_SERVICES=>FILE_EXIST or WS_QUERY-Directory Exist is CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST.
For remaining use... Popup_to_confirm
Regards,
Omkar.
11-21-2007 10:07 AM
For the first two check out the methods of the class CL_GUI_FRONTEND_SERVICES
For the latter, if you click on "function module documentation", you'll see the first line says : Do not use! Please use POPUP_TO_CONFIRM.
matt
11-21-2007 10:11 AM
11-21-2007 10:24 AM
Hi,
<b>For ws_filename_get</b>
Use Class
CL_GUI_FRONTEND_SERVICES
For saving you can use
cl_gui_frontend_services=>file_save_dialog
and for opening file
cl_gui_frontend_services=>file_open_dialog
<b>for ws_query</b>
The Equivalent Function Module for WS_QUERY-File Exist in ABAP 4.7 is
CL_GUI_FRONTEND_SERVICES=>FILE_EXIST or WS_QUERY-Directory Exist is CL_GUI_FRONTEND_SERVICES=>DIRECTORY_EXIST.
For remaining use... Popup_to_confirm
Regards,
Omkar.
11-21-2007 10:37 AM
11-21-2007 12:10 PM
Hi,
run this code..it is just a file open dialog box, generally used to browse and load filename from local pc
tables rlgrap.
data: it_tab type filetable,
gd_subrc type i.
selection-screen begin of block m with frame.
select-options so_fpath for rlgrap-filename.
selection-screen end of block m.
at selection-screen on value-request for so_fpath-low.
REFRESH: it_tab.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Select File'
DEFAULT_FILENAME = '.'
MULTISELECTION = 'X'
CHANGING
FILE_TABLE = it_tab
RC = gd_subrc.
loop at it_tab into so_fpath-low.
so_fpath-sign = 'I'.
so_fpath-option = 'EQ'.
append so_fpath.
endloop.
in selection screen put the cursor on the field and press F4.the dialog box you see, is created by this method "FILE_OPEN_DIALOG".
Regards,
Omkar.
11-21-2007 12:12 PM
Hi,
For file exist..
data: l_filename type string.
data l_ret(1) type c.
l_filename = 'C:\test.txt'.
call method cl_gui_frontend_services=>file_exist
exporting
file = l_filename
receiving
result = l_ret
exceptions
others = 1.
if l_ret = 'X'.
write:/ 'File exists'.
else.
write:/ 'file doesnt exist'.
endif.
Regards,
Omkar.