On the 1st floor of the grand staircase, right when you enter the hall, there will be a shield award(like all of the school),but this shield if you hit it with flipendo will throw five beans out if you hit it five times.leave the hall where you cant see and run back in and get five more. repeat until 100 if you have bought the bertie botts bag from fred and george.
In the forbidden forrest, next to the extremely large spider web over the bottomless pit, there is an orange mushroom. every time you hit it it will give you a bean. hit it six times then jump off the cliff. the fall will not hurt you but it will reset the mushroom so you can easily get beans to get the alahomora spell or what ever you may need from Fred and George.
When trying to get past the prefects at night, use a balloon to distract them to a spot and then run in the other direction. Then, they won't catch you.
The ghostly dogs can be found on the Hogwarts grounds, but very rarely. When you do see them, do not go near them. They can hurt you and if you get caught, either run to Hagrid's hut or run back inside the school. Everywhere else is unsafe, so be CAREFUL.
in addition to cheat submitted by "smoke" about collecting beans by flying over hogwarts and going through the magical rings, I'd like to point out that you can also get off the broom by Hagrid's hut...
After Snape finds you in the cutscene after saving Ron, he will start walking on the path near the greenhouse at night. You can go right up near him and he will not see you.
To get the Alohomora spell, you must visit Fred and George inn their shop behind the painting from the door in the Griffindor Common Room. You can buy it for 100 beans. There is no where else to get it.
To get a lot of beans The triangular object in the corner of the hallway by the fat lady portrait hit it three times to get beans turn the corner and hit it again more beans come out
Once you have acquired the Nimbus 2000, you can take it for a test run on Hogwarts Ground. Simply equip it and press the button to hop on it. The flying controls are the same, but you get to freely explore Hogwarts and its vast fields. Floating high in the air above and around the school are a few rings, which you can fly through. Flying through them helps you amass a great number of Bertie Bott's Beans.
They relocate every time you head through them. The rings vary in color. Different colors mean a different amount of beans will be given. As a side note, you can't dismount the broomstick unless you land at the Hogwarts front entrance, or in front of the Quidditch Stadium. Just press the button again and Harry will dismount.
Another way to find beans is to blast every tangible object with Flipendo. Most objects well cough up at least three beans. When you return to them a later time, they sometimes will give up more! Objects like masks, vases, jugs, boxes, etc. should all have some beans to share.
To get the farthest possible distance when gnome throwing, pick up a gnome and spin five times around and immediatly throw the gnome. If you spin any more, you will fall over, so only spin five times to get the maximum distance.
The quickest way to fill up your stink pellets, beans and balloon supply is to check all the desks in the school. You never know what you'll find.