on 10-23-2006 2:18 PM
Hi,
In an IDOC ORDERS05 to whatever scenario I found the following situation. I have to evaluate the value of the field NAME4 when the partner function (PARVW) is WE. The issue comes with the fact that the NAME4 tag only appears when is not empty, so the XML should look like this.
<E1EDKA1 SEGMENT="1">
<PARVW>AG</PARVW>
<PARTN>0000103905</PARTN>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>RE</PARVW>
<PARTN>0000103905</PARTN>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>RG</PARVW>
<PARTN>0000103905</PARTN>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>WE</PARVW>
<PARTN>0000103905</PARTN>
<NAME4>S</NAME4>
</E1EDKA1>
The issue is that the NAME queue will have only one value (or even 0) while the PARVW queue will have 4.
The question: How can I pair both queues again (i.e: inserting blanks to the NAME4 queue wherever is empty)?
thanks in advance for help,
David R.
You can use the standard function <b>mapWithDefault</b>.
But you do not need this in the most scenarios, as you get 4 contexts for the NAME4, three of them are empty. This should be sufficient to distinguish the values.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys, Both solutions seem to work so far.
Points rewarded
regards,
David R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use standard function 'exists' to chek ehther the field exist and 'createIf' to creat the node if it does not exisit
<i>If there are structuring elements in your target structure that do not exist in the source structure, insert them using this function. Using condition I you can control whether the element is inserted or not. You connect the element in the target structure using O.</i>
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.