cancel
Showing results for 
Search instead for 
Did you mean: 

Filepath search help in WDA

Former Member
0 Kudos

Hi,

I have a requirement to have a presentation server filepath/name search help against a UI element in WDA.

I have a number of buttons on the screen performing different actions against the file.

Originally, I tried to use the UI element type 'FileUpload' - however, I found that when I pressed any of the buttons the value would disappear from the field and although I could retrieve it I could not repopulate the value before the next display.

So, I tried creating a custom search help - within this I tried 2 options to get the file selection dialog screen open:

1. FM KD_GET_FILENAME_ON_F4

2. Method cl_gui_frontend_services=>file_open_dialog

Whilst both options work fine when testing the search help from within R/3 they short dump when executed from WDA.

The reason for this is that when executed from WDA, both make a call to 'DYNP_VALUES_READ' which in turn makes a call to a method which does not exist:('CL_WDR_VALUE_HELP_HANDLER')=>('WDR_VALUES_READ').

I have a raised a customer message with SAP about the above issue but I'm trying to get this development complete asap so was hoping someone may have created such search help functionality elsewhere using some other technique...

Any ideas please let me know....much appreciated!

Many thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Danielle,

inside WDA you should not use any functions or methods that involve or otherwise

depend on the sapgui.

The functions described here in this thread all use the SAPGUI.

READing the Dynpro is clearly a SAPGUI screen step.

Less obvious is the fact the standard read workstation file,

uses the existing SAPGUI connection and does a call back to SAPGUI to get the file.

This is not supported within WDA as there is not SAPGUI connection.

It is an HTTP/S connection.

Within WDA only the UI element for fileupload should be used to read front-end data.

regards

Phil.

Answers (3)

Answers (3)

Former Member
0 Kudos

Having seen the example component WDR_TEST_COMPONENT I've decided to follow their example view FileUpload.

i.e. I will use the FileUpload UI Element and then have a separate display field to show the file being considered.

Thanks!

Former Member
0 Kudos

Hi,

Thanks for the reply...was useful to know I was heading in the right direction...kind of..

However, I can't find any methods within this class that I can use to get the popup box from which I can select a file...and that then returns the selected filename....

thomas_lambert
Explorer
0 Kudos

This method in the class will allow for it.

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

WINDOW_TITLE = 'Please select file to open'

CHANGING

file_table = i_file_table

rc = w_rc

EXCEPTIONS

FILE_OPEN_DIALOG_FAILED = 1

CNTL_ERROR = 2

ERROR_NO_GUI = 3

NOT_SUPPORTED_BY_GUI = 4

others = 5

thomas_lambert
Explorer
0 Kudos

I don't have access to my system right now, but I think that you should look at CL_GUI_FRONTEND_SERVICES, or a name similar to that to find the new classes to allow you to operate on presentation server files. There is a GUI_UPLOAD method to replace the one you refer to I think.

Good Luck,

Tom01