IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Data type Conversion Help Please

    Posted 07/18/03 04:53 AM

    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…

    com.sap.mw.jco.JCO$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.

    regards
    Ramesh


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Data type Conversion Help Please

    Posted 07/18/03 03:00 PM

    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.

    Thanks,
    SriniK


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Data type Conversion Help Please

    Posted 07/18/03 03:13 PM

    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 menu.select 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.

    Thanks,
    SriniK.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB