Shred the cabbage, carrot, and onion.
Crack the eggs into a bowl, add salt, pepper, and the shredded vegetables, and mix well.
Melt butter in a pan and toast both sides of the bread until golden brown.
Add a bit of oil to the pan and pour in the egg and vegetable mixture, cooking it like a pancake.
Spread ketchup, sugar, and mayonnaise on the bread.
Place the egg patty on the bread, then add cheese and ham on top.
Cover with another slice of bread.
Cut in half to serve.