‎2013 Aug 06 2:23 PM
Hello everyone,
I am a new member on the site and I will post my first question on the forum.
the question is UNICODE, making the transaction UCCHECK I found a mistake in my program, the error is "have the same structure layout as" P_OC ", irrespective of the length of a"
Prog:
FORM creation_enreg_ef18 t_ef18 TABLES it_ef18 STRUCTURE
poste_oc STRUCTURE it_zipsnp
Expedition r_exped STRUCTURE
reception r_recept STRUCTURE
LIKE USING date_d p_dt_deb
date_f LIKE p_dt_fin
CHANGING STRUCTURE p_oc zreflivrek
p_oc_ref STRUCTURE zreflivrek.
........
IF IS INITIAL OR p_oc p_oc <> poste_oc. "ERROR"
CLEAR zreflivrek.
SELECT SINGLE * FROM zreflivrek
WHERE werks = werks poste_oc-
AND zzno_ordre = poste_oc-zzno_ordre.
p_oc = zreflivrek.
ENDIF.
do you have any ideas?
Regards
‎2013 Aug 06 9:41 PM
Hi,
p_oc should be of the structure zreflivrek.
CHANGING p_oc STRUCTURE zreflivrek
Thanks
Naren
‎2013 Aug 07 8:58 AM
Hello,
Thank you for your answer Narendran Muthukumaran.
In the first part of the program where there are a declaration p_oc structure is already reported:
CHANGING p_oc STRUCTURE zreflivrek
p_oc_ref STRUCTURE zreflivrek.
But the second structure is declared otherwise:
poste_oc STRUCTURE it_zipsnp
Do I have to change the type of poste_oc:
poste_oc STRUCTURE zreflivrek?
or I can make a comparison of the two structures without changing the type?
IF p_oc <> poste_oc.
Thank you in advance
‎2013 Aug 07 12:24 PM
HI,
The objective is that your actual parameters and formal structures should have the same structure.
In non unicode system before upgrade the structure might have been same a new field might may been introduced in the standard dictionary structure which is not same as the Z structure causing this mismatch.
Kindly check all the actual parameters and formal parameters in UC Check it might not always point to the exact error.
Regards,
Vasanth
‎2013 Aug 07 4:15 PM
Hi,
The issue you are facing is due to the structure mismatch between poste_oc and p_oc as
poste_oc is of type it_zipsnp and p_oc is of type zreflivrek.
Make sure that both the parameters have the same structure before using a comparison operator in an Unicode enabled object.
If you don't want to change the structure of them then you can compare w.r.t the fields within the structures.
Eg: p_oc-f1 <> poste_oc-f1,
p_oc-f2 <> poste_oc-f2 ....