Application Development 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: 

Moving Structure values in Unicode environment.

former_member219162
Contributor
0 Kudos

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

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I think you want to move the P_INNNN-DATA1 to a certain field of PS0009, yes? If so, then specify the field.

ps0009-<b>FIELD</b> = p_innnn-data1.

Regards,

Rich Heilman

former_member186741
Active Contributor
0 Kudos

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.

former_member202020
Participant
0 Kudos

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.

0 Kudos

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