Indian president has approved a bill banning slaughter of cows and sale and consumption of beef in Maharashtra.