In a speech in Berlin in 1961, John F Kennedy said in German that he was a jelly-filled doughnut.
Correct. In Berlin itself (where he held the speech) a jam donut is called "Pfannkuchen" and he definitely didn't say that. Outside of Berlin it is called a "Berliner" in some areas but the myth that some of the listeners laughed at him is just that, a myth. Those listening knew exactly what he meant because it's grammatically correct.