Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CL_HTTP_CLIENT double byte with XML

Former Member
0 Likes
417

Hello Experts!

I will send a XML file containing double byte characters to another system using HTTP.

My data is send to the target system, that works, but the double byte characters are not correctly shown.

This is my code:

  • create http client

CALL METHOD cl_http_client=>create_by_destination

EXPORTING

destination = 'ESNICELABELTEST'

IMPORTING

client = lr_client.

CALL METHOD lr_client->request->set_method(

if_http_request=>co_request_method_post ).

CALL METHOD lr_client->request->set_header_field(

EXPORTING

name = 'Content-Type'

value = 'text/xml; charset=UTF-8' ).

LOOP AT i_label_instance->t_xml_string INTO ls_string.

CALL METHOD lr_client->request->append_cdata2( ls_string ).

ENDLOOP.

CALL METHOD lr_client->send.

Does anybody have an idea, what i am doing wrong? The double byte characters for

kyrillic for example look like these: Не оÑu201AбеливаÑu201AÑu0152

I searched a long time in the www and also here at SDN but i didn´t found any solution or advice.

The connection type in the SM59 is "G" and the RFC Destination SAPHTTP is set up to unicode!

Please, has anybody an idea what could be wrong?

Thank you in advanced!

Best regards from germany!

Barney

1 REPLY 1
Read only

Former Member
0 Likes
302

Hello!

The problem is not existing on SAP system. The problem was the target system. On SAP side, everything works.

I checked it through ICF monitoring.

Regards!

Barny