Cook the pasta in plenty of salted water for seven to nine minutes until it is bubbling, then drain. Clean, wash and cut the beans into small pieces. Cook in boiling salted water for 15 minutes, also drain.
Peas in shell. Peel onions and cut them into fine slices. Wash parsley, pluck off leaves. Cut ham into long strips. For the marinade, add vinegar, three tablespoons of water and oil.
Season with salt, pepper and sugar. Add onion slices and parsley. Mix pasta, beans and peas with the marinade. Cover and let stand for 30 minutes. Season again and serve with ham.