In the merry old land of television, when a newwork warns affiliated stations of potentially sensitive material in a program, the process is sometimes called "flagging." Unfortunately for ABC, the flag went out too soon on its upcoming comedy series, "Soap," and it was perceived by many people to be a bright red one.

So when ABC runs "Soap" up the flagpole next Tuesday at 9:30, it won't be so much a question of who salutes as who faints. A lot of people who have already protested about the series and its presumed sexual explicitness are apparently envisioning something to fit a judge's florid description of the porno movie "Deep Throat": "a Sodom and Gomorrah gone wild before the fire."

It doesn't matter that there's no Sodom and less Gomorrah in "Soap." Certain viewers are primed to expect an outrage, and even if "Soap" turned out to be a medley of Pat Boone's greatest hits some viewers would dash to the mailbox the next morning with indignant letters about moral threats.

ABC went at this all wrong. If you're going to put sexy stuff on the air, you shouldn't ballyhoo the fact in advance. The network began extolling the new frankness and adult nature of "Soap" last May, and even showed a couple of episodes to the press.

Soon the nation was knee-deep in "Soap" suds - angry denunciations of the show and the accompanying illogical charge that since the networks were downplaying violence this year, they would obviously be up-playing sex. Where this teeter-totter equation first gained credibility we do not know, but it's remained stubbornly popular.

Of all the networks, ABC should have learned already that promising sexiness in a TV show is not the same as promising it in a movie or book, more covert media. In 1969, ABC made the same mistake with another show, "Turn-On," and ended up canceling the program after one night.

"Turn-On" was to be a hypied-up version of NBC's then successful "Laugh-In," and the implicit promise was that "Turn-On" would be more audacious, more topical, in a word, dirtier. America got the message and the show, whose gags included a vending machine that zipped out birth control devices, was a virtual goner even before it arrived.

Tim Conway was the guest host for that one-night stand and he recalled the experience with a bemused groan when reached in Hollywood, where he has finished taping his own CBS Special, "Uncle Tim Wants You," for airing Sept. 17.

"Ah yes, the shortest run on ABC in 25 years," he said. "In Cleveland, they gave 'Turn-On' exactly 13 minutes before they shut if off and put on 'Wild Kingdom' or something similar.

"The show aired in New York three hours before it would air in Hollywood. Meanwhile the whole cast and crew and gotten together for a big premiere party out here. By the time the show came West, it had already been canceled. So we had the opening night party and the closing night party at the same time. I guess that saved the network a little money."

Conway doesn't remember the program as being all that outrageous. "I remember something we did with a picture of the Pope in the right hand corner while I was talking - that seemed to upset people. But the show was so mild compared to what they're doing nowadays. I'm sure they've long surpassed whatever was offensive about 'Turn-On.'"

On the other hand, we have the strange case of "All in the Family," which broke a number of TV taboos when it went on the air Jan. 12, 1971, and revolutionized situation comedy. The potential was there to offend just as many people as "Soap," but "Family" was spared by two factors.For one, special-interest groups weren't as organized then and viewer activism was almost unknown.

For another, CBS tippy-toed "Family" onto the air so quietly that hardly anybody knew it was there. For weeks. Sometimes the TV Guide listing only said "All in the Family - Comedy" and that was that.

One insider says that Robert T. Wood, then CBS network president, was terrified by prospects of an epidemic of protests. His original orders to network publicists were to promote the show heavily but not let anybody know about the essence of Archie and his fondness for ethnic slurs and sexually frank remarks.

Then Wood changed his mind and issued an edict for the network to say nothing at all about the show. Then he decided to go all out and exploit the controversiality in advance. And then he changed his mind again and reverted to the speak-no-evil pose, which eventually prevailed.

One press agent asked to be removed from the show during all this because she was tired to telling reporters and critics that she couldn't tell them anything.

"All in the Family" languished at the bottom of the ratings for six weeks, but finally the public learned of the show through word of mouth.It became debate second; the coming season will be its eighth on the air, and daytime reruns of this once incendiary bombshell have been televised by CBS since 1975.

In television, it seems you can't use sexual frankness to make a show a hit, but if a show is a hit, it can get away with more sexual frankness than a flop can.

The irony of this is, according to one of Norman Lear's associates, that "All in the Family" wouldn't get six weeks to prove itself if it went on the air today. It would more likely be canceled after five. The network would be obliged to notify the nation loudly in advance that the show was going to break new barriers.

That's the dilemma facing people who want to shake television up rather than imitate the predominant hit. ABC's best hope for "Soap" now may be that the alleged hanky-panky level of the show has been so overstated that viewers will be let down when they see the real thing and it fails to singe off their eyebrows. That old TV magic called boredom may save "Soap" from the drain.