Secretary General Javier Perez de Cuellar announced today that he would visit South Africa next week to try to resolve the outstanding issues blocking independence for the territory of Namibia, or South-West Africa.

But U.N. and South African officials conceded that the talks would not even touch on the major obstacle to an agreement: South Africa's insistence that the Namibian independence be tied to withdrawal of Cuban troops from neighboring Angola. Angola has insisted that the Cuban troops are necessary to maintain its security against rebels.

Instead, the objective of the secretary general and the African nations that urged him to undertake the talks is to tie up the other loose ends--the composition of the U.N. force that would keep the peace in Namibia during a transitional period and the voting method to be used in electing a government for the territory.

These are minor details, but the Africans and many Western diplomats fear that if they remain unresolved, South Africa would use them as an excuse for a further delay to Namibian independence even if an agreement is reached on the Cuban troops.

South African officials welcomed the talks with Perez de Cuellar--which would be the first visit there by a secretary general since Kurt Waldheim was in South Africa in 1972--as a symbol of the country's international legitimacy.

He is to arrive in Cape Town Monday and is expected to meet with Foreign Minister Pik Botha and Prime Minister Pieter W. Botha, who are not related. After three days of talks, Perez de Cuellar is to visit Namibia and meet with the South African administrator of the territory, Willie van Niekerk, who would share responsibility with him during the transition period under the arrangements already agreed upon.

Before leaving Africa on Aug. 28, the secretary general is scheduled to visit Angola for talks with government officials and leaders of the South-West African People's Organization (SWAPO), the Namibian liberation movement that has been fighting a 17-year war against South Africa for control.

Although South African officials maintained that all issues are open for discussion and no agreement is precluded, they indicated their reluctance to come to final terms on the details of the Namibian transition until after the Cuban troop presence in Angola is resolved.

One of the two issues to be discussed--the composition of the U.N. force--has been narrowed to a South African objection to the inclusion of a Finnish contingent because, the South Africans believe, the Finns are too subservient to Moscow.

The other is a decision that South Africa must make on whether voting for a Namibian government is to be by constituencies or by proportional representation. South African officials maintain that a decision either way would alienate friendly factions inside Namibia, so they see no need to create such friction until it is clear that the Cuban issue will be resolved.

But one of the secretary general's advisers said the real motive for delay is tactical.

It was this expectation of failure that caused several key advisers to urge Perez de Cuellar privately not to make the trip. In the end, he said, he wanted to "exhaust all avenues of negotiation" so no one could say he had not tried his utmost.

U.N. officials also were cautious because they feared a failure would damage the secretary general's own reputation, and thus his capacity to mediate other international disputes. One official conceded that both Perez de Cuellar and the United Nations "badly need a success, any success, at this moment."

The decision to hold the talks follows a May Security Council resolution that mandated him to consult the parties to the proposed cease-fire in Namibia.

During the past week, pressure on Angola has been increased by an escalation of military activities by an antigovernment insurgent force, the National Union for the Total Independence of Angola (commonly known by its Portuguese acronym UNITA), which has been backed by South Africa. The rebels have been fighting to overthrow Angola's Marxist government since independence from Portugal in 1975.