‎2009 Dec 01 7:15 AM
Hi,
present i am working in upgrade project from ecc5.0 to ecc6.0
i am facing below error
When you use the addition "FOR ALL ENTRIES IN itab", the fields
"PRODH1" and "I_CUST-PRODH1+0(2)" must have the same type and the same
length.
its showing in below select query
SELECT KUNNR
PRODH1
DATBI
DATAB
FROM A570
INTO TABLE I_A570
FOR ALL ENTRIES IN I_CUST
WHERE KAPPL = C_KAPPL AND
KSCHL = C_KSCHL AND
KUNNR = I_CUST-KUNNR AND
PRODH1 = I_CUST-PRODH1+0(2).
the length of of PRODH1 legth 2 and char type .
in the i_cust-prodh1 is PRODH1(18) TYPE C,
in the old version its working fine in new version its getting error .
plz give me suggestion ...
Madhu
‎2009 Dec 01 7:20 AM
Hi ,
declare prodh1 of i_cust with lenght 2
i_cust-prodh1 is PRODH1(2) TYPE C,
Regards
‎2009 Dec 01 7:44 AM
You can move I_CUST-PRODH1+0(2) to a range of type A570-PRODH1
and then use prodh1 in ra_prodh
‎2009 Dec 01 7:50 AM
If you do so, you will "lose" the "binary condition".
In my opinion, the solution would be add a field to the FAE table, update that field in a LOOP, and change the WHERE condition to use that new field replacing the substring condition.
DATA: definition_of_I_CUST,
PRODH2(2) TYPE c,
endofdefinition_of_I_CUST.
* after fill I_CUST
LOOP AT I_CUST INTO w_cust.
w_cust-PRODH2 = w_cust-PRODH1(2).
MODIFY I_CUST FROM w_cust INDEX sy-tabix.
ENDLOOP.
SELECT KUNNR PRODH1 DATBI DATAB
FROM A570
INTO TABLE I_A570
FOR ALL ENTRIES IN I_CUST
WHERE KAPPL = C_KAPPL AND
KSCHL = C_KSCHL AND
KUNNR = I_CUST-KUNNR AND
PRODH1 = I_CUST-PRODH2.
‎2009 Dec 01 2:31 PM
Hi ksd,
can you explain clearly......
i tried to some of above answers ,it shows in some other place ..
like i decleared like data:prodh1(2) type c in i_cust-prodh1 internal table ...
plz give me solution
Madhu
‎2009 Dec 01 3:57 PM
Try it the hard way: declare the added field in I_CUST
TYPE A570-PRODH1Or go to SE11, check table/view A570 and declare your added field using the same data element than PRODH1.
I cannot give you the proper data element as A570 doesn't have that field in my system (version mismatch? missing include?)
‎2009 Dec 01 7:56 AM
Consider only first two characters of PRODH while filling internal table I_CUST
And keep data type of PRODH equal to C length 2 in both declarations.
‎2009 Dec 01 7:57 AM
You don't know if he needs the information of the whole field in I_CUST too. Adding a new field means no data loss.
‎2009 Dec 26 7:03 AM
‎2009 Dec 26 8:01 PM
>Total Questions: 8 (8 unresolved)
If your question is answered, then please mark it as solved.
Rob