Have a look on this FMS :
SELECT T0.[U_Drg_No] from oitm t0 inner join por1 t1 on t0.itemcode = t1.itemcode
where t0.itemcode =$[por1.itemcode]
This is working properly only for child items, If Production Items comes( BOM Code) then this FMS is not returning any data.
For Example . If Item Code is not a BOM Code then its working if Item Code Also a BOM Code with Drg. No. then FMS is not returning data.
I am sorry if My details creating some confusion.
Plz help with needful changes.