Skip to Content
author's profile photo Former Member
Former Member

Error in OLE2 Object when using Open method


When calling Method OPEN I've got a SY-SUBRC = 2, I'm trying to open an excel sheet that has been imported from the server to my pc, through the same report that's giving me trouble.

The thing is that in DEV client it works perfectly, but in PRD client won't.

I've checked User privileges and they're Ok, and tried it with different users too.

Here's the code:

*Abre Objeto EXCEL*
  CREATE OBJECT go_excel 'Excel.Application'.               "#EC NOTEXT
  IF sy-subrc NE 0.
    MESSAGE e000(38) WITH 'No se pudo iniciar un objeto'.

*Para que no muestre alertas o warnings*
  SET PROPERTY OF go_excel 'DisplayAlerts' = 0.             "#EC NOTEXT
  CALL METHOD OF go_excel 'WORKBOOKS' = go_workbook.

*Excel en fondo*
  SET PROPERTY OF go_excel 'Visible' = 0.                   "#EC NOTEXT

*Llamamos un libro excel*
  CALL METHOD OF go_workbook 'OPEN'
    EXPORTING #1 = gs_excel_temp.



Edited by: Rob Burbank on May 13, 2010 5:38 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 14, 2010 at 03:00 AM

    Hello FChavez,

    Perhaps you can first check in your PROD system whether excel is installed correctly there?

    or you can run test report SAPRDEMOEXCELINTEGRATION in PROD to see that report works or not...

    Best Regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.