on 11-12-2007 12:55 PM
Hello,
i need some help.
Situation:
i read a flatfile with a structure like that
10 1234435 HEADER .....
20 4711 23332323 POSITIONHEADER
30 23232323 POSITION
30 23232332 POSITION
20 4741 23232323 POSITIONHEADER
30 33333333 POSITION
30 33333333 POSITION
10 ... new recordset
After converting in fileadapter i have a xml structure like that
<recordset>
<header>
<field1>value1</field1>
<field2>value2</field2>
</header>
<posheader>
<field1>myValue</field1>
<field2>value2</field2>
</posheader>
<pos>
<field1>value1</field1>
<field2>value2</field2>
</pos>
<pos>
<field1>value1</field1>
<field2>value2</field2>
</pos>
<posheader>
<field1>myValue</field1>
<field2>value2</field2>
</posheader>
<pos>
<field1>value1</field1>
<field2>value2</field2>
</pos>
<pos>
<field1>value1</field1>
<field2>value2</field2>
</pos>
</recordset>
No i need to create a IDOC segment in Messagemapping for each pos.
No problem till now. But one field of the segment has to be filled with "myValue" from the posheader.
any idea how to solf that?
regards,
robin
hi robin,
if i understand your problem correctly
the xml structure has to be converted something like this
<header>
</header>
<posheader>
<pos>
</pos>
<pos>
</pos>
</posheader>
you do modify the structure, for this you require java mapping, for this you can rely upon the following blog
/people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
After this you will be able to map easily to Idoc, other Idoc wont get multiple segments
regards
Ramesh P
Message was edited by:
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you mean that field will always be populated with the same myValue as contained in the header?
If yes.. try out the useoneasMany function available in XI..
Thanks,
Himadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.