In a large saucepan, place the ham shank with enough water to cover it completely, bring it to a boil and cook until done (when the meat is loose on bone).
Remove it from the pan, and let it cool down, save the liquid.
Remove the meat and some of the fat from the bone, put it through a grinder with the potatoes (both of them), add the flours, baking powder, salt and pepper.
Be sure there's enough flour for getting an stiff dough.
Using your hands, roll into dumplings, drop them into the ham liquid and cook at a low boil until done (around 45 minutes).
Serve the dumplings with butter on top.