cancel
Showing results for 
Search instead for 
Did you mean: 

If Condition in scripts

Former Member
0 Kudos

Hi all,

Im facing this problem donno why...

the code is as below:

/: IF &REGUP-QSSHB& > 0

T1 &LV_SEQ&,,&REGUP-XBLNR&,,&REGUP-BLDAT&,,&REGUP-BELNR&,,&REGUP-QSSHB&,,

= &LV_VAT&,,&REGUP-QBSHB&,,&LV_PAY&

/: ELSE

/: &LV_SEQ&,,&REGUP-XBLNR&,,&REGUP-BLDAT&,,&REGUP-BELNR&,,&REGUP-DMBTR&,,

= &LV_VAT&,,&REGUP-QBSHB&,,&LV_PAY&

/: ENDIF

but my code doesnt seem to work....itz goin to the else part even if the IF condition is true.

kindly lemme know whr im goin wrong...itz really weird...

Regards,

Narendra.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

debug the script and check the value of &REGUP-QSSHB&

Former Member
0 Kudos

the value is more than 0!!

I did chk tht....

Former Member
0 Kudos

Hi Narendra,

Your code is correct, but instead of using '>' symbol, use 'GT'. Then it will be get corrected.

/: IF &REGUP-QSSHB& GT 0

T1 &LV_SEQ&,,&REGUP-XBLNR&,,&REGUP-BLDAT&,,&REGUP-BELNR&,,&REGUP-QSSHB&,,

= &LV_VAT&,,&REGUP-QBSHB&,,&LV_PAY&

/: ELSE

/: &LV_SEQ&,,&REGUP-XBLNR&,,&REGUP-BLDAT&,,&REGUP-BELNR&,,&REGUP-DMBTR&,,

= &LV_VAT&,,&REGUP-QBSHB&,,&LV_PAY&

/: ENDIF

Former Member
0 Kudos

Hi,

I did use GT as well..itz the same....

any other suggestions are welcome!!

Regards,

Narendra.