Hi Bathula,
When you have to bring the data from different tables and with different criteria and at the same time if you need to do some calculations and some logic to be implement on the fetched data and there if there is no certain standard data source and you have to depend on customized data source.
Then you need to write a function module which you will achieve with this.
Regards,
Krishna Chaitanya.