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

Unicode Error

Former Member
0 Likes
735

hi all,

im getting a dump as UNICODE TYPES NOT CONVERTIBLE

READ TABLE I_INFSTR INDEX 1.

>>> SELECT * FROM (I_INFSTR-GENTAB)

INTO TABLE <V_VALUE>

WHERE VBELN IN S_VBELN.

how to correct it??

Points will be rewarded!!

thanks,

priya.

1 ACCEPTED SOLUTION
Read only

rahulkavuri
Active Contributor
0 Likes
697

hi I have a similar case, check this code and try whether this may work for u, award points if found helpful

FORM write_column USING tname TYPE c cname TYPE c.

DATA: dref TYPE REF TO data.

FIELD-SYMBOLS: <wa> TYPE any,

<comp> TYPE any.

CREATE DATA dref TYPE (tname).

ASSIGN dref->* TO <wa>.

SELECT * FROM (tname) INTO <wa>.

ASSIGN COMPONENT cname OF STRUCTURE <wa> TO <comp>.

IF sy-subrc <> 0.

EXIT.

ENDIF.

WRITE: / <comp>.

ENDSELECT.

ENDFORM.

7 REPLIES 7
Read only

rahulkavuri
Active Contributor
0 Likes
697

hi in unicode systems both the types should be the same, just check it once again

I mean the structure of both of them should be the same otherwise there will be a runtime error

this applies for MOVE statement as following in Unicode systems

MOVE applies for implicit Moves too:

Operations for internal tables:

LOOP AT itab INTO wa ...

Comparison between structures

Moving/Comparing Internal Tables: rules based on line types of tables

<b>

Database Operations with workareas:

SELECT * FROM dbtab INTO wa ...

SELECT * FROM dbtab INTO TABLE wa ...

UPDATA dbtab FROM wa ...

Award points if found helpful</b>

Read only

rahulkavuri
Active Contributor
0 Likes
698

hi I have a similar case, check this code and try whether this may work for u, award points if found helpful

FORM write_column USING tname TYPE c cname TYPE c.

DATA: dref TYPE REF TO data.

FIELD-SYMBOLS: <wa> TYPE any,

<comp> TYPE any.

CREATE DATA dref TYPE (tname).

ASSIGN dref->* TO <wa>.

SELECT * FROM (tname) INTO <wa>.

ASSIGN COMPONENT cname OF STRUCTURE <wa> TO <comp>.

IF sy-subrc <> 0.

EXIT.

ENDIF.

WRITE: / <comp>.

ENDSELECT.

ENDFORM.

Read only

Former Member
0 Likes
697

Hi Pooja,

The statement 'SELECT * FROM (I_INFSTR-GENTAB)

INTO TABLE <V_VALUE>' seems to be incorrect.

I_INFSTR-GENTAB is not a table but a field.

Besides, you are already using read statement to pick single record and then why do you again need to select value based on doc number (VBELN).

Note: Unicode types not convertible error comes when you are filling value from structure 1 to structure 2 but the fields in both the structure are not same.

The fields in both the structures should be same in unicode system.

Cheers,

Vikram

Read only

0 Likes
697

Hi All,

thanks for the replies....

CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE

EXPORTING IT_FIELDCATALOG = GT_FIELDCATALOG

IMPORTING EP_TABLE = D_REF1 .

ASSIGN D_REF1->* TO <V_VALUE>.

READ TABLE I_INFSTR INDEX 1.

SELECT * FROM (I_INFSTR-GENTAB)

INTO TABLE <V_VALUE>

WHERE VBELN IN S_VBELN.

I_INFSTR-GENTAB has the name of a table, i need the contents from that table into <v_value>.

declaring <v_value> as type any gives me error.

Anybody has the soln.???

hey vivek,

actually i did get a soln., but im not completely satisfied with it...

Message was edited by:

Pooja

Message was edited by:

Pooja

Read only

0 Likes
697

Pooja, the thread is seen as <b>answered</b>, i assume you still need solution...make it unanswered and you might expect more replies...

Read only

Former Member
0 Likes
697

Hi,

Try to give the type of <V_VALUE> as Type Simple or Any.

If problem not solved then please send the whole code, i will look into that.

Regards,

Aman

Read only

Former Member
0 Likes
697

Anyone has a soln.??