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

problem with file path

Former Member
0 Likes
968

I just capture the file path using fm f4_filename into one filed , then i displayed file path in a report. my requirement is when ever i click on that particular file path ,need to open that file and show . is there any option to open file path .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
920

yes u can raju,

in at user command event, write the following code..

path = <from f4_filename fm>.

CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = PATH      " take it as type string
minimized = 'X'       " dont pass anything if u dont want to minimize it..

.

Regards,

Sumit

Edited by: Sumit Nene on Feb 16, 2010 1:08 PM

10 REPLIES 10
Read only

Former Member
0 Likes
920

If you want to directly open a particular file from the presentation server, you could pass the file path to the method

cl_gui_frontend_services=>execute

Read only

Former Member
0 Likes
920

NO . u can process the file u can not open the file.

Read only

0 Likes
920

my requirement is open that particular file and show . is there any solution for this.

Read only

Former Member
0 Likes
921

yes u can raju,

in at user command event, write the following code..

path = <from f4_filename fm>.

CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = PATH      " take it as type string
minimized = 'X'       " dont pass anything if u dont want to minimize it..

.

Regards,

Sumit

Edited by: Sumit Nene on Feb 16, 2010 1:08 PM

Read only

0 Likes
920

Sumit Nene's reply is correct. I just checked it.

Read only

0 Likes
920

thank you to

Erik Peterson, Sumit Nene and all . my problem was solved.thank you

Read only

0 Likes
920

Hi to all

my file is on application server . how can i open that particular file .I used CL_GUI_FRONTEND_SERVICES=>EXECUTE, hopefully it is for presentation server . just give some idea about application server file. thank you.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
920

Please search in SCN

Read only

Former Member
0 Likes
920

Hi ,

You can use the class CL_GUI_FRONTEND_SERVICES=>FILE_open_DIALOG to open that file but here again you need to split the file path into different variable as per your req.

Read only

Former Member
0 Likes
920

hi raju, perhaps you should have cleared this at the start.

you cant directly execute a file of AS on PS.

what you can do is--

read file on AS using

OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT   "" path on application server. write "output mode" for writing data into file

then use GUI_DOWNLOAD to save it on your PS.

finally you use the solution in previous posts to execute the same file.

this would not work for all kinds of file types i am afraid.

Sumit