‎2015 Oct 01 12:34 PM
Hi Expert,
I have requirement to find a string between two char in XML list where to pick the value 'companyland' ..?
eg: <askl>jdflsjdf<lskfjlsd>fjslfjklsdjf sdf<hello>companyland<hello>.lsjflsjflsjdflksj<fljsdfjskldflsj>
<alsdfjklsjflsjdfsdf>
Thanks
savitha.
‎2015 Oct 01 10:23 PM
Please clarify what you have tried yourself so far.
There are simple ABAP commands to work with the strings as well as other options to process XML data specifically. All of this is documented and has been discussed on SCN already, so should be available on Google. Is there any particular reason you were unable to find an answer there?
‎2015 Oct 01 3:08 PM
Did you check whether "Search" solves your problem?
eg:
data: lv_xml_data type string.
lv_xml_data = '<a>dasfsdf</a><b>afdsfsafklj</b>'.
search lv_xml_data for 'the string you want to search'.
-Chandra
‎2015 Oct 02 5:27 PM
Hi Chandra,
search value is not constant it may be different. i think we have to find any string operation.
Thanks
Savita.
‎2015 Oct 01 10:23 PM
Please clarify what you have tried yourself so far.
There are simple ABAP commands to work with the strings as well as other options to process XML data specifically. All of this is documented and has been discussed on SCN already, so should be available on Google. Is there any particular reason you were unable to find an answer there?
‎2015 Oct 05 8:15 AM
Could you define your requirement more precisely or just read some doc as Character String and Byte String Processing / Expressions and Functions for String Processing.
Regards,
Raymond
‎2015 Oct 05 10:28 AM
Hi,
why do you think anyone might feel the urge to help you, when you can't even be bothered to give a meaningful example, or at least an Explanation for what you need.
As Jelena already pointed out, there are loads of threads in scn and all over the web, covering almost every angle of XML processing in abap.
BTW: consider to edit your example, so that one can at least distinguish between tags and values. As it is, it does not nearly represent anything related to XML but is just gibberish.
Best regards - Jörg
‎2016 Jun 03 3:26 PM
‎2016 Jun 03 3:57 PM
As the tags are XML alike, you could try this:
Execute function module SCMS_STRING_TO_XSTRING with importing parameter TEXT =<tAG>amount</TAG>.
The restult will be in the exporting parameter buffer.
execute function module SMUM_XML_PARSE and use the buffer as input for XML_INPUT.
the table XML_TABLE will have what you need 🙂