i gt this program and is working well. But it can only select a file once. Second time select, the file in the textbox belong to the first select. It does not change to the second file.
eg. first select abc.txt
second select efg.txt
the textbox only capture the first select instead the second. Below is the code
Pls help me to amend the code. thks
data: ifiletable type filetable.
data: xfiletable like line of ifiletable.
data: rc type i.
parameters: p_file1 type localfile.
at selection-screen on value-request for p_file1.
call method cl_gui_frontend_services=>file_open_dialog
INITIAL_DIRECTORY = 'C:\Documents and Settings\Administrator\Desktop\gary'
file_table = ifiletable
rc = rc
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
others = 4.
read table ifiletable into xfiletable index 1.
if sy-subrc = 0.
p_file1 = xfiletable-FILENAME.