2006 Sep 19 6:15 PM
Hello there,
I have a code segment that would do something if one of about 40 criteria is returns true. I know that in Case statement, you can write as When...or...or...or...and so on but I am really hoping to find a better way (say for example, using internal table) or something so that my statement does not appears to be so long (imagine you have to hard-code in 40 criteria!) Could anyone help me with that? Thanks a lot!
Regards,
anyi
2006 Sep 19 6:22 PM
Hi,
If all the case statement has the piece of code...or atlease some of them have the same piece of code..Use RANGES...and group them together...
Thanks,
Naren
Hi,
If all the case statement has the piece of code...or atlease some of them have the same piece of code..Use RANGES...and group them together...
Thanks,
Naren
2006 Sep 19 6:19 PM
store all ur cases to one internal table with one field named <b>CASE</b>
then..
loop at itab.
case itab-<b>case</b>.
endcase.
endloop
2007 Jan 09 8:18 PM
I am having a similar issue. I don't quite fully understand the idea of using a itab, case, which has all my values. Can you please clairify..perhaps a sample piece of code?
Thanks,
2006 Sep 19 6:22 PM
Hi,
If all the case statement has the piece of code...or atlease some of them have the same piece of code..Use RANGES...and group them together...
Thanks,
Naren
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |