The Japan-United States battle over trade has entered an ugly phase that is worrying level heads on both sides. For example, Commerce Secretary Malcolm Baldrige made the mistake of demanding that Japan change its culture so as to accept more American imports.

And a key Japanese trade official countered with the warning that Japan could be pushed into replacing Western trade with sales to the Communist bloc. Japan, said Kazuo Wakasugi, "cannot commit suicide."

Baldrige later apologized, explaining that he meant to talk about "structural" rather than "cultural" change. Presumably, what Baldrige had in mind is that in Japanese society the distribution system tends to discriminate against imports of finished goods because most of its retail outlets are small, selling only domestic goods. There is no nationwide chain-store system comparable to a Sears Roebuck that imports heavily from all over the world.

So the Baldrige comment, even if thoughtless in its first phrasing, has some basis in fact. Yet, even if the Japanese government abandoned all trade barriers by edict, almost everyone agrees that there would be no sudden penetration of the Japanese market by foreign manufactured goods. Such basic changes take a long time.

Totally inexcusable was a slur by Rep. John D. Dingell (D-Mich.) who reportedly said in a closed-door caucus that "the little yellow people" had penetrated the U.S. auto market by unfair means. Dingell's office issued a statement saying that he "had never intentionally indicated any disrespect for the Japanese people or any other racial group." (Dingell refused my requests to discuss this matter.)

But any racist undertone is a matter for concern. Brookings scholar Philip Trezise raises the question whether the United States would now be launching a national security investigation of the semi-conductor market if it were, say, the British--not the Japanese--who had so successfully penetrated our market for that key component of high-technology systems.

The Japanese are doing a slow and uncharacteristic burn. Wakasugi, head of a policy bureau in the powerful Ministry of International Trade and Industry, said that if Europe and the United States banned Japanese imports, "there would be no benefit for Japan to remain a member of the free world. If that happens, we would probably join the communist bloc."

This is utter nonsense. What is significant is that Wakasugi's superiors let him make such a threat to demonstrate the sense of outrage felt not only in the Japanese bureaucracy, but in the business community. Sony Chairman Akio Morita, in an Asahi Shimbun interview, let it all hang out:

"Americans never admit they're wrong. That's the way they were reared. . . . The United States tends to resort without much consideration to the way that fuels anti-American sentiment. Japan is a friend . . . (and) if Japan's industrial power were to be switched to the other side (the Communist bloc), the balance in the world would be altered. Americans seem to think only of the immediate future."

This trans-Pacific fury needs to be cooled. Both sides should face this fact: the huge Japanese trade surplus is in large part the result of an imbalance between the strong U.S. dollar and the weak Japanese yen. This isn't to say that the Japanese export success is not due to excellent planning and government-industry-labor cooperation, which is a credit to them. Or that the Japanese do not overprotect their agriculture and infant industries, which is not a credit to them.

But as former Treasury official C. Fred Bergsten pointed out in an interview, "This is the third episode of massive tension over trade in the last 10 years or so, and in every case, a misalignment in the exchange rates has been a big factor."

The undervalued yen--at 245 to the dollar-- is about 25 percent below where it should be, Bergsten says. This is one more unhappy fallout of Reaganomics, which is based on a tight- money policy and a loose fiscal policy, and of Prime Minister Zenko Suzuki's own political fixation on exactly the reverse mix.

Because of Reagan's and Suzuki's opposite biases, American interest rates have been sky- high and Japanese interest rates low, the net result being a cheap yen rate. The two nations, instead of swapping insults, need a partial "swap" of their economic policy mixes.