‎2008 Mar 10 12:00 PM
Program as following :
=========================================
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE LINE OCCURS 10.
DO 40 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
APPEND LINE TO ITAB.
ENDDO.
DELETE ITAB FROM 3 TO 38 WHERE COL2 > 20.
LOOP AT ITAB INTO LINE.
WRITE: / LINE-COL1, LINE-COL2.
ENDLOOP.
其输出为:
1 1
2 4
3 9
4 16
39 1.521
40 1.600
==========================================
why square of 39 is 1.521 and square of 40 is 1.600 but not 1521 and 1600 ?
is it limited by type i ?
‎2008 Mar 10 12:07 PM
Hi
Don't worry your program is working fine. Its not 1.521 its 1,521.
Imean to say its not '.' its comma ",".
EX. 1,00,00,000
Regards
Aditya
‎2008 Mar 10 12:07 PM
Hi
Don't worry your program is working fine. Its not 1.521 its 1,521.
Imean to say its not '.' its comma ",".
EX. 1,00,00,000
Regards
Aditya
‎2008 Mar 10 12:12 PM
DELETE ITAB FROM 3 TO 38 WHERE COL2 > 20.
====this sentence has been delete rows where cols>20.
1521 and 1600 are both larger than 20 ,why didn't delete them ?
‎2008 Mar 10 12:14 PM
Hi,
U mentioned it to delete from 3 to 38 .39 and 40 are out of range .hence they were printed
Regards
‎2008 Mar 10 12:19 PM
DELETE ITAB FROM 3 TO 38 WHERE COL2 > 20.
UR deleting ITAB entries from 3 to 38 where COL2 > 20.
The other two are out of range .. 39 and 40 .. hence they ate not
deleted
‎2008 Mar 10 12:19 PM
‎2008 Mar 10 12:10 PM
I think its the user settings ..
Check
System > user profile> Own data
In Defaults tab .. check for the decimal notification ..
It should be 1,234,567.89 ...
your current settings are 1.234.567,89
‎2008 Mar 10 12:11 PM
Hi
Instead Of I type, use P since I has smaller size and P is used to contain larger value .
Rewards Points If Helpful.