cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare in Sapscript?

Former Member
0 Kudos

Hi,

I want to know if thre is a way to symply write:

IF &VBDRK-NETWR& < 0
 ...
ELSE
ENDIF

When I test this, the value of VBDKR-NETWR is not test...

PS: In a sapscript form.

Thanks

Edited by: David31 on Nov 10, 2009 1:11 PM

Accepted Solutions (1)

Accepted Solutions (1)

kesavadas_thekkillath
Active Contributor
0 Kudos

in your print program.

do it like this

IF VBDRK-NETWR < 0

Flag = 'X'.

ELSE.

flag = 'Y'.

ENDIF.

in your script

check

/:if &flag& = 'X'.

/:else.

/:endif.

also refer this thread

Edited by: Keshu Thekkillam on Nov 20, 2009 2:51 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Try suppressing the user-specific formatting with the "K" option.

IF &VBDKR-NETWR(K)& < 0

Former Member
0 Kudos

Hi,

Sorry beeing so late, I have not try the last solution.

I will try it later.

Thanks a lot.

David31

Former Member
0 Kudos

hi

Yes u can write IF &VBDRK-NETWR& < '0.00'. or'0,00'. depending on user settings for Decimal format.

SYNTAX

/: IF condition

:

/: ELSEIF condition

:

/: ELSE

:

/: ENDIF

= EQ equal to

< LT less than

> GT greater than

<= LE less than or equal to

>= GE greater than or equal to

<> NE not equal to

surya