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

Opening PDF File.

0 Likes
770

Hi ,

I am using function module CONVERT_ABAPSPOOLJOB_2_PDF. I have successfully created a PDF file . Now i want automatically this PDF file to be open.

My requirement is On the click of push button,

1. system generates some spool. - I have done this.

2. Convert this to PDF. - Done this too.

3. Launch a acrobat to open this PDF. ???

Please help me to acheive the point 3.

Thank you

Best Regards

Ankush

Hi ,

I am using function module CONVERT_ABAPSPOOLJOB_2_PDF. I have successfully created a PDF file . Now i want automatically this PDF file to be open.

My requirement is On the click of push button,

1. system generates some spool. - I have done this.

2. Convert this to PDF. - Done this too.

3. Launch a acrobat to open this PDF. ???

Please help me to acheive the point 3.

Thank you

Best Regards

Ankush

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
705

If your file has been saved to the frontend, use the following code.....



  CALL METHOD CL_GUI_FRONTEND_SERVICES->EXECUTE
    EXPORTING
      DOCUMENT               = <the_file_path_HERE>
      MAXIMIZED              = 'X'
      SYNCHRONOUS            = 'X'
    EXCEPTIONS
      CNTL_ERROR             = 1
      ERROR_NO_GUI           = 2
      BAD_PARAMETER          = 3
      FILE_NOT_FOUND         = 4
      PATH_NOT_FOUND         = 5
      FILE_EXTENSION_UNKNOWN = 6
      ERROR_EXECUTE_FAILED   = 7
      OTHERS                 = 8.

Regards,

RIch Heilman

Message was edited by: Rich Heilman

Read only

0 Likes
705

or use: interface I_OI_DOCUMENT_VIEWER

(sample: SAPRDEMOVIEWING)

Andreas

Read only

Former Member
0 Likes
705

Hi

Between step 2 & 3 save document to Frontend PC.

Then you can use the method mentioned by Rich.

Cheers