on 03-23-2012 9:40 PM
Hi friends,
we have a requirement to create only 1 segment, even if the condition is true more than once.
even if createif receives 2 true cases, it should only create 1 segment.
if there is true once , as input to createif, then create 1 segment,
even if there are more than 1 true cases.
pls suggest.
Hi,
Please use a loop condition as only once the segment to execute.
For Ex: like a do.. While Loop. using this we can say execute loop only once, even condition is false also.
May this answer will help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Source field -> Your condition you are applying -> create if -> remove context -> sort (descending) -> collapse context -> Target field.
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 write a simple UDF (queue context)
1. loop by all items
2. check condition = true in a loop and assign a variable to X if so
3. after the loop check if variable = X and if so return one value
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santosh,
Simplest solution, assuming that you are using a custom-developed target structure: set the node minOccurs = 0 or 1, and maxOccurs = 1. If this is not possible (for instance, you are using an IDoc definition imported from some ECC system), then use the following logic in your mapping:
Adjustments to make:
Hope this helps,
Greg
EDIT: This is somehow equivalent to the solution given by Michal.
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 | |
7 | |
6 | |
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.