Case Statement usage
Case statements in ABAP are great. Not only do they let you handle your logic flow like other control flow statements but also provide a clean/ better readable way to branch into multiple sublogics.
A typical use of a case statement is something like this as [CASE variable: WHEN value]:
However, they can also be used as [CASE values: WHEN variable] way.
Let's assume:
We have to validate and report if some variables have data or not.
One way to do it would be:
Another way to use Case statement:
I prefer this way as it increases readability and in my opinion cleaner.