‎2011 May 13 8:58 AM
Hello Everybody,
I'm writing a program that needs to take information, encrypt it, and then download it somewhere.
The problem I'm running into is using spaces in comparision and also concat.
I have a table with a range of ascii values ( 32 to 95 or so ), so everything some a space to a z in put inside it.
The problem works fine for characters and such, however if there is a space involved a complication starts.
a space has an ascii value of 32, So I've stored it in the database as ' ', and later I tried using SPACE.
[http://imgur.com/sCyoZ|http://imgur.com/sCyoZ]
So later in my code to get the value, I do a search of the table with if ascii_table->ascii_char = SPACE or ' ' then get the value there. The problem is that none of these tests return true. I've tried also with '' and it's also the same.
So my question being is it possible to put a single space in a sql line? Does anybody know how whitespace is actually managed and treated inside ABAP? Thank you very much!
- Bryan
‎2011 May 13 3:06 PM
Hi Brian,
In db table fields with only whitespaces are considered empty.
For an explanation of how spaces are handled, please consult following [page|http://help.sap.com/abapdocu_702/en/abenliteral.htm] (especially the difference between ' and ` ).
For conversion from Unicode value to char and from char to unicode, please consider to use the methods UCCP and UCCI from both classes CL_ABAP_CONV_OUT_CE and CL_ABAP_CONV_IN_CE
Regards