On Aug. 17, Maj. Gen. Fred C. Sheffey received official orders that most officers only dream of: command of a major Army post.

Pennsylvania-born Sheffey, one of 14 black generals on active duty in the Army, was to command Ft. Lee, Va., a key Army supply command south of Richmond that is named for confederate Gen. Robert E. Lee.

Then, on Aug. 23, four days before his 49th birthday, Sheffey became the victim of what an Army announcement stiffly described as "an administrative error." Sheffey would go to Ft. Lee, an amendment to his orders told him, but no t as the commander. He would run a school that trains the Army's cooks and the men who bury its dead.

Friday, after a Virginia black political group complained to Army Secretary Clifford L. Alexander that Sheffey's revised assignment "smacks of racial discrimination," the Army did another about-face. It gave Sheffey command of both the 18,000-man post and its quartermaster school.

Just what happened to Sheffey - described by one associate yesterday an "just a heck of a fine fellow" - remains obscured. At best, it was what one Army officer described as "an ad ministrative screwup, all too familiar to lower-ranking Army personnel.

But how it could happen to a two star general was something no one familiar with his case could explain. Both Sheffey, assigned to an Army material command in Alexandria, and Maj. Gen. Richard G. Trefry, the Army officer in charge of drawing assignments for the Army's generals, were not available for comment yesterday.

"You can never account for how errors occur," said Col. Hugh Waite, an Army informantion officer, when pressed for details of the "error."

Officials at Ft. Lee, which on Aug. 18 publicly announced Sheffey's assignment to the command, professed ignorance. "We're in the dark as much as anyone else," said Maj. Peter T. Knapp. He said the initial announcement of Sheffey's assignment came from Army headquarters in Washington. Knapp's job was only to relay the word to local news media in the Richmond area, near the 60-year-old base, whose military population is 55 per cent black, he said.

The initial appointment was welcomed by the Rev. Curtis W. Harris, a Hopewell minister and a civil rights activist in the area. It was, he aaid in a letter to Army Secretary Alexander, an indication of the country's "capacity to adjust to the changing times."

But when the Army later announced that Sheffey would command only the base's quartermaster school, Harris, head of the Fourth Congressional District Voters' League, and other blacks in the area were angry. Although the school is one of the largest components of the base, it is currently managed on a day-to-day basis by a white officer who carries the rank of colenel, two pay grades below Sheffey's rank, Harris said.

Officers at Ft. Lee pointed out that the official commandant of the school is also the Ft. Lee post commander, an officer who, like Sheffey, carries the rank of major general. But that only seemed to confirm the fears of Harris that Sheffey was being shunted to a less prestigious job.

Associates at the Army Materiel Development and Readliness Command, where Sheffey serves as director of materiel management, confirmed that the general was also troubled by the sudden unusual change in assignment and made inquiries of his own.

Officially, an Army spokesman said yesterday, the Army's headquarters staff at the Pentagon issued the second set of orders to Sheffey because "of a proposed organizational change" in Ft. Lee's command structure.

AT the time Sheffey's initial orders were drawn, the headquarters staff "did know" about the proposed changes but drafted the orders anyway, said Army spokeswoman Louise Hudgins.

Sheffey's orders were supposed to assign only the school command to him, but he was given both the post and the school. Why did it happen? "It just did.," she said. "That was where the whole error occurred."

Sheffey's race had nothing to do with the snafu, she said. But the Army did consider race, Col. Waite said, when Sheffey was selected for the assignment.

Friday, when the Army disclosed that Sheffey would receive the Ft. Lee command, the announcement was part of an overall announcement on a "realignment of responsibilities" within Ft. Lee's parent command.

The reason cited for the changers was the same study that the Army had cited the reason for removing Sheffey from the command two weeks ago.

"They felt it would be worse if everyone went along with the assumption that Gen. Sheffey would assume both the post command and the school command and then didn't," Hudgins said.

The revised command study that figured in the orders was first discussed with top Army officers here in the spring, but the Pentagon never received a "written request" for changers in Ft. Lee's structure until Aug. 26. That was important, Hudgins said. "Because the regulations require it be in writing."

As it turns out, however, when Sheffey reports to Ft. Lee Sept. 30, his duties will be exactly the same as those of the current base commander.