Skip to Content
0
Former Member
Jul 20, 2009 at 03:49 PM

Which is best approach or method to filter the records in this task ?

23 Views

I came across a unique situation to filter the set of records from internal table. I am providing the sample data for better understanding and can help in explaining the requirements.

Internal table structure:

Field1 Field2 Field3

500079 222 S

500079 222 H

500079 222 H

500079 2043 S

500079 222 H

500079 222 S

500078 222 H

500078 222 S

500078 222 H

500078 222 S

500078 2043 H

500078 222 S

500080 222 S

500080 222 H

500080 222 H

500080 2043 S

500080 222 H

500080 222 S

Requirements are need to get these set of records from this table, when the flow of records matching this condition

Field1 = '500079' ,

field2 value = 222 and field3 = 'H'.

next record in this case is for Field1 = '500079' , field2 value = 2043 and field3 = 'S'.

If this combination of two records appears in any set, we need to pick entire set based on field1.

Could someone suggest best method or approach to do this task?

Thanks for your help in advance,

Ratnakar