‎2007 Sep 28 7:36 PM
Hi,
I am working in a Unicode enviornment. Here is my situation i have a lot of programs where in which we have coded like this way.
data: v_strcuture(80) type c.
types: begin of t_temp.
matnr like mara-matnr, " CHAR field
matkx like makt-maktx, " CHAR field
breit like mara-breit. " QUAN field
types: end of t_temp.
data: wa_temp type t_temp.
move v_strcuture to wa_temp.
In unicode the above said move statement will not work. For correcting these kind of errors i lam looking for COMMON program code to convert v_structure into wa_temp.
and vice versa ie from wa_temp to v_structure.
For example:
function module with 2 import parameters as V_STRUCTURE & WA_TEMP, and importing tables is contents of V_STRUCTURE and changing table (as output) will be WA_TEMP like that.
and also from WA_TEMP to V_STRUCTURE.
If anybody done this kind of requirement please give some hint
a®
‎2007 Sep 29 2:10 AM
You might take a look at class CL_HR_PNNNN_TYPE_CAST, methods PRELP_TO_PNNNN and PNNNN_TO_PRELP.
These move HR data from a PRELP structure (which has several long CHAR type fields) into individual infotype structures which all have different individual field layouts.
Have not got a system to check at present, but it seems like these methods do what you want and could be basis of a custom class.
Andrew
‎2007 Oct 01 4:25 PM
Andrew,
This is what i am looking for.
Thanks for your reply
a®
‎2007 Oct 01 5:07 PM