Shares of enterprise software company ServiceNow fell as much as 15% after hours on Tuesday after the company said Bill McDermott, who recently stepped down as CEO of SAP, is joining ServiceNow later this year to become its new CEO. ServiceNow stock is now down about 5%.

John Donahoe, the current CEO, is leaving ServiceNow to replace Mark Parker as CEO of Nike, according to a statement.

Donahoe, who is set to start as Nike CEO in January 2020, will stay on as CEO through the transition, and he will keep his seat on ServiceNow's board until his term ends in June 2020.

Donahoe replaced Frank Slootman as ServiceNow CEO in 2017. Donahoe, the chairman of PayPal, was previously CEO of eBay. "A year from now, John's not going to be around," Slootman said on CNBC's "Squawk on the Street" at the time.

ServiceNow shares have risen 161% during Donahoe's tenure as its CEO.

McDermott, 58, spent 17 years at SAP and became co-CEO in 2010. He became sole CEO in 2014.

"I am excited, and I will do something at some point, and that will be discussed at a future date and on a future occasion," McDermott told reporters on a conference call on October 10, when SAP announced his departure.

Also on Tuesday ServiceNow provided preliminary third-quarter results and full-year guidance. The company reported $885.8 million in revenue for the quarter. Analysts polled by Refinitiv had been looking for $885.0 million. ServiceNow said it expects $3.240 billion to $3.245 billion in subscription revenue for all of 2019. The midpoint of that range is below the $3.253 billion FactSet consensus estimate.

ServiceNow shares are up 28% since the beginning of the year.

WATCH: SAP's Bill McDermott explains his decision to step down as CEO