on 10-01-2018 2:57 PM
Hi Guys,
I am facing problem with null values in string and it's hex code xstring. I have some data in one field with data type LCHR. This field contains data like :
"SAPMSDYP MBatch-Input ####%PC 60317081539#?"
I have one abap program. I am just appending this data to a string variable and then converting this string to xstring data. The length of the string is 53 and after conversion to xstring the length of xstring data is more then the string data. In string data wherever the "#" is there it is coming as "0" in raw data(xstring). After this conversion i am just sending this data to my java program using http_client. At java side if the incoming data is having null value in-between data then this java program will reject this data. The main problem is i have to handle these null value in my abap program only.
For string to xstring conversion i am using the below code: CL_ABAP_CONV_OUT_CE=>create(
encoding = 'UTF-8'
endian = 'L' ).
conv->convert( EXPORTING data = text
IMPORTING buffer = buffer1 ).
Here i have to handle this null("#") value either in string data or in xstring data in ABAP program only. I don't know how to do this.
I suggest to first convert the xstring to BASE64 using cl_http_utility=>encode_x_base64( lv_bin ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.