Activist investor Elliott revealed a $1.3 billion stake in SAP on Wednesday and said it supported a new management efficiency drive, sending shares in the German business software company to a record high. Shares are up more than 12% in late afternoon trading.

SAP has until now escaped the attention of activist investors, as it's been steered by co-founder and Chairman Hasso Plattner, who has withstood tough competition from U.S. rivals and is still the biggest shareholder in the German company with 6.5 percent.

Yet SAP has never achieved the 40 percent profit margins that Microsoft boasted at its height. It reported an adjusted operating margin of 24 percent for the first quarter as it grapples with a catch-up transition to cloud computing.

Europe's most valuable technology company now wants to expand adjusted operating margins by a total of 5 percentage points through 2023.

"This is that magic moment that people have been waiting for where they are like, wow, nobody grows like SAP, but can I get some margin out of this growth?" Bill McDermott, the 57-year-old New Yorker who has run SAP for nine years, told Reuters.

"I think our shareholders are going to be super-psyched."

Boosting margins in the cloud — where SAP's subscription-based products are hosted remotely — is the holy grail for a company that still makes most of its money from license fees and maintenance for software running on customers' on-site servers.

The Elliott stake of around 1 percent in SAP is the first German technology investment by the $34 billion U.S. hedge fund group, which has also urged industrial conglomerate Thyssenkrupp to restructure and called on utility Uniper to agree to a takeover by Fortum.

Elliott technology-team partner Jesse Cohn and portfolio manager Jason Genrich have a track record of close involvement with the firms they back, with Cohn for example taking a board seat at online marketplace eBay as part of a deal with management on a strategy review and running activist campaigns at software firms EMC and Citrix.

"Elliott fully supports the initiatives announced today," Cohn and Genrich said in a statement.

"The company's shares were clearly undervalued in relation to its revenue growth, and today's announcement lays the foundation for substantial realization of value."

SAP's shares have underperformed rivals Oracle, Salesforce and Microsoft in the past 12 months. It trades at a forward price/earnings ratio of 21, compared to 58 at Salesforce, an all-cloud outfit, 25 at Microsoft and 15 at Oracle, according to Refinitiv data.

"SAP is in the fortunate position that a number of shareholders give us regular feedback – we welcome that feedback, which we take seriously, especially as we advance our plans to meet or beat our 2023 ambitions," SAP said in response to the Elliott investment.

Max Anderl, a fund manager at top 30 shareholder UBS Asset Management, said: "SAP is one of our biggest positions and relative to European peers attractively valued. We appreciate the exploration of new angles to create shareholder value."

The pivot by McDermott came as SAP reported a quarterly operating loss of 136 million euros due to an 886 million euro up-front charge arising from the announcement in January that SAP would let go of 4,400 people.

After adjusting for that and other one-offs, non-IFRS operating profits rose by 13 percent at constant currencies to 1.47 billion euros, above expectations in a poll of 17 analysts.

Chief Financial Officer Luka Mucic said the staffing exercise, only the second major restructuring since SAP was founded by Plattner and a group of former IBM colleagues in 1972, was on track.

SAP lifted its growth forecast for non-IFRS operating profits this year to 9.5% to 12.5% at constant currencies, while also nudging up its outlook for 2020.

SAP will update investors at a capital markets day on Nov. 12 in New York. It is eyeing a multi-year share buyback program as McDermott sets his sights on more than doubling the company's market capitalization to $300 billion.

Valuing the cloud side of the business at 10 times revenues — in line with industry peers — gives a figure of $200 billion based on projected 2023 revenues, McDermott said. Add to that a core revenue multiple of 4 to 5 times gives another $100 billion.

"It's just simple math," he told Reuters.

Additional editing by CNBC.