03-16-2011 2:20 PM
"I have a sapscript that needs to add two values to return the subtotal.
For this I have called a subroutine and passed the decimal values. But the subroutine is not returning the calculated values. In fact it is returning initial values for the subtotal. How do I correct it? Am i doing something wrong here?"
03-16-2011 2:23 PM
Hi Soumyo,
When you call a subroutine from SAP script, then the values are passed as strings.
This also happens when the values are returned. So, convert the values into decimal or integer (whatever is your requirement) and then perform the calculations in sapscript. Once done, reconvert the calculated value to string so that it is returned properly from the subroutine.
I hope this helps.
Moderator message: one more points game, and your ID will be deleted. Only one warning.
Edited by: Thomas Zloch on Mar 16, 2011 3:29 PM
03-16-2011 2:27 PM
yes, iwas also facing a problem similar to it. this answer is really helpful .
thanks ravi.