DNA said:
The berry bit will actually automatically fix when you connect an R/S game to FRLG or Colosseum. It is basically a patch for the game that will make berries grow again even when the battery runs dry.
If you replace the battery, though...? I don't think it erases the save - that only applies to GSC if I remember correctly.
A careful distinction I should point out, but the Berry Fix patch was for game defects that occurred in some early versions of Ruby and Sapphire, where the glitch would appear approximately
one year (or 100 hours of gameplay) after the game was originally used, not due to the battery running dry, but rather an undiscovered software hiccup that generated the equivalent screen and effect in the games, hence it's fixable via miscellaneous bug fixes, none of this having anything to do with hardware (i.e. batteries). However, at this point some eight years later, it's likely that the battery is drained for real (on average, GSC batteries took around six years with a constantly running clock to drain in comparison), in which case the glitch fix won't work no matter the source.
And replacing the battery shouldn't damage the save file, because unlike RBGYGSC, that data is stored elsewhere in the cartridge, a practice adopted after realizing the unfortunate demise that came with linking the battery and the save storage chip/etc. electronically (meaning if the battery shorts or drains, anything receiving power from it shorts and drains as well). That being said, I'd use kid gloves when replacing the battery on a GBA cartridge; I've never done so myself, but microchips and such are things you definitely don't want to move around or damage even slightly, as the repercussions it'd have on other areas of the game's functionality could potentially be much worse or even render the game entirely unplayable.