on 08-17-2010 12:58 AM
Hi,
I am doing a simple compare between a sap currency field and a dollar amount. My problem is it does not work the way I am doing it. Can someone suggest what I am doing wrong? Here is my code:
/: IF &T001-BUKRS& = '1500' AND ®UD-WNETT& LT 50000.00
/:BITMAP 'SIGNATURE_TEST_1' OBJECT GRAPHICS ID BMAP TYPE BMON
/:ENDIF
My problem is that it is printing the graphic even when the amount is greater than 50000.00 (it should NOT as per the
code above). I tried putting single-quotes around 50000.00 (like '50000.00'); it still does not work.
Any suggestions would be great. Thanks.
Hi,
The currency values will be right aligned and stored in the variables. So while comparing with hard coded values check the length and then compare with the variable. it will be of currency 13 so u need to give some 5 spaces inside the single quotes.
Thanks
Arul
Edited by: Arul on Aug 17, 2010 9:45 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to solve this problem, I created a separate custom program and placed a form in it. I passed the currency field to this custom program and brought back a flag field. Based on the flag, I did what I was supposed to do.
For some reason, within sapscript, I was not able to compare a currency field to a hard number value like 50000.
My way around the issue helped me solve the problem.
Thanks and I have credited those of you who have replied to this question.
Salil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As arul said, you should be care of the blank spaces. Either add the same in the constant value or condense the field value - ®UD-WNETT&.
Both will work.
Regards,
Selva K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.