‎2009 Jan 07 6:02 PM
Hi Guys,
I develop a function module to sum of two float values.
so in import parameters i declare two variables with float data types in function modue as below
number1 type float
number2 type float
other variable to hold sum of two above variables as below
result type float
in source code
result = number1 + number2.
but if i pass values of two variables(number1,number2) as 5 , 5
result = 1.000000(where as result shoudl be 10.0000)
and also i can't pass more than one digit value for variables
pls suggest me where can i declare float variables size in import and export tabs of fucntion moduel.
‎2009 Jan 07 6:11 PM
Hi,
Use any existing data element to define the import export parameters. There are so many standard data elements...
Hope this helps.
Regards,
Bharati
‎2009 Jan 07 6:20 PM
Hi,
I can't use standard data elements.
i want to declare it as folat only.
so please suggest me where can i declare size of variable in import and export tabs in function module
‎2009 Jan 07 6:21 PM
‎2009 Jan 07 6:27 PM
yes, result i'm getting 1,000000000000000E+01(as suppose to show it as 10)
Edited by: venkat venkata on Jan 7, 2009 7:27 PM
‎2009 Jan 07 6:30 PM
Then don't declare it as float!
Or after it is returned, assign it to a non-float field!!
Rob
Edited by: Rob Burbank on Jan 7, 2009 1:30 PM
‎2009 Jan 08 5:13 AM
Hi,
Result is absoluteky fine, either you can add some different format in write statement for the desirable output or you can assign the total to non float variable and test the result as explained above.
Various output options can be
write: sum exponenet 1 decimal 2
etc.
Do f1 on write for various other options.
Pooja