General Motors, Corp. chairman Thomas A. Murphy gave the Carter administration's anti-inflation program a ringing endorsement today and said the world's largest auto maker will continue to abide by the wage-price guidelines and "urge others to do so."

Speaking to the company's annual meeting here. Murphy said the major element in the anti-inflation program is not the guidelines, but the government's commitment to cut spending, reduce budget deficits and overhaul costly "counterproductive" regulations.

As long as the administration remains committed to long-range policies to reduce inflation, Murphy said, "We feel that the rest of us, and particularly those of us in business and organized labor, can do no less than cooperate - and that means living within the established wage and price standards."

Murphy chided the press and radio and television for focusing attention "almost exclusively on the short term - on the wage and price standards - as if this one aspect by itself represents the total program. It does not.

"Standards by themselves would be useless," he said. "But coupled with strong no-nonsense monetary and fiscal policies that are anti-inflationary, the standards can be accepted. They have a beneficial effect on inflationary psychology."

Murphy's commitment to those standards may be tested by July when the company sits down to negotiate a new three-year United Auto Workers contract to replace the one that expires in September. Douglas Fraser, president of the UAW has said that as far as his union is concerned, the standards are dead.

President Carter has asked workers to hold wage increases to 7 percent or less and wants companies to keep their price increases half a percentage-point below the average for 1976 and 1977.

Murphy's reaffirmation was expected to be a shot in the arm to the administration. Earlier this week, Lewis Foy chairman of Bethlehem Steel Corp. said his company's ability to continue to comply with the guidelines is jeopardized by escalating costs of energy and labor.

Murphy also said there is no evidence of a recession, despite some economists' predictions. He also said the recent slowdown in car sales is not serious and he forsees continued growth in the economy for along time to come. "We are not entering a recession," he said.

Earlier this week, auto makers reported that sales in mid-May were sharply below those of a year ago. Murphy, in response to shareholders' questions, noted that sales a year ago were running at an annual rate of 12 million cars. Today, sales are at a strong rate of 10.8 million cars. "It is a pretty good sales rate. It just suffers by comparison with last year," Murphy told stockholders.

He reiterated his earlier forecast of record industrywide car and truck sales this year of about 15.5 million units, up from 15.4 million in 1978.

Attendance at the meeting was held down by cold, rainy weather. A planned demonstration against the company's business activities in South Africa was canceled.

But the issue of whether GM should do business in South Africa because of that nation's racial policies was debated a length at the end of the meeting, with one member of GM's board splitting with his colleagues to support, a shareholder proposal that would have forced the company to stop making sales of any sort to the country's police and military.

The shareholder proposals were defeated.

Proponents of one defeated shareholder proposal argued that by doing business in South Africa, General Motors inadvertently bolsters the apartheid regime in that country. Murphy replied that General Motors finds apartheid "abhorrent" and said he personnally told the prime minister of South Africa of his views last month.

But Murphy and the board said that General Motors can contribute more to breaking down South African racial policies by remaining in the country than by leaving it.

Board member Leon Sullivan, a black minister from Philadelphia, said that while General Motors is moving aggressively in the right direction, and he had voted to keep GM in South Africa for the time being, he supported a shareholder proposal that would have barred the company from making any sales to South African police or military services. He said such a move would be a "moral prod" to breaking down apartheid. CAPTION: Picture, General Motors President Elliott "Pete", Estes, left, and Chairman Thomas Murphy at annual meeting yesterday. UPI