They recomend that you replace with the correct battery, however, I have replaced many batteries in many types of PLC's with ones from RS or other suppliers & never had a problem, just make sure it is of the same type i.e. lithium or what ever, also, most PLC manufacturers suggest switching off the power but replace within a givewn time i.e. probably less than a minute or two, however, again I have replaced hundreds of batteries while power on & never had a problem, but most will require a re-boot to remove the Batt error light.
We had a yearly plannede maintenance to replace all batteries in PLC's rather than leave them for say 5 years, some PLC's can drain the battery if powered off for long periods & the battery has been in place for sometime.