The Siemens Programming Software for S5 and S7 can convert an S5 Program to run on an S7. There can be issues where a special function was used that is not supported in S7 or the S7 version is significantly different than the S5 one. It converts everything that can be converted. You should always plan on testing after a conversion.Below is a list of the instructions that cannot be converted.
Siemens S5 To S7 Conversion Manual Download
If the function is a Siemens propietary function you may not be able to view it, but it can still be converted.Not all S5 instructions can be converted into the S7-300/400 format. These are mainly the instructions to access the system memory areas (e.g. LIR, TIR, etc.) of a S5 CPU. These instructions cannot be used with an S7 CPU.