on 05-17-2013 11:47 AM
Dear Friends,
I have a issue with reading the below XML DATA in my ABAP Mapping program.Please share your experience .
MY XML FILE-->
<?xml version="1.0" encoding="utf-8" ?>
</CODE>
</PRODUCT>
</SELLING_CODE>
</TRANSACTION>
</FILE>
I want to read the changeID, BatchNo Value from FILE NODE and similarly from Transaction, Selling_code,Product as well.I can successfully read the other value but dont know how to read the above tag values.
I am using the interface IF_IXML_NODE to read child node values but dont know which method I ll use to read header tag values.
Thanks a lot for your kind help and support in advance.
Regards
Jay
Hi,
Anyone could please give any further input on this because I am not able to fetch the appropriate header tab <FILE> value from the XML file.
Thanks&Regards
Jay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
May be draw the tree graphically and check the below link, specifically "Finding an element by name".
http://help.sap.com/saphelp_nw04/helpdata/en/86/8280de12d511d5991b00508b6b8b11/content.htm
Thanks,
Vikas
use the get_attributes method.
and do a search on abap mapping first. There are so many sample programs to be found.
e.g.:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
Thank you very much for your response.Yes I know there is lots many sample program in SDN not none of them address my requirement.
The link that you mentioned in your answer ll work well for the below XML type of files and I am currently following the same link for my requirement.Appreciate if you could please help me out to to read the batno in FILE node which is actually the header node.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_Emp_Det xmlns:ns0="http://yash.com/YH203/file2file_abapmapping">
- <EMPLOYEE>
- <PERSONAL>
<EMPID>001</EMPID>
<FIRSTNAME>Santosh</FIRSTNAME>
<MIDDLENAME>Kumar</MIDDLENAME>
<LASTNAME>K</LASTNAME>
<AGE>25</AGE>
<GENDER>M</GENDER>
</PERSONAL>
- <JOB>
<COMPANY>XYZ</COMPANY>
<DEPARTMENT>SAP</DEPARTMENT>
<DESIGNATION>Consultant</DESIGNATION>
<BEGINDATE>20050606</BEGINDATE>
<ENDDATE />
<SALARY>600000</SALARY>
</JOB>
- <PERSONAL>
<EMPID>002</EMPID>
<FIRSTNAME>Bala</FIRSTNAME>
<MIDDLENAME>Krishna</MIDDLENAME>
<LASTNAME>Reddy</LASTNAME>
<AGE>25</AGE>
<GENDER>M</GENDER>
</PERSONAL>
- <JOB>
<COMPANY>XYZ</COMPANY>
<DEPARTMENT>SAP</DEPARTMENT>
<DESIGNATION>Consultant</DESIGNATION>
<BEGINDATE>20050606</BEGINDATE>
<ENDDATE>20061206</ENDDATE>
<SALARY>600000</SALARY>
</JOB>
- <JOB>
<COMPANY>XYZ</COMPANY>
<DEPARTMENT>SAP</DEPARTMENT>
<DESIGNATION>Consultant</DESIGNATION>
<BEGINDATE>20070106</BEGINDATE>
<ENDDATE />
<SALARY>800000</SALARY>
</JOB>
</EMPLOYEE>
</ns0:MT_Emp_Det>
Regards
Jay
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.