Hi Deepak,
1) First select the all records from DSO from where you want look up and put into an internal table lt_data.
2) Sort and delete adjacent duplicates comparing key so you will be having unique records in the internal table.
3) In your DTP put the semantic key for these 2 key fields so for same keys data will come into same data package.
4) Loop at data package into field_symbol.
Read table lt_data into internal table where key fields
binary search.
if sy-subrc = 0.
Assign the value.
Endif
Endloop.
Hope this will help.
Best Regards,
Kamal