That's not normally how TV remotes work. The programming is stored on an EEPROM or similar non-volatile memory. That way it doesn't matter how long the remote is left without batteries, it will still work.
Apart from the obvious, what makes you think that "it lost it's programming" is the correct diagnosis? Have you read something, or been told, or is this your own conclusion?
With remotes, the three most common issues are flat batteries, worn button contacts, or a faulty IR receiver in the TV.
Flat batteries and worn contacts can be diagnosed very simply. Grab your mobile phone. They're sensitive to infra red. Put the phone in it camera mode. Point the remote's head at the camera as if you're going to take a picture of the LED emitter. Press one of the buttons and see if you can see light flickering when you look at the camera screen.
If you see light flickering then the batteries are good and you know that that button works. (If it doesn't then change batteries, then look at getting a replacement remote.) Test the power and volume buttons. You can also test the remaining buttons if you wish, or just cut to a test of the TV's IR receiver.
Once you know power and volume work on the remote then test those functions with the remote pointing at the TV. If the TV doesn't respond then it's the IR Receiver that has given up the ghost. If so, then your next question will be cost of repair. Before you go down that route, have a look to see if the TV has a 3.5mm headphone jack socket marked as "remote". If so, plug a set of headphones in to it a few times. This will clean the contacts that sometimes bypass the IR receiver. To be fair, it's only found on larger sets. If your TV hasn't got this feature then it's repair/replace time.
Bearing in mind that the Beko TV is about 9yrs old, 4:3 ratio, pre-Freeview, and that a replacement new 19"~22" TV will be available for under £130 for Samsung or LG..... well I wouldn't be inclined to spend £50-£80 on a repair. If you are handy with a soldering iron and fancy having a go at repairing the IR receiver then the receiver part itself is cheap. There's no guarantee this is the fix, and it is trial and error, so you may end up stripping and rebuilding the TV a few times before you hit on the faulty component. The second bet is a bad capacitor.
Here's a neat example of what's involved in the IR receiver circuit. This one is out of a projector, but the design principles are the same as a TV