One of Africa's senior leaders, President Kenneth Kaunda of Zambia, came away from two hours with President Reagan yesterday saying the two men "share an abhorrence of the apartheid system" of South Africa and agree it should be ended quickly in the interest of peace, stability and harmony in the region.

Kaunda, the first president of a "front-line state" near South Africa to visit Washington in the Reagan administration, seemed happy about his meeting and luncheon at the White House, praising the "warm hospitality" and saying that a firm foundation had been laid for future relations.

Last October Kaunda said he had been shocked during a 1975 official visit when President Ford devoted only 45 minutes to discussions with him. On the other hand, Kaunda praised President Carter for spending six hours with him during a 1978 visit.

Previously Kaunda had been critical both of Reagan and his administration's policies, and openly indignant about reports that the administration considers South Africa to be a friend.

Speaking in London last Friday on his way here, Kaunda sharply attacked the U.S. support last year for a $1.2 billion International Monetary Fund loan to South Africa. The Reagan administration said it supported the loan on its economic merits.

"If there is a plan in western capitals to support South Africa at all costs, then you in the West are sitting on a volcano," Kaunda said in London. He added that if South Africa explodes "it will make the French revolution look like a children's picnic."

Another major topic in yesterday's talks, according to Kaunda, was the drive for the independence of Namibia, the South African-ruled territory that has been the subject of international negotiations for several years.

Most of the transitional arrangements for Namibia have been worked out through discussions between the parties involved. The main hangup now is the insistence of South Africa and the United States that withdrawal of Cuban troops from neighboring Angola be arranged in parallel to the withdrawal of South African forces from Namibia.

Last Friday, Kaunda said the link between Namibian independence and the Cuban withdrawal had brought on an "unnecessary deadlock." At that time he accused the Reagan administration of introducing an East-West confrontation into the Namibian issue.

After the White House meeting Kaunda told reporters without elaboration that he had explained his views on Namibia, and listened to Reagan's ideas. "We both believe that this is a serious problem to which an early solution is imperative," Kaunda said.

Reagan, for his part, described the problem of Namibia as a "vital issue," and said that both he and Kaunda look forward to celebrating the area's independence.

Reagan spoke of the "severe economic hardship" confronting Zambia because of the depressed prices for its copper and other minerals, and said a U.S. economic recovery should improve this situation. He also said, without being specific, that "our strong bilateral relationship will be maintained and will evolve as we continue to work together."

Immediately after saying goodbye to Kaunda, Reagan left to spend the rest of the week in California.

Zambia is applying to creditor nations for a rescheduling of its official debt, which is estimated at $3 billion. Previously it had asked commercial banks to reschedule the payments on its unofficial debt, estimated at $600 million.

According to unofficial reports, Zambia has applied for a $230 million loan from the IMF as the centerpiece of its debt-rescheduling program. A State Department official said the United States is taking a positive view of the application.