cancel
Showing results for 
Search instead for 
Did you mean: 

Error document.getElementById(...) in function 'SCMS_STRING_TO_XSTRING'

Former Member
0 Kudos

I want export informationu2019s in a document Excel, I use the follow code:

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

EXPORTING

text = texto

IMPORTING

buffer = xtexto.

wdr_task=>client_window->client->attach_file_to_response(

i_filename = 'wdp.xls'

i_content = xtexto

i_mime_type = 'EXCEL'

).

But I have a error:

document.getElementById(...) it is null or don't is object,

Please help me, thank in advance,

Lady

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Can you tell how you solve the problem?

Thanks.

Former Member
0 Kudos

WebDynpro Gurus good afternoon, I also have the same problem with document.getElementById (..).... that this is my code, someone can tell me I'm doing wrong please, thanks in advance to all.

method ONACTIONEVT_EXCEL .

DATA: t_excel TYPE zttei_det_ordcom,

wa_excel LIKE LINE OF t_excel,

texto TYPE string,

xtexto TYPE xstring.

wd_comp_controller->getexcel( IMPORTING l_excel = t_excel ).

LOOP AT t_excel INTO wa_excel.

CONCATENATE texto wa_excel-ebeln wa_excel-ebelp wa_excel-ventini wa_excel-ventfin

wa_excel-feclim cl_abap_char_utilities=>newline

INTO texto

SEPARATED BY cl_abap_char_utilities=>horizontal_tab.

ENDLOOP.

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

EXPORTING

text = texto

IMPORTING

buffer = xtexto.

wdr_task=>client_window->client->attach_file_to_response(

i_filename = 'ALIC.XLS'

i_content = xtexto

i_mime_type = 'MSEXCEL'

i_in_new_window = abap_true

"i_inplace = abap_false

).

endmethod.

Former Member
0 Kudos

Find the solution to the problem, thanks to all