cancel
Showing results for 
Search instead for 
Did you mean: 

Subtracting while using define in SAPScript.

Former Member
0 Kudos

I want to declare a variable which equals subtraction of 2 quantities in sapscript.I dont have any driver program.The Script is run from the transaction CO03.

Ex :open quantity = required quantity - withddrawn quantity.

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Dec 14, 2009 11:43 AM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi it was a useful answer

Former Member
0 Kudos

Hi,

I dont think you can directly subtract two values in SAPscript. Instead you can do one. You can use 'PERFORM' control command to call an external subroutine. In this subroutine you can pass the values to be subtracted and get the result of the subtraction.

Check this link to see the how to use the 'PERFORM' control command.

[http://help.sap.com/saphelp_nw70/helpdata/en/d1/802d7d454211d189710000e8322d00/frameset.htm]

Regards,

Bhavesh.

Former Member
0 Kudos

Hi,

if u know the form name then in the page windows link go to text elements or the editor then

in command /: use define open quantity type c or n .

and give your code

open quantity = required quantity - withddrawn quantity.

& if u don't know the form name goto tcode co03 and in the menu ->order ->setting->print info or ih the header look for output type.

Hope this solves your issue !1

Regards,

Ravi

Former Member
0 Kudos

Use SUBTRACT in command line (/:).

Nag