FOr a material i have two Bill of materials, but while raising a subcontractor purchase some times i have to use the 1st BOM and in other cases the 2nd BOM how to do this .
You can use production versions to asign alternative BOM to sc-vendors, But, as per my best knowledge, you cannot set automatically which alternative BOM to use during planning run concerning one sc-vendor. Manually you can choose the alternative BOM.
Please check OSS note 458606 and this link:
If the BOM is determined trough validity date or lot size, I think there's no problem, you can do your settings.