Skip to Content
0
Former Member
Oct 23, 2006 at 04:12 AM

SUM OF ONLY ONE FIELD IN AN INTERNAL TABLE.

8 Views

Hi

DATA: BEGIN OF GT_INT_TABLE OCCURS 0,

LV_FIELD1(2) TYPE C,

LV_FIELD2(5) TYPE C,

LV_FIELD3(8) TYPE N,

LV_FIELD4(8) TYPE C,

END OF GT_INT_TABLE.

DATA: BEGIN OF GT_INT_TABLE4 OCCURS 0,

LV_FIELD1(2) TYPE C,

LV_FIELD4(8) TYPE N,

END OF GT_INT_TABLE4.

THE values for each field having 3 rows in IT GT_INT_TABLE are given below.

LV_FIELD1 LV_FIELD2 LV_FIELD3 LV_FIELD4

01 001 100025 254535

02 1001 45 245

02 1010 55 535

All I need to do is sum the LV_FIELD3 field for similar LV_FIELD1 in IT GT_INT_TABLE1 and append it to GT_INT_TABLE4 .

pls do give me a good solution. as collect statement is not working for this.

bye mac