on 01-06-2016 8:11 PM
Hi Group,
I am working on IDOC to file scenario, tI have the below structure, I have ZADR segmen which is having NAME1 field , for each ZSEG1 I am getting two ZADR segments every time , for mapping I need to select the NAME1 field from second ZADR segment , I was using COPYVALUE[1] , it works fine when single ZSEG segment comes , but for multiple ZSEG its not able to create second NAME1 node at target end, can any body suggest how to acheive using Graphical mapping or UDF.
ZAWB01
|
|______ZHDR
|
|____ZSEG1(0..Unbound)
|
|___ZADR(0..Unbound)
Name1
NAME1(IDOC source) ---Copyvalue[1}-->NAME1(target)
copyValue will always copy the values of first context an cannot be used in your scenario. You can use index function, then you can check if index = 1 or 2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does not count the context. It counts the occurance within a context. Like this: a - b -> 1 - b -> 2 - b -> 3 a - b -> 1 - b -> 2 a - b -> 1 So you can compare the result of index funtion with 2 NAME1 -index - equals - ifwithoutelse - NAME1 Set the context of NAME1 to ZSEG1 (or check what is best for it)
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.