For the better part of a three-week election campaign downtown traffic come to a standstill in Lisbon and in Oporto, Portugal's second city, as enthusiastic motorcades and a succession of political happenings created a carnival atmosphere.

The festive mood prior to the voting Sunday has belied the importance of the issues. Voters will be called upon to choose between the three main parties -- the center-right Democratic Alliance, the Socialists and the Communists -- who have at different stages dominated the zig-zag course of Portuguese politics since a group of idealistic officers overthrew a right-wing, authoritarian government in April 1974.

All parties have proven exuberant masters of public relations. But not much has been said about how the next government, which will have a four-year mandate, will have to overhaul the constitution and send the military definitively back to the barracks.

Nor has a lot of time been spent on examining the challenges facing Portugal as it moves toward full membership of the European Economic Community. There has, however, been a lot of mudslinging.

The Socialists have made much of the fact that Prime Minister Francisco Sa Carneiro, the leader of Democratic Alliance, lives openly with a Danish divorcee and has separated from his Portuguese wife, the mother of his five children. Sa Carneiro's men hit back with the charge that the father of Mario Soares, the Socialist Party leader, was a de-frocked priest.

Sa Carneiro, who along with the Democratic Alliance narrowly won power in a snap election 10 months ago, has concentrated his and his party's fire on the orthodox Moscow line of the Portuguese Communists and the Marxist ambiguities of the Socialists.

The Communists are calling on the voters to "defend April" -- April being the code word for the revolution and the left-wing constitution to which it gave birth. The Socialists officially want "one government, one majority, one president," an instantly recognizable invitation to back the sitting president, Gen. Antonio Ramalho Eanes, by electing a government able to work closely with him. The Democratic Alliance offers a "secure government," which means not only returning Sa Carneiro to power with an increased majority but also going on to upset Eanes in the presidential elections due in December.

At the center of Portugal's endemic political problems is the open and mutual contempt that divides Sa Carneiro and Eanes.

Sa Carneiro is deeply committed to putting the clock back on the revolution. Since December 1979, his government has returned lands seized and occupied during the heady days of 1974 and 1975 to their original owners and has paid compensation to share-holders and industrialists affected by revolutionary takeovers. The government has also moved to reduce income tax, introduce incentives for the private sector and brought inflation down from 25 percent to below 19 percent.

Eanes has shifted from playing the part of the neutral broker to being the presidential candidate of the Socialists, not least because he has come under withering attack from Sa Carneiro.

The Socialists, and Sa Carneiro, broadly and officially agree with the Democratic Alliance on the need to overhaul the excesses of the revolutionary constitution, and there is little division on the need to ease the military out of politics. Both main parties back entry into the European Community and support Portugal's membership of NATO.

The divisions between Sa Carneiro and Eanes have grown since the last election and Sa Carneiro is already on record as saying that should he be reelected on Sunday, he would resign if Eanes is himself reelected next December in preference to Democratic Alliance's candidate.