‎2007 Nov 17 5:52 AM
Hi,
I am getting error for unicode check for below statement...
DO VARYING BHDGI-HF FROM BHDGI-T1+0 NEXT BHDGI-T1+1.
IF BHDGI-HF <> SPACE OR BHDGI-INDEX GE 70.
EXIT.
ENDIF.
BHDGI-INDEX = SY-INDEX.
ENDDO.The Error is <b>"BHDGI-T1" and "BHDGI-HF" are type-incompatible.</b> .
The data type of "BHDGI-T1" is...
data : BHDGI-T1(70) TYPE C.
The data type of "BHDGI-HF" is....
DATA: BHDGI-HF(1) TYPE C.
If we try to remove a Unicode check of the program, no error is getting.
If we try to put the check again then we are getting above error.....
In fact we are upgrading our system from 4.7 to ECC 6.0. So we need to put a Unicode check before upgrading a system, that we can reduce the technical issues after upgrade of the system.....
I have tried with number of options of changing the type of above variables, but not getting way to come out of it....
Any other option or any replacement of the above code. or suggetions....
Kindly advice above issue..
Thanks in advance....
Regards,
Cheers,
Sagun Desai.......
‎2007 Nov 17 5:55 AM
hi try givin complete offset.for ex:BHDGI-T1+0(70).You have to mention complete offset in Unicode systems
‎2007 Nov 17 5:59 AM
Hi
ABAP and Unicode
From Release 6.10, ABAP supports multi-byte coding for characters in Unicode. Prior to Release 6.10, ABAP used only character sets that were based on single-byte codes such as ASCII and EBCDIC or double-byte codes, such as SJIS and BIG5.
This switch to Unicode affects all statements where an explicit or implicit assumption is made about the internal length of a character. If you use these statements in a program that is designed to exploit the Unicode capabilities of the runtime environment, they must be checked and changed if necessary. Once a Unicode-enabled program has been changed accordingly, it behaves in the same way in both Unicode and non-Unicode systems. You can develop programs in a non-Unicode system (NUS) and then import them into a Unicode system (US). The following sections describe the conversions that are necessary:
ref<b>er this link you will find much info</b>
http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
<b>examples</b>
http://help.sap.com/saphelp_erp2004/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
<b>reward if usefull</b>
‎2007 Nov 17 6:25 AM
DO VARYING BHDGI-HF FROM BHDGI-T1+0(1) NEXT BHDGI-T1+1(1).
IF BHDGI-HF <> SPACE OR BHDGI-INDEX GE 70.
EXIT.
ENDIF.
BHDGI-INDEX = SY-INDEX.
ENDDO.
it may wok
regards
shiba dutta
‎2013 Aug 14 4:27 PM
Hi,
I have the same probleme as sagun desai but with x Type and no c Type !
Error is : "WT_FICOUT-Z_EE" and "STR " are type-incompatible
My code is :
DO len TIMES VARYING str FROM wt_ficout-z_ee NEXT wt_ficout-z_ee+1.
Str is declared like this :
DATA: BEGIN OF str,
hex TYPE x,
END OF str.
And wt_ficout :
DATA : BEGIN OF wt_ficout OCCURS 5,
z_ee(80),
END OF wt_ficout.
Thank you for your suggestion !
‎2013 Aug 16 6:47 AM
This code seems to be finding the first non-blank character in BHDGI-T1, putting it in BHDGI-HF and setting its index in BHDGI-INDEX.
I think you can achieve that by:
* this puts the offset of the first non-blank in sy-fdpos
if BHDGI-T1 co space.
endif.
* set index variable
BHDGI-index = sy-fdpos.
* set BHDGI-HF value
BHDGI-HF = BHDGI-T1+BHDGI-index.