The 30-share index, which had lost 108.41 points in the previous session, rose by 29.80 points, or 0.14 per cent, to close at 21,856.22 points. It touched a day's low of 21,768.14 and a high of 21,965.95 points in a volatile trade.
The broad-based NSE Nifty edged up by five points, or 0.08 per cent, to 6,516.90.
"Nifty opened on a negative note and witnessed a volatile session today. Stock specific buying continued and profit booking was seen in most counters," said Rakesh Goyal, Senior Vice President, Bonanza Portfolio.
"Markets were seen ending on flat note as investors preferred to sit on sidelines ahead of IIP data and CPI inflation figure, which is due post market today," Jayant Manglik, President-retail distribution, Religare Securities Limited, said.
The under-current of the market remained strong on improving economic growth and discounted a weak global trend on slowing economic growth in China, brokers said.
Sun Pharmaceuticals Industries, which received US FDA approval for generic Temodar drug, was the biggest gainer among 30 Sensex scrips. It rose by 4.08 per cent.
Stocks of pharma and software industries were back in demand and recovered as rupee declined, brokers said.
Power equipment maker Bhel was the biggest loser with losses of 2.70 per cent. Tata Motors fell by 2.35 per cent while banking major SBI by 1.81 per cent.
In 30-BSE index components, 13 stocks gained while 17 ended with losses.
The healthcare sector index gained the most by rising 1.23 per cent to 10,219.97 followed by FMCG index by 1.22 per cent to 6,648.26.
The BSE Sensex edged higher on Wednesday, provisionally posting their sixth gain in seven sessions as drug makers and software services exporters such as Tata Consultancy Services (TCS) recovered from recent steep losses.
The benchmark BSE Sensex provisionally rose 0.18 percent, still within touch of a record high of 22,023.98 hit on Tuesday. The broader NSE Nifty rose 0.08 percent.
Tata Consultancy Services Ltd gained 1.2 percent.
BSE Sensex inches higher, not far from record highs
(Reuters) BSE Sensex edged higher on Wednesday, to post their sixth gain in seven sessions as drugmakers such as Sun Pharmaceutical and software services exporters such as Tata Consultancy Services recovered from recent steep losses.
Gains could accelerate after data late in the day showed consumer price inflation slowed more than expected to a 25-month low of 8.1 percent in February, helped by moderating food prices.
The sharp ease in retail prices should cement expectations the Reserve Bank of India would keep interest rates steady at its policy review on April 1 after aggressively tightening monetary policy from September to January.
"We have been seeing buying interest from overseas investors and supply is still in the market," said Suresh Parmar, head, institutional equities at KJMC Capital Markets.
"However, one should be careful in picking stocks," he added. "There are enough buying opportunities and at the same time we may see further selling pressure in metals and iron ore stocks."
The broader NSE index rose 0.08 percent, or 5 points, to end at 6,516.90, hovering near an all-time high of 6,562.85 hit on Tuesday.
The benchmark BSE index edged up 0.14 percent, or 29.80 points, to end at 21,856.22, not too far from a record high of 22,023.98 hit on Monday.
Foreign investors bought Indian shares worth 14.71 billion rupees ($241.5 million) on Tuesday, their 17th buying over the previous 18 sessions for a total of over $1.8 billion.
Exchange data shows foreign investors were net sellers on Monday, although traders say that the day was impacted as investors tendered shares as part of GlaxoSmithKline's open offer to increase its stake in the domestic unit to 75 percent from 64 billion rupees.
Among the top gainers on Wednesday were recent under-performers.
Sun Pharmaceutical Industries gained 4.14 percent, its biggest single day gain since Oct. 9, 2013, after slumping 7 percent over the previous four sessions.
Dr Reddy's Laboratories rose 0.33 percent.
Technology stocks, which went from top performers last year to struggling in recent weeks as the rupee recovered, were other strong gainers on Wednesday.
Tata Consultancy Services added 1.29 percent, but it is still down 4.3 percent for the month, compared with a 3.8 percent gain in the NSE index so far in March.
Wipro closed 1.23 percent higher.
But investors also continued to book profits in other recent gainers.
Shares in Oil and Natural Gas Corp fell 1.9 percent on profit-taking after gaining 8.8 percent so far this month.
Metal stocks continued to witness selling pressure for the third consecutive day with Tata steel losing 1.21 percent on continued concerns about China's growth prospects.
Hindalco Industries closed 2.26 percent down.
Shares of L&T Finance Holdings and Just Dial gained after their inclusion into the futures and option segment of the NSE.