05-26-2008 10:49 AM
Hi All,
We are undergoing through non-unicode to unicode conversion in 4.7.
While correcting programs i have come across error code MESSAGEG!2 , which says
"RECORD_TAB" and "ZHTLPRJ" are not mutually convertible. In Unicode programs, "RECORD_TAB" must have the same structure layout as "ZHTLPRJ".
In my code I have this statement, RECORD_TAB = ZHTLPRJ.
where RECORD_TAB -> structure (SEAHLPRES)
ZHTLPRJ -> ztable
How to equate two different structures in unicode conversion environment?
Please help me out to resolve this issue..
Many Thanks
Priya
05-28-2008 5:48 AM
Hi,
Check this it will help you
wa and ext are different structures.
ext = wa
the below function module is to assign wa to ext structure, but a constrain is both the structures should not have lraw datas type
CALL METHOD CL_HR_PM_TYPE_CAST=>STRUC_TO_STRUC
EXPORTING
P_SC_STRUC = wa
IMPORTING
P_DEST_STRUC = ext.
06-10-2008 10:50 AM
Hi,
The thing is one of element is one of structures is not a character it may be of type P, X so see that field and declare as a character
The above solution is valid only if the field is not used for mathematical operations globally i.e., the field should not be used for any addition, subtraction and so on in the entire program.
Thanks.
09-18-2008 6:32 AM
Hi,
Check this it will help you .
When two structures are incompatible. By using the following Classes we can make it compatible.
*Example*
Error faced while Unicode syntax check :
SRTFDLOW and "XSRTFDLOW" are not mutually convertible in a Unicode
Resolution:
CLASS CL_ABAP_CONTAINER_UTILITIES DEFINITION LOAD.
DATA: LV_TAB(1000) TYPE C.
CALL METHOD
CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = XSRTFDLOW
IMPORTING
EX_CONTAINER = LV_TAB
CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C
EXPORTING
IM_CONTAINER = LV_TAB
IMPORTING
EX_VALUE = SRTFDLOW.
09-18-2008 6:36 AM
Hi,
Check this it will help you .
When two structures are incompatible. By using the following Classes we can make it compatible.
Example
Error faced while Unicode syntax check :
SRTFDLOW and "XSRTFDLOW" are not mutually convertible in a Unicode
Resolution:
CLASS CL_ABAP_CONTAINER_UTILITIES DEFINITION LOAD.
DATA: LV_TAB(1000) TYPE C.
CALL METHOD
CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = XSRTFDLOW
IMPORTING
EX_CONTAINER = LV_TAB
CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C
EXPORTING
IM_CONTAINER = LV_TAB
IMPORTING
EX_VALUE = SRTFDLOW.
09-22-2008 8:11 AM
To move the contents between two structures, we need to follow the below code.
Before Unicode:
LVBAP[] = ORD_VBAPINFO[].
Resolution:
LOOP AT ORD_VBAPINFO.
MOVE-CORRESPONDING ORD_VBAPINFO TO LVBAP.
APPEND LVBAP.
ENDLOOP.
10-10-2008 11:37 AM
you need to check the structure and pass field by field.
Example
RECORD_TAB+0(1) = ZHTLPRJ-fieldname1.
RECORD_TAB+1(4) = ZHTLPRJ-fieldname2.
so on till all the fields
12-08-2008 11:28 AM
Hi Priya,
try this..
FIELD-SYMBOLS: <unicode_x1> TYPE x,
<unicode_x2> TYPE x.
ASSIGN ZHTLPRJ TO <unicode_x1> CASTING.
ASSIGN RECORD_TAB TO <unicode_x2> CASTING.
MOVE <unicode_x1> TO <unicode_x2>.
02-06-2009 5:33 AM
http://help.sap.com/saphelp_nw04/Helpdata/EN/79/c554d3b3dc11d5993800508b6b8b11/content.htm
here u will find a complete soulution
02-16-2009 11:42 AM
Hi priya sharma,
above given link will defently work fine.
please make sure to appreciate for the correct answer by rewarding points.
so that the contribution will be good from either of the side.
Thanks
Vinod