‎2006 Oct 19 11:06 AM
Hi,
I have some common data in three internal tables. The fields in the 3 internal tables are same. It contains some common data and also some different data. Now i need to filter out the commom data among these three tables.
Based on one internal table data need to filter the common data from the remaining tables and disply them in the output list.
Let me know how we can do this.
Regards,
Ram.
‎2006 Oct 19 11:09 AM
Hi
You can loop on one internal table, read the other two internal tables with the values, if found, remove those records from respective internal tables.
See that you keep track of index of the records while removing.
Regards,
Raj
‎2006 Oct 19 11:09 AM
Hi
You can loop on one internal table, read the other two internal tables with the values, if found, remove those records from respective internal tables.
See that you keep track of index of the records while removing.
Regards,
Raj
‎2006 Oct 19 11:17 AM
Hi,
I have below internal tables.
<b>Advance_list1</b>
and the fields are:
Installation_Number
Installation_name
Lloyds_number
Country_of_operation
Superior_fun_location
Project_name
Responsible_unit
Status
and <b>Advance_list2</b> and <b>Advance_list3</b> with the same above fields. But the data will be different in all the three tables and contains some common data. Need to filter based on <b>Advance_list1</b> internal table.If there is no common data then should not disply anything in the output list.
Pls give me some input on this.
Regards,
Ram
‎2006 Oct 19 11:10 AM
for this,
a final table can be taken with structure of all required fields which has to be displayed in output list.
read one by one internal tables by checking condition and move the data to final table, so that what ever fields are duplicate in these internal tables need not be taken, and fields will be displayed once only.
‎2006 Oct 19 11:11 AM
Hi,
you can,
loop thru itab2.
read itab1 with key fields = itab2-fields.
if itab1 = itab2.
delete itab2 index lv_tabix.
endif.
endloop.
do the same for itab3.
‎2006 Oct 19 11:18 AM
Loop at advance_list1.
read table advance_list2 with key (all fields).
if sy-subrc = 0.
flag2 = 'X'.
endif.
read table advance_list3 with key (all fields).
if sy-subrc = 0.
flag3 = 'X'.
endif.
check flag2 = 'X' and flag3 = 'X'.
*Please note you can use OR instead of AND if it matches one
write required data.
endloop.
Message was edited by: Anurag Bankley
‎2006 Oct 19 12:10 PM
Hi,
Before carry out the exercise adv by the other forum mates why dont u do the following 1st if it is possible to do so.
delete adjacent duplicates from itab1 comparing all fields.
delete adjacent duplicates from itab2 comparing all fields.
delete adjacent duplicates from itab2 comparing all fields.
Cheers...
NB. Reward if it makes sense.