Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Folder in Presentation Server

Former Member
0 Likes
389

There are several files within a folder . i will just mention the folder path and program will retreive data from all the files within that flder .

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
354

You can try


  CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
    EXPORTING
      directory  = p_pres
    IMPORTING
      file_count = file_count
    TABLES
      file_table = it_file
      dir_table  = dir_table
    EXCEPTIONS
      cntl_error = 1
      OTHERS     = 2.
  LOOP AT it_file .
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = it_file-pathname
    TABLES
      data_tab                = gt_upload
endloop.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
355

You can try


  CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
    EXPORTING
      directory  = p_pres
    IMPORTING
      file_count = file_count
    TABLES
      file_table = it_file
      dir_table  = dir_table
    EXCEPTIONS
      cntl_error = 1
      OTHERS     = 2.
  LOOP AT it_file .
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename                = it_file-pathname
    TABLES
      data_tab                = gt_upload
endloop.

Read only

Former Member
0 Likes
354

it is solving my problem ....but i will be very much helpful if you could tell me whether there is any class and method to meet the same requirement ....

Thanks for the ans