American Broadcasting Companies Inc., one of the nation's three major television network owners, announced an agreement last night to acquire the publishing house of Macmillan Inc. for $340 million in stocks and bonds.

The proposed takeover was the second major book publishing acquisition announced by ABC this year, and the Federal Trade Commission is expected to take a close look at the potential for mass communications media ownership concentration created by the combination. ABC acquired the Chilton Co., a large magazine and book publisher, in August.

Macmillan's board, which earlier had tentatively accepted a takeover bid by the toy firm, Mattel Inc., approved yesterday's ABC offer.

Under an agreement in principle, ABC will issue about 7.5 million shares of $2.125 cumulative preferred stock that can be redeemed at $25 a share, for about 55 percent of Macmillan shares on a one-for-one basis.

In addition, ABC would issue about $153 million of 10 percent subordinated debentures for the balance of Macmillan stock on the basis of $25 principal amount for each Macmillan share.

Outstanding Macmillan $1.20 preferred stock and $2.50 preferred stock would be treated in the acquisition as if they were converted into 1.5 and 1.16 shares, respectively, of Macmillan common stock. Macmillan now has about 13.5 million outstanding common shares or equivalents.

ABC said the transaction would be structured as a tax-free reorganization for Macmillan stockholders who received ABC preferred stock only.

Macmillan generated sales of $208 million from book publishing last year -- with about half the total coming from textbooks. The firm's overall sales were $554 million, including revenues from such subsidiaries as the Berlitz language schools, Katharine Gibbs Schools, Brentano's book stores and Gump's, a San Francisco specialty chain.

ABC owns a number of other book firms and publications, including High Fidelity, Modern Photography, Prairie Farmer and Los Angeles magazines.