on 04-24-2008 2:41 PM
hai friends
iam created one UDF function for splitting multiple storage locations in to create deffarent segments based on ,(cama)
test mapping working good .
but at runtime the mapping is not working
it is giving runtime error at mapping convertion .
like this
com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio
pls help me what is the problem.
with regards
srikanth vipparla
Edited by: srikanth vipparla on Apr 24, 2008 3:44 PM
Hi srikanth ,
the problem is that you use different values while testing and runtime.
Take the payload from runtime and test the mapping with this values.
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using the same message in unit testing?
Take the message from sxmb_moni and test it with that message.
Can you share your code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no iam not using the same message in testing
it is comming from mdm system.
and my udf code is like this .
String testString = a[0];
StringTokenizer st = new StringTokenizer(testString,",");
while(st.hasMoreTokens())
result.addValue(st.nextToken());
}
and way it is giving error pls help me .
with regards
srikanth vipparla
Edited by: srikanth vipparla on Apr 24, 2008 3:51 PM
Edited by: srikanth vipparla on Apr 24, 2008 3:52 PM
Hi Shrikanth,
1) First you try same data from runtime in your mapping.
2) You can try split function in your code.
e.g.
String testString = a[0];
String[] splitCodes = null;
splitCodes = testString.split(",");
you can get string values in splitCodes.
Regards,
Rohit
Reward points if find helpful
yes my friend
if that eleiment is empty it is giving error
if that element is having the value then it is working fine.
what can do for this
this eliment is optinal
it is not maditary field.
so the nwhat can i do to accept null values .
and
when spliting
iam first charecter is comming spce(empty).
how can i delete that space value .
what can i do
pls help me.
with regards
srikanth vipparla.
Edited by: srikanth vipparla on Apr 25, 2008 8:40 AM
Hi,
1) so the nwhat can i do to accept null values .
You can check for null value.
e.g.
1)if(Input[0].length() > 0) or
2)if(!Input[0].equals(null))
Then only you can execute your split code otherwise not
2) how can i delete that space value .
Use trim function before your UDF fron TEXT category.
i hope this will solve your problem.
Regards,
Rohit
Reward points If useful.
thanks my friend
space is comming from input file itself .
it is resolved
but my
split functionality is not working .
u have given the option but it is not working
if that eliment is null then the mapping is still not working .
even test program also not working in the mapping there iam not getting empty eliment also.
pls help me .
with regards
srikanth vipparla.
Hi,
Try this code,
String[] splitCodes = null;
if (InputVal.length > 0)
{
for(int i = 0; i < InputVal.length; i++)
{
if( !(InputVal<i>.equals("")) )
{
splitCodes = InputVal<i>.split(separator[0]);
}
}
}
1)InputVal is your input parameter,
2)UDF type is CONTEXT.
this will help you.
Regards,
Rohit.
Rewards point if useful.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.