25 lines
446 B
Plaintext
25 lines
446 B
Plaintext
If the same logic is needed for both instances the conditions should be combined.
|
|
|
|
[source,abap,diff-id=1,diff-type=compliant]
|
|
----
|
|
IF (a >= 0 AND a < 10) OR (a >= 20 AND a < 50).
|
|
doFirst.
|
|
doTheThing.
|
|
ELSEIF a >= 10 AND a < 20.
|
|
doTheOtherThing.
|
|
ENDIF.
|
|
----
|
|
|
|
[source,abap,diff-id=2,diff-type=compliant]
|
|
----
|
|
CASE i.
|
|
WHEN 1 OR 3.
|
|
doFirst.
|
|
doSomething.
|
|
WHEN 2.
|
|
doSomethingDifferent.
|
|
WHEN OTHERS.
|
|
doTheRest.
|
|
ENDCASE.
|
|
----
|