‎2006 Aug 25 5:43 PM
hi all,
I amd upgrading SAP from 3.1I to ECC 5.0.
I am getting syntax error in ECC 5.0 for the statement---
SELECT * FROM CDPOS
INTO CORRESPONDING FIELDS OF TABLE ITAB_CDPOS
FOR ALL ENTRIES IN ITAB_CHANGES
WHERE OBJECTCLAS EQ ITAB_CHANGES-CDOBJCL AND
OBJECTID EQ ITAB_CHANGES-CDOBJID AND
CHANGENR EQ ITAB_CHANGES-CDCHGNO AND
TABNAME EQ ITAB_CHANGES-TABNAME AND
TABKEY EQ ITAB_CHANGES-TABKEY AND
FNAME EQ ITAB_CHANGES-FLDNAME AND
CHNGIND EQ ITAB_CHANGES-CDCHGID.
In the above statement(in ECC 5.0)
CDPOS-TABKEY is 70 char and ITAB_CHANGES-TABKEY is 254 char(ITAB_CHANGES is of type BDCPV) .
but in 3.1I BDCPV-TABKEY is 70 char.
It is giving syntax error that, both TABKEYs must have same type and same length.
can anyone suggest how to correct the statement?
thanks
Rakesh
‎2006 Aug 25 5:45 PM
Hi,
If you are using FOR ALL ENTRIES the column you are using should be of the same data type as the database column..
In this case the TABKEY in the internal table should be of the data type CDPOS-TABKEY..
Change the data type..It will work..
Thanks,
Naren
Message was edited by: Narendran Muthukumaran
‎2006 Aug 25 6:26 PM
I have worked on a similar kind of upgradation, they have to be of equal length if u need to compare them