It is a good thing to do, yes. But, it will not gain you merits for Nirvana any longer.
An old Brahman priest asked Buddha: "What should we do [to be saved]?
The Buddha answered, "....look for another Holy One who will come and help the world and all of you in the future."
Then the Brahman priest asked, "What will the characteristics of the Holy One be like?"
The Buddha answered him, "The Holy one who will keep the world in the future will be like this: In the palm of his hands and in the flat of his feet will be the design of a disk, in his side will be a stab wound; and his forehead will have many marks like scars. The Holy One will be the golden boat who will carry you over the cycle of rebirths all the way to the highest heaven [Nirvana]. Do not look for salvation in the old way [trying to merit salvation]; there is no salvation in it for sure. Quit the old way, and there will be a new spirit like the light of a lightening bug which will come down from the sky above to live in all of your hearts, and you will be victorious over all of your enemies. Nobody will be able to destroy you. If you die, you will not come back to be born in this world again. You will go to the highest heaven [Nirvana].
In Buddhism, in any point offering or giving is the source of accumulation of merit. It is called generosity. If it is good karma or not depends on the attitude of the person who gives. In Abidhama text ( taught by Buddha) it said the qualities of the Donner should be "1) attachmentNTo the things which you are offering, 2) give with respect , 3) by your own hand, 4) in right time, 5) things shouldnt be harmful to that person. such as poison, arms so on. with this way if you give there will be definitely a good karma.
anyway in buddhism there are two source to get the accumulation. 1) from offering or giving 2) from utilizing the thing in a better way which was received from offering. for example if someone gave me a mobile phone he will get a good karma from making offering to me. And if i utilize this offering carefully for long time this person ll get the continuity good karma.
giving is the source of enlighten because giving can produce lots of generosity and the one who is generous is selfishness. selfishness is egoless. egoless is what buddhism call nirvana.
Doing good things without seeking pleasure in it is what Buddhism taught. If you seek rewards for your good actions, what does that make you? A selfish person?
Then, there's another possibility. What if the beggar uses your money to buy drugs?
In Buddhism, whether an action leads to happiness or suffering depends almost exclusively on the motivation of the doer.
So, if you give money to the beggar with the motivation to help him/her, chances are that you create a positive result for yourself in the future.
However, if you only give money with the selfish motivation to 'buy' yourself positive karma, you act selfishly, and it is very doubtful if you actually create any positive merit for yourself: so it is not really possible to 'trick' karma.
Yes of course. Giving money, food, cloths, medicine and other essentials to a human being who cannot afford them is indeed a meritorious deed. But if you can give some sort of a long-term solution for this person's problem, ex-if you can help him to find a job or to acquire some skills which might be helpful to get a job, may be more important.