SAP wins key ruling in long-running patent battle with Versata