‎2013 Dec 20 9:28 AM
Dear Developers ,
I am new to ABAP.
I need a small help here.
i would like to read the name of the attachment from a particular string.
<xml name="test.doc" displayname="test.doc"'>
Using, String manipulation,
I have to read only content inside the name attribute., which test.doc
I used FIND , nevertheless, is there any way in ABAP to search from Start INDEX to END INDEX to read a substring esle, is there any other better way to do it in ABAP.
thanks
Vignesh
‎2013 Dec 20 9:41 AM
Hi Vignesh,
This would be my solution, to split the string at the " character.
Then you recover the data from table using index.
DATA: lt_str TYPE STANDARD TABLE OF string.
l_str_xml = '<xml name="test.doc" displayname="test.doc">'.
SPLIT l_str_xml AT '"' INTO TABLE lt_str.
Hope it helps,
If you want to know more about splitting strings, check the following link:
String Processing - ABAP Development - SCN Wiki
regards
‎2013 Dec 20 9:49 AM