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

Get value fron a XML element

Former Member
0 Likes
733

I have a XML like this:

<?xml version="1.0" encoding="UTF-8"?>

<XMLDOC>

<doc>

222345

<date>20.05.2007</date>

<items>3</items>

<Totalprize>234 $</Totalprize>

</doc>

</XMLDOC>

When i try to obtain the value 22345 from doc element i get the value 2234520.05.20073234 $

I get the value of the element and the values of the childs

I am using XML parser of SAP

There is some way ttha only leave me get the value of the element doc

I have a XML like this:

<?xml version="1.0" encoding="UTF-8"?>

<XMLDOC>

<doc>

222345

<date>20.05.2007</date>

<items>3</items>

<Totalprize>234 $</Totalprize>

</doc>

</XMLDOC>

When i try to obtain the value 22345 from doc element i get the value 2234520.05.20073234 $

I get the value of the element and the values of the childs

I am using XML parser of SAP

There is some way ttha only leave me get the value of the element doc

4 REPLIES 4
Read only

Former Member
0 Likes
672

i think u have used concatenation statement,

after getting values clear the string.if it is not working after that send the code i will give you the solution

Read only

Clemenss
Active Contributor
0 Likes
672

Hi Jorge,

can you tell us how you used XML parser of SAP? OO or function, what parameters, any customizing?

Regards,

Clemens

Read only

athavanraja
Active Contributor
0 Likes
672

simple way

use FM

SMUM_XML_PARSE

(the input xml has to be in xstring format)

alternate approach is to use XSLT to parse the xml

Read only

Former Member
0 Likes
672

Version 4.6 don't leave us use XSLT in abap reports. it's impossible to obtain the value correctly.

In XSLT maybe we can obtain the value of an element with depending nodes.