....
VII. Did Ramesses II conquer Jerusalem?
In my view, the city of Shalem conquered by Ramesses II in his Year 8 cannot be identified with any other city in Palestine other than Jerusalem ('city of Shalem'). The inscription on the north pylon of the Ramesseum probably does not list the cities in geographical sequence but rather as highlights of the campaign. Ramesses did indeed take the cities of Merom, Kerep, etc, but this does not mean that he could not have taken a city in the south on his way back to Egypt or during his expedition against Moab.
....
Taken from: http://www.bga.nl/en/discussion/engveen.html