Hi Bala
1. For ECC validation purpose, you can find it in SAP Program for respectine transactions. You can take help on abaper for this.
2. For MDG validations please refer to How to Check or Derive an Attribute Value in MDG Using BRFPlus and Check and derivation rules