Attorney General Edwin Meese III denied yesterday that he had undercut State Department allegations of Mexican corruption in drug trafficking when he told Mexico the charges were not supported by the White House.

Meese continued the controversy involving the Justice Department, State Department and Customs Service in an appearance on ABC News' "This Week with David Brinkley."

"I didn't undercut the State Department at all," Meese said. "As a matter of fact, my views are shared directly by Secretary of State George Shultz and by all the other Cabinet heads that are knowledgeable about this matter."

At another point in the program, Meese said, "One of the things that particularly disturbed me about the reckless charges that were made by some people in Congress and by one of the unfortunate people in the Customs Service was that they implied that the whole government of Mexico was in league with drug traffickers. That simply isn't so. The present president, Miguel de la Madrid, has personally assured President Reagan of his efforts against drug trafficking."

In statements in recent months and in congressional hearings May 13, U.S. Customs Commissioner William von Raab said there was massive official corruption in Mexico and until it was curbed the problem of drug trafficking could not be resolved. He accused the governor of Sonora of owning four ranches that produce marijuana and opium.

Elliott Abrams, assistant secretary of state for inter-American affairs, backed up von Raab at the hearing, saying the United States had warned Mexico about "widespread drug-related corruption."

Last Thursday, Meese telephoned Mexican Attorney General Sergio Garcia Ramirez to say that the charges "don't reflect the views of the president, the U.S. government or the Department of Justice."

The White House declined comment on Meese's remarks Friday, and a State Department spokesman said he had no idea what Meese was talking about.

Yesterday, after denying he undercut the State Department position with the telephone call to Garcia Ramirez, Meese also appeared to challenge von Raab's accusation about the governor of Sonora. Asked if the governor is involved with drugs, Meese said, "Absolutely not."

In discussing U.S. policy, Meese said, "There is not one country -- in the free world -- that isn't cooperating with the United States in some way in trying to eradicate the drug crop in addition to drug trafficking.

"Now I've got to tell you that there are great problems in these countries with corruption, there are great problems with people who use drug crops for economic purposes . . . . But you've had more heads of the police agencies in Mexico fired, you've had more of them arrested and jailed in the last two or three years than we've had in the last 10 or 12 years."

Meese said the United States spends $1.4 billion annually to fight drug trafficking.

One program panelist critical of the U.S. effort was Sterling Johnson, special narcotics prosecutor in New York. "We're spending $300 billion plus on national defense, and the drug industry alone is $150 billion. Now that tells you something about a commitment to this problem," he said.