on 2012 May 26 11:07 AM
Hi Experts,
I am printing a Quantity field from item data in my smartform. But user has asked me not to print the decimal value if its zero and he want to print it if its Zero.
Eg.. if Quantity is 14,999.90 then he want to print it as it is .. But is value is 14,999.00, then he want to print only 14,999. I tried to use option &Quantity(13,0)& but it actually rounds it off and then it changes the value.. please suggest a solution..
Thanks,
Rahul
Hi Rahul,
As you mentioned, printing option &Quantity(13,0)& wil actually round off the values and that is not acceptable as a solution to you.
This is a typical requirement, which you will need to handle in a custom way,
before writing the Quantity, put a code node in the smartform and use FRAC command available in the ABAP. This will give the fraction part of the quantity. Based on the Fraction part... if its Zero, you can use &Quantity(13,0)& to print the value or else if that part is not equal to Zero, you can print the value as it is..
Hope this will solve your problem..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.