on 09-23-2009 2:28 PM
Hello,
We have a EXX to file adapter scenario where source structure contains XSD:Decimal field and is passed to XSD:Decimal field in target structure. It seems to work fine except where we have -ve value.
How can we get rid of this issue.
I get the exception as follows
com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Invoice_Details_File/Details[400]/JNLLN_AMOUNT. The message is: Exception:[java.lang.NumberFormatException: For input string: 221166.66-"]in class com.sap.aii.mappingtool.flib3.Arithm method formatNumber[221166.66-, com.sap.aii.mappingtool.tf3.rt.Context@66a8d09a] at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:428) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:120) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest
---rest of the trace removed
Regards
Praveen
Hi,
Are you using Formatnum on this field. If yes then thats the error because when sending negative number to formatnum it is throwing exception.
The best thing would be use an if else condition. If source fields --> endswith minus --> then use replace - with space and then trim --> now use formatnum and after that concat with - symbol --> if dont end with minus then use formatnum and pass as it is.
Regards,
---Satish
Edited by: Satish Reddy on Sep 23, 2009 8:41 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you try putting the minus sign at the start of the number (-221166.66), instead of at the end? (221166.66-)
Regards,
Juan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.