FRANKFURT/LONDON (Reuters) - Germany's SAP announced upbeat results in the seasonally tough first quarter, saying it was gaining ground on competitors Salesforce and Oracle in the cloud and that its margin recovery was firmly on track.

SAP, Europe's largest tech company by stock market valuation, also raised its sales and profits guidance for 2018 to take into account the $2.4 billion acquisition of U.S. sales software firm Callidus that was announced in January.

Investors welcomed the results, with SAP shares gaining 2.7 percent in early trading - even as hardware-focused tech stocks suffered in Europe on growing signs that Apple latest iPhone is underperforming.

"We're gaining share fast and we're outpacing our toughest competitors pretty handily," Chief Executive Bill McDermott told reporters on a conference call, calling the results strong both at the top and bottom line.

SAP now expects total non-IFRS revenues at constant currencies this year of 24.8-25.3 billion euros ($30.3-$30.9 billion), representing growth of 5.5-7.5 percent, up from an earlier expectation of 5-7 percent growth.

McDermott, a hard-driving New Yorker who is Germany's highest-paid CEO, is leading SAP through a transition away from selling software licenses that generate up-front fees to hosted cloud services paid for by subscription.

Yet its cloud business, where quarterly revenues for the first time topped 1 billion euros, is still just a third the size of the legacy license operation and must grow rapidly for years to come to achieve comparable scale.

The key growth metric watched by analysts, non-IFRS cloud revenues at constant currencies, came in at 31 percent - clearing a 30 percent threshold set by Deutsche Bank ahead of the results as a 'buy' signal for the stock.

"SAP's performance at constant currency was quite remarkable, keeping in mind the tough comps from last year in mind," Baader Helvea analyst Knut Woller said in a flash note.

BACK TO FRONT

McDermott, with the Callidus deal, is beating a path from the back office - SAP's traditional domain - to outward-facing functions such as customer relationship management (CRM). He told reporters SAP would introduce a new strategy for sales and marketing tools at its annual customer conference in June.

"Our resolve has never been stronger to retake the CRM marketplace," McDermott told reporters, referring to Salesforce.com's core sales and marketing software franchise.

SAP has faced currency headwinds due to the strong euro, and both the company and analysts focus on key metrics after adjustment for currency effects to get an underlying picture of performance.

Had SAP reported in U.S. dollars, like its competitors, the growth numbers would have turned out even better, said Chief Financial Officer Luca Mucic. Cloud subscriptions, for example, would have shown year-over-year growth in the first quarter of 37 percent in U.S. dollar terms, he said.

"We grew faster than every 'best-of-breed' cloud (competitor) out there," McDermott said. "Faster than Workday, a lot faster than Salesforce, and a lot faster than Oracle."

Salesforce reported cloud subscription and support revenue grew 25.8 percent to $2.66 billion during its fourth quarter ended in January.

Oracle posted 33 percent growth to $1.15 billion in its cloud Software as a Service (SaaS) revenues during its third fiscal quarter ended in February.

Salesforce said it had 19.9 percent of the worldwide market for CRM applications in the first half of 2017, citing data from market research firm IDC. By the same measure, Oracle had 8.4 percent and SAP had a 6.1 percent share.

SAP's cloud growth accelerated outside the United States, with Germany and, to a lesser extent Britain, being highlights in Europe. In Asia, China and Japan stood out.

Mucic said that an expansion of 1.1 percentage points in operating margins in the first quarter boded well for SAP after a strong showing in the same quarter a year ago.

($1 = 0.8191 euros)

(Reporting by Douglas Busvine and Eric Auchard; Editing by Tom Sims/Keith Weir)

By Douglas Busvine and Eric Auchard

Stocks treated in this article : Apple, Salesforce.com, SAP, Oracle Corporation, Workday