Mayor Marion Barry's "War on Heroin" is driving addicts and drug peddlers from Washington's infamous 14th Street strip to the front and back yards of houses on formerly quiet residential sidestreets.

The thick crowds of hundreds of drug traffickers who milled day and night along 14th Street have been dispersed by a special unit of 17 uniformed and undercover policemen formed in late June to clean up the area.

Police arrested 173 persons there on drug charges last month and have further discouraged crowds by ticketing 1,454 persons on such charges as jaywalking, double parking, spitting on the sidewalk and violation of antilitter laws.

Now the sidewalks of 14th Street are virtually empty, except for pedestrians and the policemen who patrol the strip.

The drug users and peddlers have scattered and drifted in smaller bands to alleys and sidestreets where heroin transactions formerly were rare.

"They're spreading like ants," said Gyr Patterson, who lives in the 1300 block of R Street NW. "It's frightening and discouraging. Here I thought we were getting some action from the police. Instead, there are crowds in front of my house. I can see deals being made. I can see them passing dope. I've lived here for five years, and it's never been this bad."

A man who lives in the 1500 block of R Street said that recently he has been finding "little plastic cups" in his back yard. "When you find those, you know people have been shooting up. They mix their solutions in them."

Another man, who lives in the 1500 block of Corcoran Street, said "I see people getting in and out of cars and money changing hands in the alley near my house. I think the drug traffic is infringing more on me personally now."

Some residents in the area, such as Joseph Dean of the 1400 block of Swann Street, said drug activity has declined sharply. Dean recently stopped by the Third District police station to express his gratitude.

Businessmen along 14th Street, whose complaints to Mayor Barry led to his declaration of war on heroin, are delighted by the disappearance of drug peddlers in front of their shops.

One liquor store owner said that until this summer, crowds of as many as 500 young men and women loitered on the sidewalk in front of his store, chatting and buying and selling drugs. Few, except for those involved in the drug trade, came inside. Business was bad, he said. When he tried to sell the store, no one wanted it.

Now, he said, homeowners in the area have begun to visit him, purchasing bottles and cases of liquor for their parties.

"I can't survive as a businessman on junkies who come in and buy one bottle of soda or one bottle of beer," he said. I need the real clientele - the property owners who stock their bars and have parties. Before they were afraid to bring their money here because of all the junkies outside.

"People I thought had passed or had moved are on the streets again," said the liquor owner. "Old people are on the streets. Children are on the streets. It's very, very nice."

Steve Mowbray, a realtor with two offices on 14th Street, had been one of the businessmen who complained to Mayor Barry about the heroin trade.

The addicts and peddlers have now disappeared from in front of his offices but some of them have moved to the 1300 block of Corcoran Street where Mowbray lives.

"In the last month I've found three syringes in my backyard. I didn't used to find them there before," Mowbray said.

Police acknowledge that one result of their work has been to shift drug activity.

Lt. Mike Hartford of the Third Police District's narcotics division said: "We can move the junkies around but we can never stop it.As long as they grow poppies you're going to have heroin. As long as there are social problems you're going to have junkies."

Police have been asking residents if they would permit officers to come to their houses to observe transactions from the windows. They also have been asking residents to call when they see transactions and give descriptions of the people who they see dealing.

The extra police who are patrolling the 14th Street area have prompted heroin vendors to take more elaborate precautions when selling drugs.

Previously, a user would approach a dealer on 14th Street, give him cash get a glassine packet of heroin on the spot. Now, users make contact with sellers on 14th Street, and pay them there but do not obtain their heroin until later. Sometimes they will arrange to meet the dealer or a partner later on a side street to pick up the heroin. On other occasions the user will be told he can find the heroin he has just purchased hidden in a trash can or the inside of a cereal box in a nearby store, where the heroin is hidden.

One store owner said he has been finding heroin in ice cream in his store's freezer.

"They do the same thing to my cornflake boxes," he said. "I see them when they're doing it. Then they get a bodyguard to watch it. Sometimes, I chase them out.Sometimes, I'm afraid."

But, both police and addicts believe that Mayor Barry's "War on Heroin" has disrupted somewhat the heroin trade around 14th Street.

Heroin users complain bitterly about the new patrols.

"It don't matter who you are," grumbled one man who said he used heroin. "If you're on 14th Street, you have no rights."

"The other day I bought a soda, threw the top off the soda and got a ticket.That don't happen in Georgetown. They act like there's no dope in Georgetown."

Another heroin user, a tall bearded man in a floppy blue terry cloth hat, says the police "took all the fun" out of his life. "Before you'd buy your drugs and spend the day out here, chewing the rag with your friends. Now I do what I need to do and I'm gone. No more chewing the rag."

But he is confident that he and other heroin users eventually will regain 14th Street.

"They [the police] tried this three years ago," he said. "It didn't work then and it won't work now. We can wait longer than they can." CAPTION: Picture, A 14th Street area known for drug dealing is patrolled by Officer A. P. Snyder. By John McDonnell - The Washington Post