Sales Order to requisition (Calculate Plan)


I create a sales order with item(BOM) and explod them and after exploding 2 or 3 item is BOM, again explod them then total 50 to 60 lines are created. open the requsition worksheet and then calculate plan(in calculate plan report i already give the lookup of sales order from request form) .In sales order only one item is explod then calculate plan work perfectly and automatic calculate the quantity basis of (store Qty,Qty on sales Order,Qty on Purchase Order and saftey stock Qty).but problem is if one item explode and again 2 item is bom within and explod them then create a requisition then calculate plan then calculation of item is different and some item are can i handle this problem if any customization is required then how write a code.