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

Problem with UNICODE??

Former Member
0 Kudos
424

Hi @ ALL,

i am using a Code from another topic here in the forum ()

There is a solution but it is not working correct and i dont knwo why`??? The error message says this: ""The type of the database table and work area (or internal table) "WB_TAB" are not Unicode convertible."!"

Does anyone knows whats wrong?

Here is the Code:

If WBID is initial.

Select * from RSRWBINDEXT into table WB_TABLE

where OBJVERS = 'A' and LANGU = 'E'.

Sort WB_TABLE by TITLE.

ENDIF.

19. Select ‘OnInputProcessing’ from the drop down list.

20. Copy the following code into the ‘OnInputProcessing’ area:

  • event handler for checking and processing user input and

  • for defining navigation

CLASS CL_HTMLB_MANAGER DEFINITION LOAD.

DATA: tv type ref to CL_HTMLB_TABLEVIEW,

table_event type ref to CL_HTMLB_EVENT_TABLEVIEW.

DATA event TYPE REF TO IF_HTMLB_DATA.

event = CL_HTMLB_MANAGER=>get_event_ex( request ).

Case event->event_server_name.

when 'go'.

tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request

name = 'tableView'

id = 'tvX' ).

IF tv IS NOT INITIAL.

table_event = tv->data.

selectedRowIndex = table_event->SELECTEDROWINDEX.

*launch the workbook

DATA: wb_tab TYPE ZBINARY_table,

wb_line LIKE LINE OF wb_tab,

output TYPE string.

DATA: response TYPE REF TO if_http_response.

read table WB_TABLE index selectedRowIndex into WB.

WBID = WB-WORKBOOKID.

SELECT * FROM rsrwbstore INTO TABLE wb_tab

WHERE WORKBOOKID = WBID.

LOOP AT wb_tab INTO wb_line.

data: file_data type string.

file_data = wb_line-clustd.

CONCATENATE output

file_data

INTO output.

ENDLOOP.

file_mime_type = 'application/vnd.ms-excel'.

file_length = XSTRLEN( file_content ).

file_content = output.

response = runtime->server->response.

response->set_data( file_content ).

response->set_header_field( name = if_http_header_fields=>content_type

value = file_mime_type ).

response->delete_header_field( name =

if_http_header_fields=>cache_control ).

response->delete_header_field( name = if_http_header_fields=>expires ).

response->delete_header_field( name = if_http_header_fields=>pragma ).

response->set_header_field( name = 'content-disposition' value =

'attachment;filename=webform.xls' ).

navigation->response_complete( ). " signal that response is complete

RETURN.

ENDIF.

Regards,

M. Erbil

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
375

You should be able to go to attributes and 'unclick' unicode. This should resolve the issue.

4 REPLIES 4
Read only

Former Member
0 Kudos
376

You should be able to go to attributes and 'unclick' unicode. This should resolve the issue.

Read only

0 Kudos
375

Hello Erbil,

most probably the structure of database table and internal table differ somehow. Most likely one contains numberlike fields and the other one characterlike fields. In former times ABAP did an automatic conversion. But for Unicode enabled programs this is not possible.

If the structures have similar names I would suggest to use a select like

select * from <db> into corresponding fields of <itab> ....

If the names are not similar you may use dedicated assignments.

Best Regards

Klaus

Read only

0 Kudos
375

Hi Krista,

i cant find this setting?

Do you know where?

Regards,

M. erbil

Read only

0 Kudos
375

Hello,

look at the Weblog: <a href="/people/horst.keller/blog/2004/10/18/abap-geek-1--abap-program-attributes">ABAP Geek 1 - ABAP Program Attributes</a>.

Regards

Gregor