Put the grated potatoes in a sieve and squeeze out lightly. Put in a bowl, add eggs, onion, salt and nutmeg (to taste) and stir. Thicken with a little flour (the dough should be viscous), if necessary.
Heat the fat in a pan, pour the batter into the pan with a ladle, form small, oval pancakes (approx. 17x10cm, three pieces in a 24cm pan) until golden on both sides. Place in an ovenproof dish, sprinkle the diced ham and then the cheese on top.
Bake in a preheated oven at 200 ° C for 10-15 minutes (until the cheese bubbles and is lightly browned).