Taking an opportunity to add another asset amid a bitter business-software battle, Oracle Corporation has offered to buy struggling rival BEA Systems Incorporated for $6.7 billion in its latest move aimed at another industry leader, SAP. Oracle announced its $17-per-share cash offer Friday, less than one month after billionaire investor Carl Icahn announced he had bought a large stake in BEA in hopes of forcing a sale of the troubled software maker. Icahn now owns a 13.2 percent stake in BEA, giving Oracle a potentially key ally in its latest effort to acquire the make of “middleware,” or computer coding that is commonly used on the internet to make applications interact more smoothly with information stored in databases. Oracle has sought to acquire BEA for years, but its offers were rejected. But now, BEA appears to have little choice in the matter, analysts said. Besides facing pressure to sell from Icahn, BEA also has been dealing with accounting troubles tied to its mishandling of past stock-option grants that has prevented it from meeting regulatory deadlines to file its quarterly and annual financial reports. The delinquency has threatened BEA's listing on the Nasdaq Stock Market and contributed to a sharp decline in its shares. Oracle's offer-a 25 percent premium above BEA's closing stock price Thursday-caused BEA shares to jump 33 percent on Friday.