SAP loses bid to overturn $345 million patent judgment