Soviet President Leonid Brezhnev, attempting to scotch suggestions that his negotiating ability has been impaired by ill health, said today that he is fully prepared for an active and constructive summit meeting with President Carter in Vienna two weeks from now.

Brezhnev, 72, made his remarks on Hungarian television at the end of a largely symbolic three-day visit to Budapest. Apparently arranged at short notice, the visit was seen by Western diplomats as a dress rehearsal for the possibly grueling Vienna summit beginning June 15 and ending with the signature of a second strategic arms limitation treaty (SALT II) on June 18.

The Kremlin leader also tentatively welcomed a recent Chinese offer for talks aimed at improving seriously strained relations. Promising that the Soviets would give "serious and positive consideration" to a resumption in Soviet-Chinese talks, he added: "If the Chinese side really shows signs of sobriety, our response will be forthcoming."

The Chinese offer for talks reportedly was made at a meeting in Peking on May 5 between Chinese Deputy Foreign Minister Yu Chan and Soviet Ambassador J. S. Shcherbakov. The initiative, which was seen as a positive gesture rather than a major breakthrough, followed Peking's renunciation just two weeks earlier of a 30-year friendship treaty with the Soviet Union and bitter Soviet criticism of China's incursion into Vietnam.

Describing SALT II as 'the biggest step ever taken in the interests of curbing the nuclear arms race," Brezhnev said the Vienna summit could lead to an improvement not merely in U.S. Soviet relations, but in the entire international atmosphere. This improvement is necessary. Naturally, the meeting will cover international questions as well . . . In other words, we are going to Vienna fully prepared for an active and constructive dialogue and we hope that the American side will also have a similar approach," he declared.

Western diplomats interpreted the timing of the trip to Hungary as an attempt to demonstrate Brezhnev's stamina for a summit with President Carter.

Like Vienna, the Hungarian capital is 2 1/2 hours by plane from Moscow. But in contrast to the busy timetable planned for Vienna, this time the Soviet president's official activities were kept to a minimum and the talks were short and relaxed.

According to Yugoslav sources, Brezhnev lost his concentration and train of thought several times during two 90-minute sessions with President Tito in the Kremlin last month and briefly had to leave the room.

The source added, however, that Brezhnev's condition appeared to be stable and not as serious as some Western press reports have suggested.

In his television appearance today, Brezhnev seemed stiff and slow, but his words were less slurred than on previous occasions. Foreign observers said the broadcast may have been recorded several days ago in the Soviet Union to show the President at his best.

An accompanying speech by Hungarian Communist Party leader Janos Kadar was filmed against a different background - and in color rather than black and white.

By visiting Hungary, the Soviet leader was symbolically drawing attention to the East European country which could have most to lose if SALT II is not ratified by the U.S. Senate. Over the last 10 years, Hungary has pursued relatively liberal internal policies but Budapest officials argue that their freedom of maneuver depends to some extent on the state of U.S.-Soviet relations.

An influential Hungarian journalist explained: "A breakdown in detente would increase the pressure on us to fall into line. If the Soviet Union felt its security was in any way threatened, its first response would undoubtedly be to reimpose harsh ideological controls in Eastern Europe."

As it is, after initial reservations, the Kremlin now regards the Hungarian experiment with market-type incentives in the economy and political relaxation in a more favorable light. Since assuming power following the turmoil of the 1956 revolt, Kadar has shown he is capable of delivering that most prized of political gifts - stability. CAPTION: Picture 1, Soviet President Brezhnev, holding mascot of the Moscow Olympics, on a visit to Hungary, says he is ready for the Vienna summit. AP; Picture 2, Soviet President Leonid Breznev and Hungarian leader Janos Kadar sign a joint statement following talks. UPI