DNV and 401k/IRA vs Roth versions

I have a DNV and am still working.


I understand that Spain sees Roth accounts as income.  If still working, is it better to put the money in a 401k/IRA and get the tax break or into a Roth, pay the tax, and then have that tax credited against one's Spanish taxes. 


Thanks in advance,