After 17 days of testimony, a flood of damaging government videotapes and 44 defense witnesses at his Abscam bribery trial, Sen. Harrison A. Williams (D-N.J.) spoke for himself today. He flatly denied under oath that he ever used his official position for personal gain.

But Williams said he met with a phony Arab sheik to discuss government contracts for titanium on June 28, 1979, despite a blatant pitch minutes earlier by the sheik's assistants that he promise to use his influence to get government contracts for the mine.

The 61-year-old former chairman of the Senate Labor and Human Resources Committee said he ignored the urgings of undercover informant Melvin Weinberg and his own growing doubts about the validity of a promised $100 million loan from the sheik. He said he did so because he wanted to help friends trying to develop the mine.

"It [the coaching by Weinberg] didn't mean anything to me," he said. "They were suggesting I go way out of character. . . . I still wanted to see Yassir [the sheik, who was actually an FBI agent]. I still was trying to figure out whether there was anything real here."

Williams said he believed in the project because the others pushing the mine "were my friends. I got it started. I got my doubts. He [the sheik] looked real to me. . . . I'll go on with it."

Williams said he had been told in a June 19 meeting that he would have to "impress the sheik." He said he was urged to "really puff myself . . . it seemed to me I was asked to do something not in my character. I would go to the meeting and pretty much do things my way."

Williams and co-defendant Alexander Feinberg, a longtime friend, are charged with bribery and conspiracy for alledgedly promising to trade the senator's influence in getting government contracts for titanium in return for the loan and a hidden interest in the mining venture.

The coaching session by Weinberg led some government prosecutors to conclude that the senator's constitutional rights had been violated. When he was urged to say he would use his influence to obtain contracts, the senator testified he was willing to boast, but not about something he would not do.

"One thing I was not going to say -- he [Weinberg] suggested I go into government contracts -- even when you exaggerate -- I knew I'd exaggerate in my own terms. But there could be no exaggeration about things I couldn't do, wouldn't do -- in no shape -- even in a baloney session when it was called for. I knew no senator gets contracts," Williams testified haltingly.

Thursday, the jury is expected to hear Williams' explanation of his statements to the "sheik" at the June 28 meeting. At that meeting, he boasted he would tell the president about the titanium mine and said there would be no problem getting government contracts for it.

Williams testified in a deep, deliberate voice, using hand gestures frequently as his attorney, George J. Koelzer, replayed the government's secretly taped conversations with the senator. He stopped them periodically to have the witness explain his thinking at the time. The effect was that of a gentle cross-examination.

Koelzer began his questioning in the morning with a detailed personal history of the senator and then asked him a series of dramatic questions about his personal integrity.

For instance, he asked, "Have you ever taken anything of value in connection with your public duties?"

"I have not," Williams said.

"Have you ever agreed to take anything of value?"

"I certainly have not."

"Have you ever concealed willfully, knowingly concealed any asset required to be reported?"

"No."

"Have you ever, ever, ever, attempted to influence a decision of the federal government for your own personal gain?"

"I certainly have not."

During the afternoon, the senator said he had doubts about the project ever since his first meeting with the "sheik" on a yacht in Florida in March, 1979. He said he was surprised then when an undercover agent claimed to be a financial adviser to the Kennedy family of Massachusetts but knew little about the political dynasty.

His doubts grew, he explained, as the original $10 million project mushroomed to $100 million without the Arab investors making any real effort to check the practicality of the Virginia titanium operation. "This whole thing took on a monumental dimension."

When he first met the sheik, he said he thought the sheik "had the appearance of a Middle Easterner . . . he had soft eyes. He impressed me with his sensitivity. It was just a good presence . . . a good feeling."

He discussed the mining venture briefly on the yacht with Weinberg. He said he didn't feel he had a "financial involvement" in the mine at the time even though one of its organizers, Henry A. (Sandy) Williams, III, had given him an interest in U.S. Titanium Corp. in 1976. He said the mining interest had no value at the time. "It was a generous gift of nothing."

Williams said he was bothered by Weinberg's coaching. Though Weinberg said it was "the Arab way" for the senator to boast of his influence, Williams said Middle Easterners he had met showed "a dignity that I respect." He said they had "a moderate way, not an extreme and exaggerated way."