Hi,
So, I found what was causing this issue.
As stated above, the EXEC SQL was done to a variable, not the "VIEW" variable, but another one with the same fields in the same order.
Using the "FetchPayingDocuments" variable, the cpp was generated with the access to the wrapper columns on the form of theWrapper->GetColumn(i) as can be seen on my second image on the first post.
Just for the sake of sanity, depite PLEX help indicating that we can do the EXEC SQL into a variable ("SQL statements are defined within a source code object. When using SELECT statements, the first row selected is returned into the specified output variable. If no output variable is specified, the view variable is used."), I decided to try and do it to the "View" variable.
This is the cpp generated:
As you can see, the code to access the columns on the wrapper is quite different and this does work withtout the previous issue of returning the columns on the correct order in odd fetches and not in even.
Best regards.