After seriously considering his first veto, President Carter yesterday signed into a law a controversial bill that denies automatic eligibility for veterans' benefits to some 16,000 Vietnam-era veterans who have had their military discharges upgraded.

Critics have assailed the bill as stripping away the practical value of Carter's upgrading program and said yesterday they would challenge the constitutionality of one provision of the law.

Presidential assistant Stuart Elzenstat told reporters at the White House that Carter was concerned about parts of the bill but finally decided against a veto. "It was a close question," Eizenstat said. "But this [automatic eligibility for benefits] was not the core of our program."

The purpose of the program was to give veterans who had less than honorable discharges a chance to get them upgraded. Veterans with so-called "bad paper" often have complained of having trouble finding good jobs.

About 60,000 of the 400,000 veterans with general or undesirable discharges applied for the upgrading review before the Carter program ended last week. About 23,000 have been processed so far, with some 16,000 approved for upgrading, a White House aide said yesterday.

A "side effect" of the upgrading program was automatic eligibility for veterans health and education benefits, Eizenstat said. But the bill Carter signed requires a case-by-case review for all 16,000 who have been upgraded, whether or not they plan to seek VA benefits.

One White House aide said that fewer than 100 of these veterans now receive such benefits. But the Rev Barry Lynn of the United Church of Christ, who has been lobbying against the bill, said yesterday that 2,300 such veterans have applied.

Lynn estimated that about half of the 16,000 holders of upgraded discharges will lose their eligibility when they undergo the new review process.

And he disputed Carter's claim that the bill "property recognizes the need for an equitable and compassionate attitude toward the many veterans who received less than honorable discharges."

"He talks about compassion, but we haven't seen it in the legislative history of this bill," Lynn said.

In his statement upon signing the measure, Carter noted "positive benefits" in the bill, including allowing all veterans, not just those from the Vietnam era, to apply to have their discharges upgraded.

The law also allows veterans with less than honorable discharges to qualify for health-care benefits for injuries suffered while on duty, the President noted.

Carter expressed his strongest reservations toward a provision that bars benefit eligibility to those whose discharges were upgraded who were absent for more than 180 days and thus technically considered deserters.

Carter said that "very few" veterans with upgraded discharges were in this category and the Veterans Administration could waive the barrier for mitigating circumstances. But he also said the provision "raises serious equal-protection problems" because it applies only to those upgraded under his program.

The Justice Department advised him, he said, that the provision "is probably unconstitutional."

Eizenstat said that this defect was not considered serious enough for a veto because the provision can be severed from the law if it is challenged and found unconstitutional.

The bill assigned, he said, was preferable to a measure sponsored by Rep. Robin Beard (R-Tenn.) that would have barred benefits eligibility for all veterans whose discharges were upgraded under the President's program.

Beard's amendment to an appropriations bill was knocked out after White House lobbyists agreed to accept a version of the Senate bill sponsored by Sens. Alan D. Cranston (D-Calif.) and Strom Thurmond (R-S.C.).

Eizenstat said the final version of the bill was "close" to the Cranston-Thurmond bill except for the ban on benefits for those absent from service for more than 180 days.

Lynn called this characterization "preposterous" and charged that the Senate conferees on the bill had caved in to "all the vindictiveness and nastiness of those on the House side who are still looking for the last scapegoats of the Vietnam war."

Eizenstat confirmed under questioning that some administration officials had recommended that the President veto the bill, but refused to verify reports that Defense Secretary Harold Brown had been among them. He did say that the decision memo to the President on the issue was the longest one prepared for any bill thus far in the Carter administration.