The White House appeared to take a softer line yesterday on the administration's controversial warning to journalists at an espionage trial in Baltimore to confine their reporting to the government's disclosures.

White House spokesman Edward Djerejian also declined to expand the warning concerning the trial of accused Soviet spy Ronald W. Pelton into a general rule that might be applicable to reporting on national security matters.

"The immediate focus [is] at the Pelton trial, and the information that is involved at that trial," Djerejian told reporters. He said there is "a larger question" beyond that, but he went on to describe that larger issue as how the administration can best prevent leaks of sensitive information by its officials.

"It's not a question of going after the press," Djerejian said. "I think that's been hyped."

Central Intelligence Agency Director William J. Casey and Lt. Gen. William E. Odom, the director of the National Security Agency, issued a joint statement Wednesday following the publication of stories about the first day of the Pelton trial. It "cautioned" reporters "against speculation and reporting details beyond the information actually released at trial."

The statement, approved in advance by President Reagan's national security affairs adviser, John M. Poindexter, warned that such reporting would not constitute "authorized disclosures" and might cause "substantial harm to the national security."

A final sentence in a draft composed by Odom admonished journalists that they could be prosecuted under a 1950 law prohibiting publication of classified information about U.S. code-breaking activities. That line, however, was deleted from the official statement.

In opening statements at the trial of Pelton, a former mid-level staff officer in the National Security Agency's Soviet communications unit, the government made what many regarded as extraordinary disclosures about U.S. abilities to intercept and decode Soviet messages. Subsequent news stories and broadcasts contained background and details that, combined with leaks over the last six months, concerned Casey and Odom, the NSA director said.

By Thursday, Casey, facing criticism from journalists and First Amendment authorities, told The Associated Press he was not trying to "scuttle the First Amendment." Criticized especially for seeming to say that journalistic "speculation" could result in criminal prosecution, Casey added that "if I had to do it over again, I might not use that word."

Djerejian agreed that "a better word than speculation could have been found."

He also said the White House endorsed only "the general thrust" of the Casey-Odom statement. "In no way do we mean to imply, by the use of 'speculation,' prior press censorship or press censorship or in any way impinging on the freedoms of the press to report information and events," Djerejian said.

Casey was scheduled to be at the White House yesterday for a ceremony at which Reagan awarded a Distinguished Service Medal posthumously to Navy Capt. Joseph J. Rochefort, whose long-unrecognized code-breaking successes led to the U.S. victory at Midway Island in World War II. Casey, for unexplained reasons, did not come to the ceremony, but a White House official joked that if he had, "He was going to come with instructions telling the press not to speculate on how Rochefort did it."