Peel and chop the onions and garlic. Wash the rosemary, shake dry, pluck needles from the twigs. Pour beans into a sieve, rinse with cold water and drain.
Wash the tomatoes. Cut the ham in half lengthwise. Clean and wash spring onions and cut into 3 pieces. Dab meat dry. Place them next to each other on a work surface, cover each with 1/2 slice of ham, put 1 piece of spring onion in half of the rolls.
Chop half of the rosemary finely and sprinkle over the ham. Roll the rolls up tightly. Heat the oil in a large frying pan and fry the rolls well all around. Season with pepper, remove from the pan and keep warm.
In the meantime, add the onions and garlic to the frying fat, sauté, add the tomato paste and sauté briefly. Add tomatoes and braise for 3-4 minutes, add beans and remaining rosemary needles and braise for another 3 minutes.
Add sherry. Season to taste with salt, pepper and sugar. Put the rolls on top and braise them again briefly. Serve on a plate.