‎2007 Jan 10 5:52 PM
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.
‎2007 Jan 10 6:06 PM
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.
‎2007 Jan 10 5:58 PM
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>
‎2007 Jan 10 6:06 PM
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.
‎2007 Jan 10 6:08 PM
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
‎2007 Jan 10 6:52 PM
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
‎2007 Jan 10 8:40 PM
Pooja, the thread is seen as <b>answered</b>, i assume you still need solution...make it unanswered and you might expect more replies...
‎2007 Jan 10 6:13 PM
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
‎2007 Jan 10 8:44 PM