Indian shares ended largely flat on Friday as losses in both indexes on account of profit-booking were capped by gains in Sun Pharmaceutical Industries Ltd after its Halol plant received Voluntary Action Indicated (VAI) status from the U.S. health regulator.

Both indexes posted their third straight weekly gain, with the NSE index climbing 0.67 percent and BSE rising 0.61 percent for the week.

Shares of Sun Pharmaceutical Industries Ltd closed 8 percent higher after the U.S. Food and Drug Administration issued VAI status to the drugmaker's Halol plant, boosting confidence that the company would soon obtain clearance for the plant.