Skip to Content
0
Former Member
Sep 21, 2007 at 05:58 AM

file browsing

16 Views

Hi all..

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

REPORT ZGARY_FILE.

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

EXPORTING

  • WINDOW_TITLE =

  • DEFAULT_EXTENSION =

  • DEFAULT_FILENAME =

  • FILE_FILTER =

INITIAL_DIRECTORY = 'C:\Documents and Settings\Administrator\Desktop\gary'

  • MULTISELECTION =

changing

file_table = ifiletable

rc = rc

  • USER_ACTION =

EXCEPTIONS

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.

endif.