06-05-2008 9:10 AM
Hi gurus,
Is there any FM or command that We can open a pdf file from our computer , This means that Open pdf with Acrobat reader but will be triggered in ABAP .
Thanks
06-05-2008 9:24 AM
You Can use CL_GUI_FRONTEND_SERVICES=>EXECUTE to open files/documents on the presentation server. Do not provide the APPLICATION parameter, as such the PDF doucument will open with open with the default application as configured on your system.
Hope it helps.
~Berry
06-05-2008 9:15 AM
Hi,
Try the FM GUI_RUN .With this function module you can open the websites also.You have to provide the name of executable file for the application and the path.Path can be URL or your PDF file path.
06-05-2008 9:24 AM
You Can use CL_GUI_FRONTEND_SERVICES=>EXECUTE to open files/documents on the presentation server. Do not provide the APPLICATION parameter, as such the PDF doucument will open with open with the default application as configured on your system.
Hope it helps.
~Berry
06-05-2008 9:49 AM
Hi,
You can even use WS_EXECUTE function module.
Give the following 2 parameters to it:
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
DOCUMENT = 'X'
PROGRAM = C:\TEMP.PDF
Regards,
Ravi Kalapur
06-05-2008 10:30 AM
Hi,
First you need to download the pdf file onto the frontend computer then the MF WS_EXECUTE will do the job:
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
document = 'X'
program = path_document
EXCEPTIONS
frontend_error = 1
no_batch = 2
prog_not_found = 3
illegal_option = 4
gui_refuse_execute = 5
OTHERS = 6.
A good directory to download you file would be the SapWorkDir, I have seen in the standard that sap get this directory using WS_QUERY:
CALL FUNCTION 'WS_QUERY'
EXPORTING
query = 'CD'
IMPORTING
return = path_for_copy
EXCEPTIONS
inv_query = 1
no_batch = 2
frontend_error = 3
OTHERS = 4.
Hope it helps
Regards,
Renaud Wanschoor