In the 1950s and 1960s, Japan begged, borrowed and bought from the Western world the highest forms of industrial technology, which eventually became the basis of the country's remarkble economic success.

Now the flow is out instead of in, and Japan sends her own technological gifts to the countries trying to follow in her industrial wake. Increasingly, the techniques developed here are exported with a view to winning friends and influencing governments in nations deemed important for Japan's interests. a

Japanese expertise flows out to provide irrigation in Thailand, to teach computer programming in Singapore, to build steel plants in South Korea and China and to develop petrochemical industries in the Middle East. The technology for chemical fibers, imported by Japan from the United States, has been adapted, improved and passed on to South Korea and Taiwan. And in one ironic role reversal, steel-making expertise first learned in the United States now is being returned in new and improved form to the American factories from which it came.

In some developing countries where Japan seeks friends and suppliers, Japan's technology is more eagerly prized than its investment capital and financial assistance. "Saudi Arabia is not interested in money," said one Japanese official describing a new petrochemical plant to be built there with Japanese government aid. "It is only interested in technology -- that's the only thing they ask in exchange for selling us oil."

On an important diplomatic tour of Southeast Asia last January, Prime Minister Zenko Suzuki was told by Singapore Prime Minister Lee Kuan Yew that his country valued Japanese computer technology and technical training more than financial aid.

". . . They are long-lasting transfers of knowledge and value systems that will enable us to emulate, to some extent, the way in which Japan anticipates the future and overcomes problems," he said.

Japan has been a net exporter of technology since 1973, and its motives are a mixture of commerical calculation, altruism and promotion of national interest. Most of the technology is transferred through private ventures and patent sales, but increasingly the government is acting to channel technology exports where it will do Japan the most good.

This channeling is helped by the peculiarly cozy relationship between Japan's industries and government, which to a high degree see their interests as intertwined.

"In America, they used to laugh at the saying that 'what's good for General Motors is good for the country,'" said a Western diplomat who has followed Japan's technology exports. "But here, 'what's good for Mitsui is good for the country' -- that is just a way of describing how the game is played."

The nations of the Middle East, from which Japan imports a large proportion of its vital oil supplies, have been major beneficiaries of Japanese technology since the first oil crisis in 1974, when a frightened Japanese government deliberately began seeking to cement its relationships with oil-rich countries.

Two weeks ago, Japan and Saudi Arabia concluded an agreement to construct a huge petrochemical project, costing about $1.5 billion, at Jubail. cIt is primarily a private, money-making venture with 60 corporations participating on the Japanese side.

To make the project go, however, the Japanese government has agreed to put up 45 percent of the Japanese share, in effect, taking on part of the financial risk because it feels good relations with a major oil supplier are worth it.

The financial risks of such enterprises are enormous. A similar project was underway in Iran, where a group of Mitsui-affiliated companies had staked several billion dollars on a modern petrochemical plant at Bandar Khomeini. The project ground to a halt during the Iranian revolution in 1979 and is now said to be rusting in the desert, 90 percent complete.

The government designates such mannoth projects carrying great risk as Japanese "national enterprises," making them eligible for official assistance. The national goal may be simple and obvious -- such as nailing down oil supplies -- or they may have a more general purpose of promoting longterm economic stability and growth.

Technology transfers to Southeast Asia, from which Japan imports valuable natural resources, often go along as part of Japan's groing official foreign aid program. A large urea project, eagerly sought as a joint endeavor by the Association of Southeast Asian Nations, is being backed by Japanese financial aid and technology. That region is important as a supplier of oil and minerals and as a market for Japanese exports.

Technological aid to the ASEAN countries -- Singaport, the Philippines, Thailand, Indonesia and Malaysia -- is "multipurpose" from Japan's viewpoint, explained Koichiro Matsura, a foreign aid official in the Foreign Ministry.

"The general purpose is to win friends. We don't expect quick results. But it helps Japan when the ASEAN economy is healthy because it is a big market for us and a marginal impact is important. The benefit will come back to Japan indirectly."

A common theme currently is that technology is more important than financial aid, even in the poorer countries that are not far enough advanced to take advantage of the higher technologies for which Japan is famous.

A leading proponent of that theory is Toshio Shishido, director general of the private Nikko Research Center.

He said that technology transferred to developing countries helps a broad segment of the population, as contrasted to the effect of grants of money, which often serve to benefit only elite groups. Financial aid tends to evaporate with dubious social advantages, he said, whereas technological aid shows u in visible factories and jobs for workers.