2007 Sep 21 11:50 AM
hi,
data:num1 type num.
num type c.
loop at int_final.
int_final1-matnr = int_final-matnr.
int_final1-vkorg = int_final-vkorg.
int_final1-num1 = int_final-num.
collect int_final1 into int_final1.
endloop.
this case y this collect is not working.
vkr.
hi,
data:num1 type num.
num type c.
loop at int_final.
int_final1-matnr = int_final-matnr.
int_final1-vkorg = int_final-vkorg.
int_final1-num1 = int_final-num.
collect int_final1 into int_final1.
endloop.
this case y this collect is not working.
vkr.
2007 Sep 21 11:56 AM
collect int_final1 into int_final.
Message was edited by:
Karthik
2007 Sep 21 11:56 AM
it seems to me num is a number field but you declare as character type so it is not adding when it is getting repeating value of matnr and vkorg .
declare num as type i or type p it will work (except type C,N,D,T,X).
regards
shiba dutta
2007 Sep 21 11:57 AM
it should not be
collect int_final1 into <b>int_final1.</b>
it should be
collect int_final1 into <b>int_final.</b>
2007 Sep 21 11:59 AM
Hi,
see the code
loop at int_final.
int_final1-matnr = int_final-matnr.
int_final1-vkorg = int_final-vkorg.
int_final1-num1 = int_final-num.
collect int_final1 . " No need to write collect int_final1 into int_final1.
endloop.Regards
Sudheer
2007 Sep 21 12:00 PM
hi,
you should use the collect statement seperate seperate fields according with some keys....
we cannot collct all the fields...
try with seperately....
thanks,
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
2007 Sep 21 12:00 PM
Hi,
declare num as type i .It will work.also try like this
loop at int_final.
int_final1-matnr = int_final-matnr.
int_final1-vkorg = int_final-vkorg.
int_final1-num1 = int_final-num.
collect int_final1 .
endloop.
Regards,
Nagaraj
2007 Sep 21 12:04 PM
u r looping at int_final and y r u using int_final1 inside?
what is int_final1 ? is it work are? then ur loop should like below
<b>loo at int_final into int_final1.</b>
and collect as i mentioned above.
if there is no work area and the itab is with header line.
then
change all int_final1 to int_final
and write <b>collect int_final.</b>
2007 Sep 21 12:07 PM
Hi,
In your case 'NUM' and 'NUM1' should be declared as an interger vairable (either type 'I' or 'P').
COLLECT: will add the numeric fields for the same character field values.
For more information on Collect , see the F1 help..
Hope this helps you.
Regards,
Dilli
2007 Sep 22 3:34 AM
hi
you should declare as an interger vairable (either type 'I' or 'P'). after that write the code as:
loop at int_final.
int_final1-matnr = int_final-matnr.
int_final1-vkorg = int_final-vkorg.
int_final1-num1 = int_final-num.
collect int_final1 .
endloop.
regards,
praveen.
2007 Sep 22 12:32 PM
hi vkr,
you are collecting int_final1 into again int_final1 , that is not correct .
So write the code as,
loop at int_final.
int_final1-matnr = int_final-matnr.
int_final1-vkorg = int_final-vkorg.
int_final1-num1 = int_final-num.
collect int_final1 .
endloop.
<b>please reward points if helpfull</b>
with regards,
radhika kolluru.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |