Hi GKR,
I believe you might have the complete logic to identify the Raw materials for which PO's are created and to which FG it belongs. You need to sort and re-arrange the fetched data based of FG before display. Please chek with Techncial person.
Thanks & Regards,
Ramagiri