Skip to Content
0
Former Member
Dec 14, 2007 at 12:27 PM

read/ loop through a dynamic internal table with a dynamic where clause

325 Views

Hi All,

We have a situation where we have two internal tables of similar type ( the tables are of dynamic type but we are at the part of the code where it is guaranteed that both the tables are of similar type ) . The table "A" contains the master details and table B contains partial details.

eg) Lets say table A has the following fields and data

FieldA FieldB FieldC FieldD FieldE

A1 B1 C1 D1 E1

A2 B2 C2 D2 E2

A3 B3 C3 D3 E3

A1 B2 C3 D4 E4

And table "B" has the following data ( fields are similar to table A )

FieldA FieldB FieldC FieldD FieldE

A1

C3

A2 B3

Each row of Table B acts as a "where clause" for the master table A.

The information required is the records of table A which satisfy the "condition" in each row of table B. Which would be the best way to approach it keeping the performance issue in mind ? In other words how to build a dynamic where clause to loop through Table A with the info available from Table B ?

Thanks and Regards,

Anil

A2 B3