2012 Aug 03 7:35 AM
i have used a field in module pool.the data type of that field is type p dcimals 2.
it is showing 0.00 when nil at the begning of program.
i want it no to display anything till its value is zero or nil.
it want these fields blank not even 0 should be displayed.
plz suggest some solution.
2012 Aug 03 9:03 PM
Hi Abhishek,
I don't think that you are able to differentiate between null and "0.00" here.
Null values can be recognized on database level (they could e.g. arise for existing records when you create an additional column in a database table). In ABAP itself (leaving aside SELECT) you can only check for initial values (but not for null). The initial value for P is "0". Therefore the dynpro displays "0.00" in your case.
Some thoughts. I cannot say more without knowing the exact use-case:
1) if you have a read-only field, you could create an additional CHAR field on the screen. Then you could get empty columns for initial values / "0" values (that only partly solves the topic for you). Example
2) if you want to differentiate between "user has entered 0.00" and "user has not entered anything", you need to somehow memorize that the user has entered something (and you might have to be able to recover this from the database, if your program has a persistence).
Best regards
Thorsten
2012 Aug 04 1:46 PM
Hi Abhi,
i have a doubt is the " Con SCM/Ton " a field present in the table you used in the module pool program.
if it is so just try to change the data type of the data element you used for that field .
make it as Data Type : QUAN
No. of cahr : 4.
decimal Places : 2.
use this field.
Thank You
Ron
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |