Green’s Dictionary of Slang

abstain from beans v.

[Plutarch (AD 46?–AD c.120), Of the Training of Children, ‘Abstain from beans; that is, keep out of public offices, for anciently the choice of the officers of state was made by beans’]

to desist from politics.

[UK]Lyly Euphues (1916) 137: To abstain from beans: that is, not to meddle in civil affairs or business of the comonweal.
[UK]Partridge DSUE.