Data type Conversion Help Please

Hi ,

Basically i am mapping the Database ResultSet to an BAPI fields.
All are getting mapped , but i am getting an Exception at run time as below.,

Count not run the service
‘getAllLineItems’.–> MY SERVICE NAME…$ConversionException:Cannot
convert value of ‘10’ from java.lang.String to NUM
at field PREQ_ITEM

I tried by Converting each fields thro’s MAP Transformer using the ‘pub.string.numberFormat’ , but i got an Error which mentions that
‘Elements can not be converted through Map Transformer’ inside an Record List.

Any valuable suggestion.


Hi Ramesh,

   Earlier RMG posted you call service pub.string:numberFormat, 

instead of calling this transformer in map step.Call pub.string:number
-Format service.Map your java.lang.String field(inside getLineItems service).give pattern as 0 for digits or #,## …etc refer biultinservice guide.


Hi Ramesh,

  If above solution not works for you,Then write simple java service 

which you take number parameter as input(String Type).Value parameter
as output(Object type.Right click on object(you will get constraint window .Then select constraint button not general.Then select constraint type from pop up int or float or what ever your
output type). Now write java service using parseInt method of wrapper
classes(Integer,Float,Double…).Now invoke this method into
your flow map output object to PREQ_ITEM field which is number type.
Try this.I hope this will work you.