on 03-19-2015 9:28 PM
Hi All,
I have one issue in displaying decimal places for field ATP of type Quantity Web dynpro.
ATP is one of the attribute in a node having properties similar to KWMENG
Three cases are there.
Case 1:
If quantity is INITIAL then ATP field should be Empty value.
Case 2:
If Quantity is a number like 1500, it should display 1500 only but not 1500.000.
Case 3:
If Quantity is having decimal value then it should show decimal value for Eg 1500.450, it should display 1500.450.
My program is failing in case 2.
How to resolve this
HI VR V,
I wish i could find some FM for that. tried to write an test program
with basic coding logic. this is working as you said. try..
PARAMETERS: lv_var TYPE p DECIMALS 3 DEFAULT '10.500'.
DATA: lv_rem TYPE p.
DATA: lv_int TYPE i.
lv_int = lv_var.
lv_rem = lv_var MOD lv_int.
IF lv_rem IS INITIAL.
WRITE: 'Converted number', lv_var DECIMALS 0.
ELSE.
WRITE: 'Converted number', lv_var DECIMALS 2.
ENDIF.
WRITE: / 'Original number',lv_var DECIMALS 3 NO-ZERO.
Thank you,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.