on 06-04-2015 2:21 PM
Hello gurus
Is it possible to repeat the value of a source node fixed number of times using UseOneAsMany or by any other means?
I am required to copy value of 1 node to 4 target fields of an IDoc segment.
Any help is appreciated.
Thanks in advance.
Regards,
Xineohpi
Hi Xineohpii,
You can use COPYVALUE constant function for this.
In the dialog box of COPYVALUE, you need to specify the index(which occurrence of source element), you need to copy, and when you map the output of this function to the target, then when ever target element exists, that source value will be mapped to it.
Pls check and let me know if you face any issues.
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishnu
Thank you for your reply.
But i am there are multiple values for source node
eg:
A1
A2
A3
A4.
This is to be repeated in multiple occurrences of target node eg:
A1
A1
A1
A1
A2
A2
A2
A2
A3
A3
A3
A3
A4
A4
A4
A4
I understand that if i had only one source value for multiple targets, i could have used COPY VALUE.
Is there any way i can use Copy value for my requirement too..?
Regards,
Xineohpi
Hi Xineohpi,
I think you can do this in either of the below two ways.
1. Use remove context, and make sure all the values of input field are in one context, and map this to target node E1FISEG, by this the target node will get created by that many times of the values present in the input field. For the respective target field population, pass the input field(since each occurrence will be present in individual context) as it is, such that respective occurrence of input field value will be mapped to respective occurrence of target field.
2. If you want to duplicate the target node, then duplicate the target node, and for its field population, Use COPYVALUE function for every target field population, and the index of COPYVALUE function you need to mention respectively i.e. for first occurrence of E1FISEG-XREF3, you need to mention the index as 0 such that the first occurrence of suborderID will be passed etc.
Can you please check the above ways and let me know if any issues.
Regards
Vishnu
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.