Cook pasta in salted water until al dente and strain.
Cut ham into small pieces.
Place pasta and ham alternately on a gratin dish. Always drizzle a little sour cream in between, season with salt and sprinkle with cheese.
Last should be a layer of noodles. Put butter flakes on top and sprinkle with flour.
Bake in the oven for 15 minutes at 180 °C.