First, dice the ham and onions and sauté them together in a large saucepan. Meanwhile, strain and drain the beans. As soon as the onions have turned translucent, add the beans and mix everything well with the ketchup, mustard and sugar. Simmer over low heat for 30 minutes, stirring occasionally.
A delicious chop or simply baguette goes best with it.