2007 Apr 28 2:04 PM
hi,
what is the difference between following two conditions
DATA : a(10) value 'kumar'.
IF a IS NOT INITIAL.
IF NOT a IS INITIAL.
regards,
Kumar
2007 Apr 28 2:14 PM
Hi,
Basically the two statements mean that checking the variable 'a' whether it contains any value or not.
thanks,
sksingh
hi,
what is the difference between following two conditions
DATA : a(10) value 'kumar'.
IF a IS NOT INITIAL.
IF NOT a IS INITIAL.
regards,
Kumar
2007 Apr 28 2:07 PM
Hi,
IF a IS NOT INITIAL. - This is wrong statement. there is syntax error in this statement.
IF NOT a IS INITIAL - This is correct statement. There is no syntax error in this statement. this statement is checking whether the variable 'a' is empty or not.
rewards if useful.
thanks,
sksingh
2007 Apr 28 2:11 PM
hi sksingh,
there is no syndax error for both ..
regards,
kumar.
2007 Apr 28 2:14 PM
Hi,
Basically the two statements mean that checking the variable 'a' whether it contains any value or not.
thanks,
sksingh
2007 Apr 28 2:29 PM
Hi,
In previous versions of R/3 , IF a IS NOT INITIAL was a syntax error.
But now both versions are correct.
The second version was introduced because the first one was not very readable.
Between the two,
IF NOT a IS INITIAL is said to be faster since the comparison is positive logic.
IF a IS NOT INITIAL is said to be negative comparison logic. And checking equality is always faster than checking inequality.
But for readability, IF a IS NOT INITIAL is preferred. The performance advantage is not too high.
Hope this helps.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |