Fetch supplier names as drop down from an item

My doc type is ECP. ECP contains child table material_selection. Material_selection is linked with child doc type named ECP Materials. In ECP Materials there are 2 fields material and supplier_name_ecp. material is a link field and it is linked to Item Code DetailsDoc type. supplier_name_ecp is a select field. Now when material is selected, supplier_name_ecp should be auto populated. when supplier_name_ecp is only 1 it should get populated automatically. if it is more than 1 it should be selected by the user. supplier_name_ecp is available in SCM data doc type and material is also available. In SCM data ,material is item_code and supplier_name_ecp is supplier_name.