I think error code ERP0617E is a connection error
problem, looks like your comfort/convenience control module can't see/detect your sunroof.
Your comfort/convenience control module possibly needs a reset or needs to be recalibrated ?
This possibly is a pure coincidence or could have been caused when your original battery died.
When ever you remove a battery whether it's discharged i.e totally flat or not, you should always remove the black battery lead (earth) first, then remove the red battery lead (positive/live) second.
Then when refitting the battery or a new one,
it's the reverse from above,
first is red battery lead (positive/live)
then second is the black battery lead (earth)
Otherwise there's a risk of shorting something out, admittedly it's rare to happen but can, and on these modern car's now with so many control modules it's advised to stick to the correct procedure.
Does everything else work ok on your
Ibiza,
if not check fuses as a small power surge can blow a fuse, or like I say it could be purely coincidental that this error has appeared.
As you've posted in the MK6
Ibiza section I presume you've got an
Ibiza 2017 or newer,
if so then you should still have the 3 year manufacturer's warranty cover,
take it to your nearest SEAT Main
Dealership and they should look at it, as it's still under warranty.
Like I say error code ERP0617E is I think a connection error, could be a
problem fault with your comfort/convenience control module, which is normally inside car under dashboard I believe.
Hope this helps
Si