2005 Jul 30 7:36 AM
Hi~ gurus...
Let me ask someting. something funny and weird.
I used 'if~ elseif~ endif' statement, in my code(abap).
Like this,
if ....
elseif ....
elseif ...
....X 24times.
endif.Is there any limit usage of 'elseif' satement? I used elseif statement 24 times.
however, it only works 18th elseif statement, from 19th 'elseif' it doesn't works(the flow goes endif.)
Is it a bug ? or is there any limit usage of elseif?
I couldn't find any help file.
Thanks in advance for your reply.
Best Regards
Kyung Woo.
2005 Jul 30 7:52 AM
or you sure it did not get caught into your 18th elseif?
I mean, are you saying that 18th elseif was actually false still it didn't reach the 19th elseif?
Cheers,
Ram
Hi~ gurus...
Let me ask someting. something funny and weird.
I used 'if~ elseif~ endif' statement, in my code(abap).
Like this,
if ....
elseif ....
elseif ...
....X 24times.
endif.Is there any limit usage of 'elseif' satement? I used elseif statement 24 times.
however, it only works 18th elseif statement, from 19th 'elseif' it doesn't works(the flow goes endif.)
Is it a bug ? or is there any limit usage of elseif?
I couldn't find any help file.
Thanks in advance for your reply.
Best Regards
Kyung Woo.
2005 Jul 30 7:52 AM
or you sure it did not get caught into your 18th elseif?
I mean, are you saying that 18th elseif was actually false still it didn't reach the 19th elseif?
Cheers,
Ram
2005 Jul 30 7:59 AM
Hi, replace the IF ELES with CASE WHEN, as there is so many if steps, using a case replace it looks better.
2005 Jul 30 9:46 AM
Hi Kyung
I tried the same thing. Its working fine.
Can you put the code here.
Regards
Naresh
2005 Jul 30 11:11 AM
hi,
i dont think there is any such limitation on placing the number of if...elseif statements. the only problem could be with memory limitations depending on your hardware configurations.....(even that should not be a problem with just 18 elseif's.
try and debug carefully....
regards,
PJ
2005 Jul 30 11:31 AM
Hi Kyung,
There is a limit of code size between IF and ENDIF.
IF-statement can only jump 32KB of byte code. So effectively, the source code between the IF- and ENDIF-statements, when compiled, must not be more than 32KB of byte code. You should use case statement instead.
Hope it helps.
Regards,
Narinder Singh
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |