My GUESS is that what you are tying to ask is how to tranfer character values from a SAS character variable INTO the SAP HANA database without removing the trailing spaces.
In other words you question is not how to use the SAP HANA data in SAS, but how to use the SAS data in SAP HANA. That is you want to transfer trailing spaces that exist in the character variable in the SAS dataset into the VARBINARY column in the SAP HANA database.
To do this properly you will need to know the original length of the values in the source foreign database, since once you have the values in a SAS dataset you cannot distinquish trailing spaces added by SAS to pad the value the defined length and trailing spaces that exist in the data.
For you problem it should like you want everything to be length of 16 , so it is easier.
So you might want to upload the data and then run something on the remote side to fix the values to add back the spaces.
Say you want to move WORK.HAVE to MYLIB.WANT, where MYLIB is pointing to your SAP HANA database.
So perhaps something like:
data mylib.want;
set have;
run;
proc sql;
connect using mylib;
execute by mylib
(update want
set VAR=substr(cat(var,' '),1,16)
);
quit;
Or you could just append any visible character on the SAS side, upload that, then remove the letter on the other side. Make sure the new variable on the SAS side is long enough to store the extra character.
So perhaps something like this:
data for_upload;
length var $17;
set have;
var = cat(oldvar,'X');
run;
data mylib.want;
set for_upload;
run;
THen just remove the X from the end of the variable.
... View more