05-28-2008 11:16 AM
Hi,
In my dynpro I have a "text box" to enter a name of a file.
How can I add a matchcode to this "text box" so as to I can select a file ? (I want to see the typical window to select a file).
Thanks
05-28-2008 11:18 AM
Hello,
you could just call the function F4_Filename.
Regards Wolfgang
05-28-2008 11:18 AM
Hello,
you could just call the function F4_Filename.
Regards Wolfgang
05-28-2008 11:24 AM
Can you give me more details?
In what place put I it?? In the "search help" property of the "text box" in the screen painter??
05-28-2008 11:27 AM
Hello,
use cl_gui_front_end_services=>get_filename. F4_Filename only stores filenames in a 128 byte field, which is definitly to short in out tmes, a unc path can be easily much longer then that.
*******reward points,if found useful
05-28-2008 11:43 AM
For example, how also said other colleagues:
DATA: FILEBIN TYPE FILETABLE,
FILESTR TYPE FILE_TABLE,
RC TYPE I.
PARAMETERS: FILE TYPE FILENAME.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
CHANGING FILE_TABLE = FILEBIN
RC = RC.
IF SY-SUBRC IS INITIAL.
READ TABLE FILEBIN INTO FILESTR INDEX 1.
FILE = FILESTR-FILENAME.
ENDIF.
Good luck.
05-28-2008 11:20 AM
Hi Oscar,
You can call function module F4_FILENAME to activate the search help under 'process on value-request' event.
Regards
Sujatha
05-28-2008 11:22 AM
DATA: carrid TYPE spfli-carrid,
hlp TYPE string,
struc TYPE dfies-tabname,
comp TYPE dfies-fieldname.
DESCRIBE FIELD carrid HELP-ID hlp.
SPLIT hlp AT '-' INTO struc comp.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST' EXPORTING tabname = struc
fieldname = comp
EXCEPTIONS field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
OTHERS = 5.
Reward if useful.
Anita
05-28-2008 11:23 AM
Hi
use the following method.
CALL METHOD cl_gui_frontend_services=>FILE_OPEN_DIALOG
Reward points if helpful