The General Services Administration has ordered a halt to its efforts to contract out to the private sector custodial and other building-related maintenance and security services that are now provided by federal workers.

The Reagan administration has been pressing agencies to contract out many service functions now performed by federal workers after studies showed that, generally, 45 to 50 percent of the cost of doing those jobs could be saved by turning them over to the private sector.

Steven L. Hammer, GSA associate administrator for operations, told regional administrators in a memorandum Tuesday that a new federal law barred GSA from trying to contract out custodial, security, elevator operator and messenger functions.

Sixteen firms that had won government contracts, but which had not started work, would be allowed to proceed, GSA officials said. Since the Reagan administration began pressing GSA to contract out these functions, only two other contracts had been awarded.

One of those went to Paramount Pest Control, of Falls Church, which will provide pest control in federal office buildings in the metropolitan area. In that move, 15 government employes were reassigned and GSA said it saved $500,000 a year.

GSA had decided to contract out another 37 service jobs. Those contracts were scuttled by the new order.

The new provision was added to the continuing resolution appropriations bill by Rep. Robert W. Edgar Jr. (D-Pa.), who said in a telephone interview yesterday from his congressional office in Pennsylvania that it was more important to preserve preferential hiring rights for veterans seeking employment in low-level federal positions.

"Many of the people who hold these positions that are to be contracted out are Vietnam-era veterans whose entry level positions were about all they could handle in society when they got back," Edgar said. "Contracting out their jobs was not very fair."

Edgar said that a private study showed that 80 percent of the people in those positions were veterans. However, Virgil Ostrander, a GSA project manager overseeing contracting activities at the agency's Public Building Service, said personnel figures show only 40 percent of the employes in the affected jobs are veterans.

The Office of Management and Budget has characterized amendments such as Edgar's as repeated examples of the continuing battle between Congress and the administration over how to run the federal government in a cost-efficient way.

"Some of the contracting out might be legitimate and might save some money, but what Congress has said is 'let's take a year and have some oversight hearings and find out what the impact is,' " Edgar said. "OMB's decision may not save the kind of money they think it would save and it may be counter to the mission that government is about."

Richard O. Haase, commissioner of GSA's Public Building Service, said the ban will affect about 7,000 GSA employes--mostly custodial workers. Edgar, however, said GSA originally told him that 13,000 federal workers would be affected and a Congressional Budget Office study he obtained showed the number would likely be only 8,000.

Meanwhile, cost-comparisons, designed to give government decisionmakers a signal as to whether contracting out a particular function is cost-effective, have also been banned under the Edgar amendment. GSA officials say that now makes it "harder, if not impossible" for the agency to determine the most prudent way to spend federal dollars.

For Edgar, the social and moral questions are more important, he said.

"When federal employes get RIFfed at higher levels, they have bumping rights, but when you're talking about the most entry level positions, you're putting people out on the street," Edgar said.

GSA's order Tuesday said no more GSA employes would have to fear being "RIFfed for the purpose of contracting out," Hammer wrote.

Overall, GSA claims to have trimmed 200 federal positions as a result of the contracting-out policy.