cancel
Showing results for 
Search instead for 
Did you mean: 

Arithmetic operations in script

Former Member
0 Kudos

Hi Abapers!!!

Is it possible to do arithmetic operations in script? I tried,but i got the following status msg in debugging.

Text command &NETAMT& is not defined

my code is:

/: DEFINE &NETAMT& = &REGUD-WRBTR& + &WRBTR1&

Plz help me.Thanks in Advance!!!.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Instead of modifying your standard program, try include a subroutine pool in ur script using PERFORM statement and do the calculations in that.

Thanks,

Parul.

Former Member
0 Kudos

Hi,

1.Arithmetic operations are not possible in script layout.

2.But, the same operation can be done in print program or You can do in the Include.

3.The include can be called in the layout ,wherever you need.

Eg:/:Perform form_name in Program_name

/: using & REGUD-WRBTR&

/: using &WRBTR1&

/: changing &NETAMT&.

Regards,

If helpful reward with points(Don't forget).

Former Member
0 Kudos

hi santosh/siva kumar,

Thanks for ur responses.i am modifying the std form.just i want to confirm wheather it is possible or not? u cleadred my dought....thank u.

Edited by: Ranganayahi Chandirasekaran on Apr 8, 2008 7:16 AM

Former Member
0 Kudos

Hello,

You cannot do any arithmetic operations like addition,subtracttion etc in SAP scripts.You need to do that in the print program and pass the variable into the SAP script.

Regards,

Santosh