The American Broadcasting Companies Inc., the diversified communications company that owns the ABC television network, is expected to earn its second-highest profit this year despite the recession and its recent drop from first place in the prime-time television race.

The company has engaged in "a full program effort . . . to reverse this decline" in prime-time ratings, ABC Chairman Leonard Goldenson assured the company's stockholders at an annual meeting today.

"The competition between the television networks was unusually intense this season," Goldenson said. "While we did retain our leadership in total audience and in the demographic breakdowns most desired by advertisers, we did lose some ground in the highly visible area of prime time."

In addition, the increasingly drawn-out presidential election campaign and the crises in the Persian Gulf -- which coincidentally produced ABC's highly rated nightly Nightline new show -- have added to the television network's costs, Goldenson said.

On top of that, two new divisions, ABC Video Enterprises, which produces videotapes and discs, and ABC Motion Pictures, which is expected to complete its first in a limited series of motion pictures by next year, also will bring profits down in the short term, he told the stockholders.

"These businesses appear very promising, but they cannot be expected to return a profit in their early stages of development, and they won't do so," Goldenson said.

In the news personality area, a stockholder asked whether the network planned to replace interviewer Barbara Walters with CBS News' Roger Mudd who was recently passed over for Walter Cronkite's chair on the CBS Evening News.

Goldenson said ABC's news department "has had some discussions" with Mudd but that those talks haven't reached any conclusions. As for Walters, whose reported $5 million contract is up for renewal in about a year, Goldenson said she "makes a very fine contribution to this company." Goldenson added later that he hopes to renew Walters' contract.

Detailing some of the company's other financial woes, ABC President Elton H. Rule said attendance at the company's Leisure Attractions in Florida, Silver Springs and Weeki Wachee Springs, declined because of the gasoline crisis last year. Its third Florida park, Wild Waters, was profitable during its first full year of operation, Rule said.

To help boost its ratings, the company plans four hours of new programming for the 1980-81 season, including four half-hour comedy shows, an hour-long comedy-drama series and an hour-long wildlife information program, Rule said.

Despite all the financial gloom, the three-network economy is expected to grow from 13 percent to 15 percent this year.

"From all early indications, it will be a relatively good revenue year for broadcasters," Rule said. "In the past, broadcasting has proven to be one of the more robust segments of the economy during recessionary periods as both new and experienced advertisers recognize the necessity of advertising in order to maintain market shares."

In the nonbroadcasting areas, Goldenson reported in response to a stockholder question that the company may have lost between $50 million and $75 million on its record an tape division, which was sold more than a year ago, and during the year its publications side acquired McCall's Needlework & Crafts Publications.

The company also is cutting costs, such as by holding its stockholders' meetings in New York rather than Los Angeles at a savings of $150,000, he said.

"Despite the clouded outlook for the current year, ABC is in excellent financial condition," Goldenson said.

Goldenson and the ABC management were praised today by several stockholders, including a man who said he religiously watches the late night "Nightline" show started last fall to provide updates on the Iran crisis. The stockholder said his nephew is a hostage in Iran.

"I think you people have done a fabulous job," the man said about "Nightline." "I stay up every night watching it."