Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Summarization in table

Former Member
0 Likes
628

Hi experts,

Am having one table with 7 fields, in which 5 fields are numeric n remaining 2 are character.

In this table 1 field is "Description" which contents either "Agency" or "Non Agency" ,am having 10 record in the table in which 5 are Agency and 5 are Non Agency.

Now i want to summarize all records which are Agency n All records which are Non Agency.

In end of summarization i only want two record in table.

One for "AGENCY"

and Other "NON AGENCY".

There is no key in table.

thx in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
600

Hi

U can create a new internal table is equal to the yours table, then you can COLLECT the record of old table to the new one:

LOOP AT ITAB INTO ITAB2.
   COLLECT ITAB2.
ENDLOOP.

See the help for COLLECT statament

Max

5 REPLIES 5
Read only

Former Member
0 Likes
601

Hi

U can create a new internal table is equal to the yours table, then you can COLLECT the record of old table to the new one:

LOOP AT ITAB INTO ITAB2.
   COLLECT ITAB2.
ENDLOOP.

See the help for COLLECT statament

Max

Read only

0 Likes
600

I cant use COLLECT becoz collect will summarize all the record n i dont want all records to summarize.

Read only

0 Likes
600

And which record you need to elaborate?

Max

Read only

0 Likes
600

Thx everyone prob solved

Read only

0 Likes
600

Well

Close the post and write the solution you've used, so it'll be able to be used by somebody with a problem like yours in the future

Max