When Sen. John Heinz (R-Pa.) met privately with President Reagan in the Oval Office last month, he didn't show up to ruminate over the state of the economy or the affairs of the world.

The mission had a considerably narrower focus: Heinz wanted to appeal the flip of a coin.

The White House political office, exasperated by a long-running tug-of-war between Heinz and Republican Gov. Richard Thornburgh over who would get to host the $300-a-plate luncheon when President Reagan comes here for a pair of fund-raisers today, finally had resorted to a coin toss.

Heinz wound up with the consolation prize, the $250-a-head cocktail party. Because Pennsylvania's senior senator doesn't like finishing second best, he decided the matter merited one last personal appeal. He got his audience with Reagan on April 2, but didn't get the decision overturned.

Since then the elbowing between the state's two top Republicans has resumed, with enthusiasts in each camp reportedly trying to hold down the turnout at the other's event so they turn out the bigger haul.

"What you have," says Republican City Commiteee Chairman Donald Jamieson, struggling to stay clear of the cross fire, "is one of those classic little fights over the goodies."

For Thornburgh and Heinz, the spirited fund-raising rivalry could turn out to be the heaviest political combat either will face this year.

Both are unopposed in next Tuesday's primary; both are sitting on handsomely stocked warchests that are expected to be enriched by another quarter of a million dollars apiece after today's fund-raisers; both have approval/disapproval ratios of about 3 to 1 that most incumbents would kill for. Best of all, both will face Democrats in the fall who, while they are not well known, don't have much money.

All of Pennsylvania's first-rank Democrats chose to pass up this year's two statewide races, and that perhaps is the most persuasive testimony to the strength of the two incumbents.

Pennsylvania straddles the industrial northeast and the industrial midwest and has the problems associated with its geography: decaying cities, crumbling roadways; abandoned factories; a 10.7 percent unemployment rate and 650,000 more registered Democrats than Republicans.

Yet Heinz and Thornburgh are, by every pollster's account, surpassingly popular politicians. Both have positioned themselves as cautious, non-ideological, mistake-free and scandal-free public servants, with wet fingers ever-gauging the winds of public opinion.

"When Thornburgh vetoed an anti-abortion bill last year," says one admiring Democrat, "he managed to couch the issue in such a way that both the 'pro-lifers' and the 'pro-choicers' thought he was with them." He also pushed through a bill to pare the state's welfare rolls, yet still hangs on to some of the substantial support he has enjoyed among blacks.

The one possible dark cloud for the two is the economy and each is seeking refuge under a different umbrella. Heinz, who helped pass most of the Reagan economic recovery program last year, now is busily putting distance between himself and the president, calling for mid-course corrections and a deferral of the third-year, 10 percent tax cut.

Thornburgh, a latecomer to the Reagan cause in the 1980 campaign, has remained a staunchly faithful convert. He is one of the few big-state GOP governors who hasn't abandoned Reaganomics.

Nevertheless, Thornburgh has let it be known he will reevaluate Reagan's program in the fall--when, coincidentally, he will be in the thick of his reelection effort.

The likely Democratic opponents to Heinz and Thornburgh show no reticence in judging Reaganomics, but the question is whether they have the resources to get anyone to listen.

The Senate nominee is expected to be Allegheny County (Pittsburgh) Commissioner Cyril Wecht, a flamboyant orator known as something of a club fighter on the campaign trail. The conventional wisdom is that Heinz will win this fall, but he'll know he's been in a fight. Wecht has branded him a "silver spoon . . . incompetent" and blames him for the state's economic woes.

Wecht's problem is that outside of Pittsburgh, he is largely unknown, and inside of Pittsburgh, largely unliked. Last year he was tried on charges of using his former position as country coroner for personal gain. He was found not guilty, but a civil case arising from the allegations is still pending.

His fall tickemate for governor is expected to be Rep. Allen Ertel, a thoughtful, three-term congressman from the state's rural, conservative midsection who suffers from an even a lower statewide voter identification than Wecht. He, too, is hammering on the economic issues, claiming the state is on its belly while the governor "remains a leading cheerleader for Reaganomics."

Ertel also faces only token opposition in the Democratic gubernatorial primary, which may be a mixed blessing because contested primaries bring a candidate's name before the voters.

The two Democrats each just recently passed the $100,000 figure in fund-raising. Heinz and Thornburgh, meanwhile, are both fast approaching the $2 million mark and drawing interest at roughly the rate their Democratic opponents are raising money.

Heinz, who spent $2.6 million of his pickle-and-ketchup inheritance winning his seat in 1976, is so determined not to spend a single dime of his own money this year that he started raising money for this campaign four years ago.

Pennsylvania may be the most Republican state in the nation, with the GOP controlling the governor's mansion, both U.S. Senate seats, both houses of the state legislature and the congressional delegation. A Democrat hasn't been elected to the U.S. Senate in 20 years and the party has been sapped by nearly a decade of scandals during the 1970s.

One byproduct of this GOP dominance is in redistricting. Pennsylvania is losing two of its 25 congressional seats, and the legislature saw to it that they came out of the Democrats' hides. Two pairs of Democratic incumbents have been forced into primary contests in newly joined districts.

In western Pennsylvania, the race is between Reps. Don Bailey and John P. Murtha, two of the ablest and most popular members of the Democratic delegation.

They have nearly identical voting records: strongly pro-labor in an area of steel mills and coal mines. One issue is who has more clout in Washington, with Murtha stressing his ties to House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) and Bailey his service on the Ways and Means Committee, with its jurisdiction over revenue and Social Security.

The potential sleeper issue is one Bailey does not raise, but doesn't have to: Abscam. Murtha was not indicted and his conduct was cleared by the House ethics committee, but he did meet with the phony Arab sheiks and, after refusing bribes on several occasions, left open the possibility of doing business at a later date.

When Bailey took a noon-hour tour earlier this week through Johnstown's Central Park, in the heart of Murtha's part of the district, three different voters brought up the subject.

"I like Jack but he messed himself up with that sheik business," Jacob Salem told Bailey.

The other incumbent-vs.-incumbent squareoff is in Philadelphia between two newcomers who replaced Abscam congressmen, Democrats Michael (Ozzie) Myers and Raymond F. Lederer.

The combatants are Rep. Thomas M. Foglietta and Rep. Joseph Smith, a couple of street-wise, ethnic pols fighting over an inner city lunchbucket district of Italian, Irish, Polish and black neighorhoods.

Smith has most of the ward organization behind him, but the new district is more Italian than Irish, and in those neighborhoods Foglietta will pile up nice margins. Smith is a pro-labor, pro-military, fiscal conservative; Foglietta has been far more liberal, drawing a 90 percent rating from the Americans for Democratic Action.

Another issue hangs in the background of this race, one that carries a hulking 6 foot 2 inch, 250-pound frame and answers to the name of Frank L. Rizzo.

The former Philadelphia mayor, hinting strongly at a comeback bid next year, has come out of political retirement to campaign for Smith.

The current mayor, William Green, is supporting the other side, but quietly. He has discovered, as Rizzo did, that endorsements from City Hall can sometimes backfire.