Ok, the vtrace shows that the database kernel has the correct result for the second 'execute', so the error must be in the used ODBC driver version.
Please execute with ODBC trace enabled and vtrace option 'trace long on'.
For upload, just use this new container:
https://share.sap.com/a:gns0cg/MyAttachments/R.b98fa1ad-3465-4b17-b30f-bb104478e168/
Also, please let me know which version of MaxDB kernel you are using and the ODBC version.
Thorsten