cancel
Showing results for 
Search instead for 
Did you mean: 

UDF mapping error

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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?

Former Member
0 Kudos

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

samiullah_qureshi
Active Contributor
0 Kudos

Hi

You do one thing take message from sxmb_moni and test it in mapping test in IR.

Regards

Sami

Former Member

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

Former Member
0 Kudos

when point to pont mapping is working fine .

and

when i take file from mapping program it is working fine .

but when fail is taking form mdm is giving mapping error for splitting ,but it is working good when removing splitting functionalty.

can u pls help on this

with regards

srikanth vipparla

former_member189387
Active Contributor
0 Kudos

Hi ,

Please post your Payload from SXMB_MONI , and desired Target Datatype xml Structure

Thx

V.Rangarajan

Former Member
0 Kudos

iam allredy tyed in this way it is also giving same error .

Former Member
0 Kudos

Hi Srikant,

1)Check input for your code is either Null,Blank or Suppressed at runtime.

2)split function gives exception if data is incorrect like one of the above.

Regards,

Rohit

Reward points if helpful.

former_member189387
Active Contributor
0 Kudos

Hi srikant,

Please post in forum , Soruce payload from SXMB_MONI and Desired Target messgae structure .

Former Member
0 Kudos

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

Former Member

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

it is not working

it is giving No queue for the field

pls help me .

with regards

srikanth vipparla

Former Member
0 Kudos

Hi,

try Remove Context before your UDF.

Use my code in UDF.

Regards,

Rohit.

Reward points if helpful.