Skip to Content
author's profile photo Former Member
Former Member

file browsing

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 06:02 AM

    HI,

    I think you might want to clear the table IFILETABLE before the call method. This should probably help out.

    REWARDS IF HELPFUL!!

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      may be its showing this error as you are not using the CALL SCREEN statement, but using PAI and PBO modules in your program. Or, it may also happen if you are writing CALL SCREEN statement in your program, but there is no PAI and PBO available.

      The PAI and PBO modules should be supported by a Screen, which you call using the CALL SCREEN statement in your program, and create by Double Clicking on the Screen No. in the CALL SCREEN statement, which will take you to the Screen Layout, where you can design your Screen.

      Let me know if u require further information.

      Message was edited by:

      Aziz Shan

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.