After the humiliation of "The Choirboys," Joseph Wambaugh made sure he would control the film version of his best book, "The Onion Field." He bought back the rights from Columbia, put up a third of the $2.7 million production cost, helped raise the rest, wrote the screenplay, hired the director and functioned as the executive producer.

It's a position rarely achieved in Hollywood by a writer, and worth fighting for -- whatever the outcome. In this case, the outcome is mixed. Wambaugh may have retained control over the material, but he hasn't transposed it to the screen with the sustained urgency and excitement that the book promised.

Opening today at area theaters, the movie version of "The Onion Field" offers a compelling buildup of suspense and apprehension, culminating in the shocking murder of a young policeman. But it gradually begins to diminish in force, transforming a gripping, realistic reenactment of a murder case into a prosaic and somewhat baffling grind.

The best-selling book gained stature from a powerfully realized aftermath to the crime -- the psychological breakdown of the murdered cop's surviving, guilt-ridden partner and the bizarre maddening prolongation of due process achieved by the convicted murderers, thanks to defense motions and appeals.

The movie, directed by Harold Becker, begins to flounder when it shifts to this complicated aftermath. But it starts with incisive, ominous assurance, contrasting the formation of two partnerships among young men destined to interact tragically. Ian Campbell (Ted Dyson) and Karl are assigned to the same prowl car in March of 1963. Both are different and introspective, but they start to develop a friendship and a little professional rapport.

Meanwhile, Gren Powell (James Woods), a vain and flaky born loser, recruits Jimmy Smith (Franklyn seales), a petty thief fresh out of Folsom, to be his driver in a half-baked series of armed robberies. The dependent Smith plays along despite his immediate dislike for Powell.

Both partnerships exist for scarcely a week before their paths cross at a Hollywood intersection. Planning an evening of stickups, Powell and Smith are driving around in a 1946 Ford coupe with a faulty taillight that draws the attention of the two policemen.

The officers don't anticipate that these punks might be armed, and as Campbell approaches Powell, Powell draws a gun.

Seeing his partner covered. Hettinger reluctantly surrenders his gun to Smith. The crooks order Hettinger into the back of the coupe and Campbell behind the wheel. They drive out of town, eventually stopping in an onion field in farmland near Bakersfield. Powell, on the verge of a blowup of some sort and mistankenly convinced that kidnapping the officers is a capital offense, orders the captives out of the car and impulsively shoots Campbell in the face.

Hettinger screams and bolts into the darkened fields, eluding Powell and Smith in pursuit. Finding refuge at a farmhouse, the shocked and exhausted Hettinger makes contact with the police.

Meanwhile, Smith drives off in the coupe, belatedly hoping to sever connections with Powell. Powell contrives to steal a car but is apprehended about two hours after the murder by highway patrolmen. Smith is picked up the following day at a rooming house in Bakersfield.

The first trial brings in a prompt verdict of first-degree murder. In the subsequent sentencing trial required by California law, a hint of future legal complications emerges.

Hettinger returns to the force, but begins to suffer a breakdown, which Wambaugh pins squarely on the Los Angeles Police Department.

One official issues a directive admonishing officers never to surrender their weapons under any circumstances: It is not the L.A.P.D. way. A solitary type inclined to be hard on himself, Hettinger begins to develop pathological guilt symptoms. In time they lead him to petty acts of theft, resignation from the force, and the brink of suicide -- a position that has become familiar in Wambaugh's police novels.

In the book, while expressing outrage at the sufferings of Hettinger, Wambaugh refrained from the special pleading that must have been tempting under the circumstances and even managed to transcend resentment at the murderers and their attorneys for contriving to make a legalistic mockery of the legal system.

Wambaugh has said that Hettinger might be an unplayable role, since the man himself was uncommunicative. It looks unplayable the way John Savage struggles with it, turning Hettinger into an apparent neurotic even before suffering traumatic blows.

As a result, there's no emotional progression, no illusion of the character plunging into a fearful state and then managing to rescue himself. Savage's ostentatious, annoying ties and idiosyncracies also weaken the effect of James Wood's extremely skillful impersonation of the sociopath Powell.

These two performances need to be effectively contrasted. Because of Savage's peculiar shadings, the contrast never materializes. He's anticipating Hettinger's breakdown even more that Woods is anticipating Powell's blow-up.

Wambaugh and Becker are inclined to slip into a monotonous storytelling tread that seems to confuse a methodology appropriate to police work with one appropriate to drama. What's needed in the clutch is a little emotional urgancy and adroit manipulation.

The reticent tendency is understandable, particularly in Wambaugh, who spent two years trying to persuade the TV produces of "Police Story" that character exploration was really more interesting then chases and gunfights, not to mention more relevant to a cop's profession. Stung by vulgar Hollywood overdramatizers, he prefers to underdramatize . To a fault.

At its best, "The Onion Field" is an admirably straightforward evocation of reality. But even the avoidance of obvious artifice can be allowed to harden into a restrictive form of stylization. Unlike most American movies, "The Onion Field" has a story well wiorth telling. It's a pity that the story tellers seem to run down before they've made their strongest points.