on 06-19-2006 11:24 AM
Hi i have a file to idoc scenarion in XI and i am new to java mapping. i am getting the source file using content conversion with a structure like
material
plant
value1
value2
i cannot use graphical mapping as i need to generate a nested structure.
if i want to use java then do i need to give the exact xml structure as my file and idoc has in my java code as the source and target.
how would the code identify the surce and target xml tags
regards
sorabh
Hi sorabh,
If you want to achieve a specific nested structure thru java mapping, you need not write a code wich identifies the position of the tags, instead you should code in such a way that the target structure is created based on the name of the tag and the value for that tag.
You can use DOM/SAX-based parsing if you are comfortable with it.
Also, if the IDoc is not having a very complicated nested structure and if you dont have to map many fileds/segments, i suggest you make optimum use of the functions provided in graphical mapping.
Regards,
Sushumna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For a tutorial on the methods of SAX and DOM http://java.sun.com/webservices/docs/1.1/tutorial/doc/
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sorabh,
<i>if i want to use java then do i need to give the exact xml structure as my file and idoc has in my java code as the source and target.</i>
You do not have to create the Input ( File ) structure as , you will receive the Input strucuture in XML format as as InputStream.
You will have to create the corresponding Output XML strucutre in your Code for JAVA MAPPING.
Also, JAVA mapping uses 2 types of parsing SAX and DOM. SAX parser is not processor intensive , but is difficult to implement. while DOM is processor intensive as the entire XML is loaded into the memory, but it is comparitively easier.
Java Mapping
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
DOM parser API
http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.