Application Development 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: 

How to convert special characters in ABAP to XML?

Former Member
0 Kudos

Hi All.

We have a scenario where from XI (exchange Infrastructure), a BAPI is called which returns an XML. From that XML, a PDF is generated.

Now, if the XML contains any special characters, it will fail.

So if any CHinese char or >, # etc signs are there, it fails.

Can you please tell me how to convert my string in ABAP to a proper XML?

I am new to it and I was trying the following code

DATA: today TYPE string,

result TYPE string.

today = 'This is testing'.

CALL TRANSFORMATION ID

SOURCE today = today

RESULT XML result.

IF sy-subrc = 0.

WRITE result.

ENDIF.

But it does not return me anything.

Thanks in adv.

1 REPLY 1

Former Member