Barely a year into her tenure as president of SAP SE’s North America division, Jennifer Morgan embarked on an initiative many companies remain skittish about taking on: erasing the pay gap between male and female employees.

But in the war for top talent, particularly in the tech industry, Ms. Morgan says doing nothing wasn’t an option. In late 2015, SAP hired the law firm Littler Mendelson PC to examine pay for its U.S. employees.

The...