cancel
Showing results for 
Search instead for 
Did you mean: 

Comparision for negative values

Former Member
0 Kudos

Hi,

I am tranporting quantity value RESPD-BDMNG to sapscript.

I need to check if the value negative o rpositive in SAP script.

IF &RESPD-BDMNG& GE 0

.....

ELSE

...

ENDIF

The above code always trigers the ELSE part regardless of the value of BDMNG.

By SAPSCRIPT debugging i found Value of &RESPD-BDMNG& is always positive even if the drive program passes a negative value. ( must be because of conversion to text)

Please help me

1) How to compare numerical values...

2) How to check for negative values.

Note: I cant make changes in driver program as it is used for callin many forms dynamically

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Not sure of the structure RESPD?

But the field BDMNG is unsigned so will always be positive - check if the structure contains a debit/credit indicator SHKZG - this will tell you wheter the field is positive or negative...

interrogate this field in the SAPScript and then add sign for output.

Regards

Stu

Former Member
0 Kudos

Thanks stu it worked