2009 Jan 22 10:07 PM
Hello,
I am developing an application that integrates with EXCEL, I registered the object in the transaction smw0. I use the code below to recoup the archive in the SAP:
**************************************************************************
lt_query-name = '_OBJECT_ID'.
lt_query-value = 'ZNOVO.XLS'. " Arquivo.XLS
append lt_query.
call function 'WWW_GET_MIME_OBJECT'
TABLES
query_string = lt_query
html = lt_html
mime = lt_mime
CHANGING
return_code = lt_param-ret_code
content_type = lt_param-cont_type
content_length = lt_param-cont_len
EXCEPTIONS
others = 1.
call function 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lt_param-cont_len
filename = path
filetype = 'BIN'
TABLES
data_tab = lt_mime
EXCEPTIONS
others = 1.
CREATE OBJECT o_excel 'EXCEL.APPLICATION'.
SET PROPERTY OF o_excel 'Visible' = 1.
CALL METHOD OF o_excel 'Workbooks' = o_wrkbs.
CALL METHOD OF o_wrkbs 'Open' = o_workb
EXPORTING
#1 = path.
CALL METHOD OF o_workb 'Save'.
*********************************************************************
When I execute the program appears the following message of error:
Erro tpo.exec. UC_OBJECTS_NOT_CONVERTIBLE
Texto breve
Data objects in Unicode programs cannot be converted.
Program SAPLOLEA
Include LOLEAU10
Line 510
Type Module (FUNCTION)
Name Module AC_FLUSH_CALL_INTERNAL
text source
509 else.
>>>>> SYSTEM-CALL SOLID POINTER
511 MOVE RESULT_VARS_WA-POINTER FROM VARS-VALUE.
***********************************************************************
Im using SAP GUI 6.40
SAP VERSION: SAP ECC 6.0
What I can make?
Thanks !
Hello,
I am developing an application that integrates with EXCEL, I registered the object in the transaction smw0. I use the code below to recoup the archive in the SAP:
**************************************************************************
lt_query-name = '_OBJECT_ID'.
lt_query-value = 'ZNOVO.XLS'. " Arquivo.XLS
append lt_query.
call function 'WWW_GET_MIME_OBJECT'
TABLES
query_string = lt_query
html = lt_html
mime = lt_mime
CHANGING
return_code = lt_param-ret_code
content_type = lt_param-cont_type
content_length = lt_param-cont_len
EXCEPTIONS
others = 1.
call function 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = lt_param-cont_len
filename = path
filetype = 'BIN'
TABLES
data_tab = lt_mime
EXCEPTIONS
others = 1.
CREATE OBJECT o_excel 'EXCEL.APPLICATION'.
SET PROPERTY OF o_excel 'Visible' = 1.
CALL METHOD OF o_excel 'Workbooks' = o_wrkbs.
CALL METHOD OF o_wrkbs 'Open' = o_workb
EXPORTING
#1 = path.
CALL METHOD OF o_workb 'Save'.
*********************************************************************
When I execute the program appears the following message of error:
Erro tpo.exec. UC_OBJECTS_NOT_CONVERTIBLE
Texto breve
Data objects in Unicode programs cannot be converted.
Program SAPLOLEA
Include LOLEAU10
Line 510
Type Module (FUNCTION)
Name Module AC_FLUSH_CALL_INTERNAL
text source
509 else.
>>>>> SYSTEM-CALL SOLID POINTER
511 MOVE RESULT_VARS_WA-POINTER FROM VARS-VALUE.
***********************************************************************
Im using SAP GUI 6.40
SAP VERSION: SAP ECC 6.0
What I can make?
Thanks !
2009 Jan 22 10:13 PM
Welcome to SCN,
You may need to give CODEPAGE import parameter in fm GUI_DOWNLOAD. the dump say something related to unicode
please check fm documentation related to CODEPAGE
a®
2009 Jan 27 8:45 PM
Thanks for help a®s , but the problem was in the configuration of file.
2012 Jun 15 1:53 PM
Hello Bruno!
could you please give more information how did you solve this problem. I have the same one.
Best regards
Vladimir
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |