on 05-15-2007 7:31 PM
Hello,
I am having some issues with mapping from a flat structure to an Idoc. Here is the source message
<SourceMessageType>
<Record>
<Level>
<LvlSeqID>1</LvlSeqID>
</Level>
<Level>
<LvlSeqID>2</LvlSeqID>
</Level>
<Element>
<LvlSeqID2>1</LvlSeqID2>
<ElmSeqID>A</ElmSeqID>
</Element>
<Element>
<LvlSeqID2>2</LvlSeqID2>
<ElmSeqID>A</ElmSeqID>
</Element>
</Record>
</SourceMessageType>
<TargetMessageType>
<IDOC>
<Level>
<LvlSeqID>1</LvlSeqID>
<Element>
<LvlSeqID2>1</LvlSeqID2>
<ElmSeqID>A</ElmSeqID>
</Element>
</Level>
<Level>
<LvlSeqID>2</LvlSeqID>
<Element>
<LvlSeqID2>2</LvlSeqID2>
<ElmSeqID>A</ElmSeqID>
</Element>
</Level>
</IDOC>
</TargetMessageType>
Both <Level> and <Element> are unbounded nodes and arrive unsorted. The <Level> node has a Sequnece ID (LvlSeqID) and the <Element> node has a corresponding Sequence ID (LvlSeqID2), and in the target structure, the matching <Element> nodes should be under the <Level> node. There may be any number of <Element> nodes for 1 <Level> node. I have tried to use the Graphical Mapping Tool to do this, but it does not seem to work as I would have liked. The next thing I am going to try is to use a User Defined Function.
Can you suggest anything else?
Thanks
Zeshan
Hi ,
Please check the Mapping examples on help.sap.com.
You can first sort the nodes Level and Element based on Ids.
For creating the Level nodes = no. of Element Nodes, the function UseOneAsMany can be used.
Regards,
Beena.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.