SAN FRANCISCO (Reuters) - German software maker SAP AG has agreed to pay $120 million to help archrival Oracle Corp cover legal fees in a partial settlement of a Silicon Valley trial over theft of intellectual property, according to sources familiar with the agreement.