Hii divya
First declare your final o/p table which containing all the fields you want
then declare separate internal tables for po data which is ekpo..
which contains field ebeln matnr
then use table mast for BOM item of each line item for all entries in ekpo with matnr as link.
loop mast internal and use read table concept to pass data from ekpo internal table to mast internal table with key field as matnr
pass value of ebeln in internal table of mast.
and then finally pass all the values to final o/p table.
hope this will help you out
Regards
Gaurav