on 08-20-2009 11:47 AM
Hello All,
Need help in mapping.
Iam doing IDOC to File scenario, in this scenaio iam doing mapping,
if element ABC contain BE then i need to map DEF to XYZ.
i wrote one UDF, problem is in ABC iam getting AG and BE.
ABC contain AG for that DEF dont have value.
ABC contain BE for that DEF contain value.
so in the mapping when i check the queue for AG its space and BE iam getiing value.
but when i execute it iam not getting the value at target side.
i wrote UDF like this.
if(var1.equals("BE"))
{
return var2;
}
return " ";
Please help me
Thanks and regards,
chinna
if(var1.equals("BE"))
{
return var2;
}
return " ";
As Ravi said this can be achieved without UDF also.
If you want to use UDF then remove the last return statement ---> return " ";
This is not needed. If possible have an else block also so that the UDF wont fail if var1 not equals BE.
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i return var2, then if what is the use of checing the condition for BE.
if there is not BE in ABC then it will pass the some constant value into it.
Mapping is working fine........ only issue with this.
Please let me know how to remove the emty value in the Queue.
see in the XYZ when i check Queue i can see
[ ]
100
so in target iam getting empty value........... tell me how to remove [ ] and i need 100 in out put
Thanks,
chinna
Hi ,
In the graphical mapping , use IF dont use IF ELSE , so that you can avoid the Constant [] , empty value as you said
Regards,
Jude
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Check the context .
when i go through the req , i found that if ABC contains BE then DEF should be mapped to XYZ right ?
But in ABC you get two values BE and AG .
Do you want to consider abt the AG ? if not what you have done ( as jothi said) is correct except the else part ( constant [])
Regards,
Jude
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi chinna,
Provide your total mapping...Because it is the problem with the Mapping context..Somewhere it is not matching..That is the reason you are able to see in the Queues and not able to see when you execute...
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chinna,
Can you give us the structure of ABC and DEF?
Is DEF under ABC? or at the same level as ABC?
Your requirement might not need a UDF. You might as well do it using graphical mapping .
Regards,
Ravi Kanth Talagana
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 | |
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.