cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning Value to Variable in Sapscript

Former Member
0 Kudos

Hi,

To initialized value of the variable when I tried to assign 0 to variable (like in the following statement) it comes up with error 'Command Expected'.

&RF140-ZALBT&= '0'.

Please let me know where and what I am doing wrong in assigning value to a variable?

Regards,

Shabbar

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use DEFINE command and then assing value.

Make sure that the paragraph should be ':/' (command prompt)

Former Member
0 Kudos

Hi,

Still its not working. The statement I am writing is

/: &NET& = &RF140-WRSHB& - &RF140-MSATZ&

but the system gives error on that.

NET is the local variable declared with Define statement and both the others are defined in print program.

Even I tried

/: &RF140-ZALBT& = &RF140-WRSHB& - &RF140-MSATZ&

but still the same error.

Any comments?

Regards,

Shabbar

anversha_s
Active Contributor
0 Kudos

hi,

<b>use DEFINE commands:</b>

/: define &RF140-ZALBT& := '0'.

rgds

ANver