NELSON MANDELA can expect a hero's welcome in the United States. He has earned it. Trained as a lawyer, he fought by legal means for years to undo South Africa's system of racial oppression, turning to armed struggle only when he found that other avenues had been blocked. In 27 years of prison, he managed to project a clarity of purpose and a personal disinterestedness that grew to mythic proportions and made him the African National Congress' natural leader once President F. W. de Klerk, the whites' choice, decided to empower the black majority. Since his release in February, his evident openness to all races, his personal grace and his political touch have further come into view. He is also a rather frail 71, a fact that his American handlers, overwhelmed as they are by demands to be in his charismatic presence, must duly respect.

Mr. Mandela's trip is being organized not just as the celebration of a notable man and a just cause but as a campaign to ensure that foreign economic sanctions against South Africa are not eased until the ANC decides it has gotten the maximum bargaining advantage out of them. The issue is sharpened by the fact that the changes made so far by the South African government, though they unquestionably leave a long way to go, are already putting Pretoria in range of the sanctions release terms written into American law. Because of apartheid, the black community is still substantially fragmented and unorganized. As the ANC becomes better able to guide it internally, it will have less reason to rely on external sanctions as a negotiating tool -- and more reason to weigh their economic impact on blacks. But at the moment, the black community depends on sanctions considerably. Mr. Mandela's views will serve a developing American debate.

His views will also be attentively received on the subject of democracy. Mr. Mandela obviously has a personal commitment. This must be set against the fact that the ANC in its long underground years leaned in other directions. The organization has yet to demonstrate an incontrovertibly open attitude toward dissent within its own ranks and competition from other black forces. In the struggle against apartheid during the years when the prospect of change was bleak, these considerations did not seem urgent. Now that South Africa is on the verge of multiracial constitutional talks to write a new political order, the question of democracy becomes central.