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: 

WS_FILENAME_GET

Former Member
0 Kudos

Hi,

Wehn we select a file for BDC using WS_FILENAME_GET, at selection screen or on f4 help request we get a message saying

'c:\perforce\bas\620_COR\src\fes\few\sapfewin\guifuctionality.xml contains an invalid path '

Our SAP system is 4.7, and i guess WS_FILENAME_GET is an obselete function, what are my alternatives. Is there any way to make this message not come.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Try with the static method FILE_OPEN_DIALOG of a class CL_GUI_FRONTEND_SERVICES.

CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG

.....

parameters filename(132).

data: ftable type FILETABLE,

wa_file like line of ftable,

r_code type i.

at selection-screen ON VALUE-REQUEST FOR filename.

refresh ftable.

CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG

changing

FILE_TABLE = ftable

RC = r_code.

read table ftable index 1 into wa_file.

filename = wa_file-FILENAME.

Svetlin

Message was edited by: Svetlin Rusev

Former Member
0 Kudos

If you find an answer useful, please assign reward points.

Svetlin

Former Member
0 Kudos

Hello Thirunarayanan,

as far as i know this error message is caused by a SAPGUI Problem. It has nothing to do with using the old WS_*function modules. You get the same error when using the GUI_FRONTEND_SERVICES.I dont know how we solved it on our system(we had the same problem 1 Year ago),but the reason was the SAPGUI(settings/patch?).

Greetings

Frank Brackmann

Former Member
0 Kudos

Thank you Frank, we have the latest set of patches ut still we get this error. Do let me know if you are able to remember the exact solution.

0 Kudos

Hello Thirunarayanan,

The person who solved this problem in our company is at holiday at the moment. If you wouldn't wait for the solution,perhaps post this thread in the SAPGUI-Forum.The problem is caused on client-side and it is not a development problem.In our case we also get this error-message when executing the GUI_UPLOAD/DOWNLOAD functions.

As i remember,we get a fast solution by typing an OSS-Message.

Greetings and sorry that i can't help you at the moment.

Frank Brackmann

Former Member
0 Kudos

it is working fine for me in 4.7uni

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

DEF_FILENAME = 'xyz.TXT'

DEF_PATH = 'C:\TEMP'

MASK = ', File,*.txt.'

MODE = '0'

TITLE = 'Save File As'

IMPORTING

FILENAME = FILENAME

EXCEPTIONS

INV_WINSYS = 1

NO_BATCH = 2

SELECTION_CANCEL = 3

SELECTION_ERROR = 4

OTHERS = 5.

regards

can you please post your code

Message was edited by: Surpreet Singh Bal