on 10-30-2008 4:36 PM
Hi,
I am doing IDOC to XML...I have a condition here
I have a field called A and B
condition here is
If a=01 then B or if A=02 then B i used one oneasmany condition here,Its throwing an error..
can some one get me an UDF to write this condition
Duplicate you subtree in the source side... -> right click and select duplicate node
Then in the UDF create 4 paramameters
a1 pointing to A in node 1
b1 pointing to B in node 1
a2 pointing to A in node 2
b2 pointing to B in node 2
writee this UDF - ()
if (a1.equals("01"))
{
return b1;
}
else
{
if (a2.equals("02"))
{
return b2;
}
}
Arvind R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
it's a little bit confusing:
> If a=01 then B or if A=02 then B
1) Is there a difference between a and A ?
2) Should it be in both cases B ?
Please clarify.
Regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsha
Now if i look at UDF requirement. you said
I mean ,If a segment occurs twice, with A as 01...then it should take B from the same segment...
or it should take B from the other segment which has 02
Share your source structure then it will be more clear. if we can map using standard or UDF is the only solution.
Thanks
Gaurav
Harsha,
Why u are using OneAsMany, what is the actual reqmt?
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i need to se that because, we need to replicate the segment here.I did it with if then condition ..it worked fine...now functional team came with deifferent requirement,so,I added If else condition....it throwing an error....
this is the error i get
Runtime exception during processing target field mapping /ns0:MT_A/A/. The message is: Exception:[com.sap.aii.mappingtool.tf3.IllegalInstanceException: Too few values in first queue in function useOneAsMany. It must have the same number of contexts as second queue.] in class com.sap.aii.mappingtool.flib3.NodeFunctions method useOneAsMany[com.sap.aii.mappingtool.flib3.If@631f54, , ]
User | Count |
---|---|
85 | |
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.