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

Function Module/Method for opening path on frontend

Former Member
0 Likes
2,014

Hi,

I am looking for an function module or a method of a class which can be used for opening (in windows) an explorer-window with a given path.

I don't wanna select any files of directories there, only opening the windows and processing the normal logic of the application.

Can you give me any hints how to do that?

Kind regards

Markus

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,019

Hi,

try this:

CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE

EXPORTING

DOCUMENT = 'C:\TMP\'.

in DOCUMENT set the directory you need.

Regards Dieter

3 REPLIES 3
Read only

Former Member
0 Likes
1,019

Sample Code:

data : file_table like table of SDOKPATH with header line .

data : dir_table like table of SDOKPATH with header line .

data : file_count type i ,

dircount type i .

parameters:p_dir(50) type c.

CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'

EXPORTING

DIRECTORY = p_dir

FILTER = '*.TXT'

IMPORTING

FILE_COUNT = file_count

DIR_COUNT = dircount

TABLES

FILE_TABLE = file_table

DIR_TABLE = dir_table

EXCEPTIONS

CNTL_ERROR = 1

OTHERS = 2.

write:/ 'no of files in the floder is : ', file_count .

skip 32.

loop at file_table .

write:/ file_table-PATHNAME.

endloop.

cheers

s.janagar

Read only

0 Likes
1,019

No,

this function module will bring me the filenames and sub-folders. I want to OPEN a Windows Explorer-window which shows the user what is in a given path.

Kind regards

Markus

Read only

Former Member
0 Likes
1,020

Hi,

try this:

CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE

EXPORTING

DOCUMENT = 'C:\TMP\'.

in DOCUMENT set the directory you need.

Regards Dieter