08-07-2006 9:18 PM
Hi,
I am facing the following problem related to Unicode enabling in my program after the Version Upgrade from 4.6C to 5.0.
-
Before Unicode
-
data : P_innnn structure PRELP,
ps0009 like PS0009.
ps0009 = p_innnn-data1.
The above code works perfectly.
-
After Unicode
-
The above code is not working and it is showing an error while activation with following message.
"PS0009 and p_innnn-data1 are not mutually convertible in Unicode programs".
Please suggest a way to get the required fuctionality.
Regards,
Anirban
08-08-2006 12:13 AM
08-08-2006 1:56 AM
Unicode objects as it recognises that the PS0009 structure is 354 bytes wide but p_innnn-data1 is only 250.
As long as the first 250 bytes of ps0009 are structured identically to prelp-data1 you can use this:
field-symbols <f> type prelp-data1.
assign ps0009 to <f> casting.
<f> = p_innnn-data1.
If there are now differences between the structures you will probably get short dumps. If that happens you will need to find out exactly how data1 is structured.
08-08-2006 5:29 AM
Hi ,
If u r trying to pass one structure to anothr in a Unicode environment , we have to take care of the non-character type fields(fields which are not of types : C , D , N or T).
we have to pass the structure in 2 steps.
1)character type fields(till u come across some non-character field) can be passed or compared usually. (till that part using offset)
2)if we have some non-char type field in between u need to pass it field by field.
hope it helps,
Bye,
Uma.
08-25-2006 6:39 PM
just ina case you haven't figured it out already..You will have to use a method as follows..
<b>cl_hr_pnnnn_type_cast=>prelp_to_pnnnn</b>
~Suresh