Originally Posted by mast_aadmi
I have a similar problem. I'm working with the table tccom100 as my main table.
Now i want to view only those business partners who have an entry in the table tdpur400. But the problem is that there are multiple records in the table tdpur400 with a single business partner and i'm not able to use the query.extend to return distinct records. As a result i have duplicate Business partner records. Is there any way to solve this.
You can have code in before.display.object or main.table.io section, where u can write a query on tdpur400 with set specification to select just one record.
and then if record not found u can skip current read on the main table.
u can use IN
clause with query.extension
query.extension = " where tccom100.bpid in (select tdpur400.bpid from tdpur400 where tdpur400.otbp = :tccom100.bpid as set with 1 rows) "