11-14-2007 3:50 PM
DATA : BEGIN OF IT_TAB occurs 0,
INTERFACE(50) TYPE c,
COUNTER(10) TYPE n,
END OF IT_TAB.
DATA : IT_TAB1 LIKE IT_TAB OCCURS 0 WITH HEADER LINE.
SELECT interface counter
INTO it_tab
FROM /insfoo/cu_COUTBL.
append it_tab.
ENDSELECT.
COLLECT it_tab into it_tab1.
Collect statment is not working ..
Itab values are as follow..
<b>interface counter</b>
field1 12
field1 14
field1 13
I need the it_tab1 as field1 39
Any help would be appreciated..
thanks in advance..
11-14-2007 3:52 PM
use COLLECT it_tab into it_tab1.inside select...endselect
reward if it helps,
Satish
11-14-2007 4:41 PM
11-14-2007 4:44 PM
Have you commented Append Statement after keeping Collect inside select..endselect?
Regards,
Satish
11-14-2007 4:53 PM
11-14-2007 3:53 PM
SELECT interface counter
INTO it_tab
FROM /insfoo/cu_COUTBL.
<b>COLLECT it_tab.</b>
ENDSELECT.
No need to use it_tab1.
Regards,
Atish
11-14-2007 4:54 PM
Do it like this:
DATA : BEGIN OF IT_TAB occurs 0,
INTERFACE(50) TYPE c,
COUNTER(10) TYPE n,
END OF IT_TAB.
DATA : begin of it_tab1 occurs 1,
INTERFACE(50) TYPE c,
COUNTER(10) TYPE i, " <<< this should be type i, p, f to collect
end of it_tab1.
SELECT interface counter
INTO table it_tab "<< table
FROM /insfoo/cu_COUTBL.
LOOP AT ITAB
COLLECT it_tab into it_tab1. "<<
ENDLOOP.
Regards,
Naimesh Patel
Message was edited by:
Naimesh Patel