Food groups Nestle and CSM warned of a tougher second half due to rising costs but said price increases and forward buying will mitigate the impact of higher wheat and other commodity prices.

Switzerland's Nestle, the world's largest food group, cautioned on Wednesday of a more challenging input cost environment during the second half, while Dutch group CSM says it expects cost increases in a number of its raw materials.

But Vevey-based Nestle still raised its underlying sales growth target for 2010 and saw its profit margin rising, while the world's largest bakery supplies group, CSM, saw a rise in second-half profits after saying it will have to raise prices.

World wheat prices have risen sharply since the end of June due to drought in Russia, the world's third-largest exporter, hitting CSM's input costs while other commodities key to Nestle like coffee and cocoa are at high levels.

Despite rising costs, Nestle reported a 5.7 percent increase in first-half food and beverage underlying sales, just short of a company-compiled consensus of 5.9 percent. It upgraded its 2010 target to see growth of around 5 percent, while previously it aimed to beat 2009's 3.9 percent increase.

While Nestle should face commodity inflation in H2, we consider that some pricing and ongoing cost savings will more than offset this, said food industry analyst Andrew Wood at Sanford Bernstein.

The maker of Nescafe coffee, Kitkat chocolate bars and Buitoni sauces said price hikes and strong demand in emerging markets, particularly Latin America, helped boost sales in the first half, prompting it to raise its target.

This is an excellent set of figures....The company's portfolio means it can raise prices while others are cutting theirs, said Jon Cox, an analyst at Kepler Capital Markets.

Nestle Chief Financial Officer Jim Singh told an analysts briefing, For the second half we continue to see volatility in some raw materials and increased cost pressures. He kept his overall estimate that input costs will rise 2-3 percent in 2010.

Nestle shares rose 0.6 percent to 51.8 francs by 0930 GMT after gaining 2.6 percent this year and underperforming a 6.5 percent rise in the STOXX Euro food and beverage index <.SX3P>.

Overall group net profits rose 7.5 percent to 5.5 billion Swiss francs ($5.22 billion), with earnings per share up 13.5 percent to 1.6 francs.

Food industry rival like Unilever and Danone have also cautioned that higher raw material prices and weak demand in Europe would hit the second half of 2010 but Nestle said its savings program should more than compensate for input cost pressures.

Dutch CSM, which makes muffins and pastries for European and U.S. retailers, said it will raise its prices to offset higher raw material costs while it forecast higher second-half operating profit after first-half earnings beat estimates.

We remain cautiously optimistic for the second half of 2010...We expect to see a continuing challenging economic environment. In addition, we expect to see cost increases in a number of our raw materials, the group said in a statement.

But the company was upbeat on its ability to cope with raw materials prices, saying it was able to mitigate volatility in costs with its forward buying policy.

They've had a pretty good first half... but the outlook is cautious. There remains some uncertainty about input costs. You don't know where volumes are going if you pass on too many higher prices, SNS Securities analyst Richard Withagen said.

CSM shares dipped 1.5 percent to 20.89 euros. They have fallen more than 12 percent in the past month on concern about raw materials prices, especially wheat, but analysts have said CSM's history suggests the company should be able to pass on the higher commodity prices to its customers.

CSM reported first-half earnings before interest, tax and amortization (EBITA) before exceptional items of 102.5 million euros ($133.4 million) compared with the average estimate of 96.5 million from a Reuters poll of seven analysts.

(Additional reporting by David Jones; Editing by Michael Shields)