05-13-2010 10:18 PM
Hi,
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'.
ENDIF.
*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.
Regards,
FChavez
Edited by: Rob Burbank on May 13, 2010 5:38 PM
05-14-2010 4: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,
Jerry
05-14-2010 4:57 PM
Run the rest and did work.
So we realized that the template wasn't properly uploaded.
Thanks!
FChavez
Edited by: Fiorella Chavez Valdivia on Dec 17, 2010 3:23 PM