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: 

Regarding Obsolete FM s

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

6 REPLIES 6

matt
Active Contributor
0 Kudos

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

Former Member
0 Kudos

hi,

reffer respective threads,

WS_FILENAME_GET -

WS_QUERY -

POPUP_TO_CONFIRM_STEP-

these may answer your question

regards,

pavan

Former Member
0 Kudos

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.

0 Kudos

Hi omkaram

Can u provide me sample code

0 Kudos

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.

0 Kudos

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.