Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Subroutine call from sapscript not returning any values

Former Member
0 Kudos

"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?"

2 REPLIES 2

Former Member
0 Kudos

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

Former Member
0 Kudos

yes, iwas also facing a problem similar to it. this answer is really helpful .

thanks ravi.