Manoj,
I am not sure about any enhancement for your requirement at this point in time but I would suggest a alternate way so that it may helpful to you.
From MAST table get the BOM number STLNR with inputting the material and plant(you could give multiple plants too).
Then from STPO table with inputting only the BOM number as it would be different for different plants you can get component IDNRK.
You can extract both tables data and with Vlookup you can club Material,Plant.BOM number and Component data.
BR
KK