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

Converting String To XML Format and send as attachment

Former Member
0 Likes
626

Hi

My requirement is to convert String into XML Format and that XML File i have to send as an attachment

can any one one give solution for this Problem.

Thank you

Venkatesh.K

1 ACCEPTED SOLUTION
Read only

rainer_hbenthal
Active Contributor
0 Likes
581

Sorry, my Glassphere is out for cleaning, so i cant see how the conversion is done.

5 REPLIES 5
Read only

Former Member
0 Likes
581

Hi,

try this: http://forums.sdn.sap.com/search.jspa?threadID=&q=convert%26%26xml+%26%

Regards, Dieter

Read only

rainer_hbenthal
Active Contributor
0 Likes
581

And how should the XML look like? Your question is the same as "I want to convert 5 into XML"

At least you need to give the xsd or the tags which need to be used.

Read only

0 Likes
581

hi,

i m filling the itab first and converting to xml

itab contaning these data

GS_PERSON-CUST_ID = '3'.

GS_PERSON-FIRSTNAME = 'Bill'.

GS_PERSON-LASTNAME = 'Gates'.

APPEND GS_PERSON TO GT_PERSON.

GS_PERSON-CUST_ID = '4'.

GS_PERSON-FIRSTNAME = 'Frodo'.

GS_PERSON-LASTNAME = 'Baggins'.

APPEND GS_PERSON TO GT_PERSON.

after conversion data is coming like that

#<?xml version="1.0" encoding="utf-16"?>

<CUSTOMERS>

<item>

<customer_id>0003</customer_id>

<first_name>Bill</first_name>

<last_name>Gates</last_name>

</item>

<item>

<customer_id>0004</customer_id>

<first_name>Frodo</first_name>

<last_name>Baggins</last_name>

</item>

</CUSTOMERS>

but errors are 1) # is coming at the first

2)for 'encoding="utf-16"?>', it is not coming perfectly, some other data (iso-8859-1) should come here

can anybody plz solve it.

regards,

viki

Read only

rainer_hbenthal
Active Contributor
0 Likes
582

Sorry, my Glassphere is out for cleaning, so i cant see how the conversion is done.

Read only

Former Member
0 Likes
581

Hi,

Please look at this link.