IF / ELSE Condition Handling
Task
Write ABAP logic using IF, ELSEIF, and ELSE to determine a student’s result based on marks obtained.
- Use IF / ELSEIF / ELSE
- Compare numeric values
- Assign appropriate result text
Write Your ABAP Code
Loading...
📥 Sample Input & Output
Input: lv_marks = 65 Output: lv_result = 'Pass'
💡 Hint
Check the marks range using IF andELSEIF. Use ELSE for the default case.
✅ View Reference Solution
IF lv_marks >= 75. lv_result = 'Distinction'. ELSEIF lv_marks >= 50. lv_result = 'Pass'. ELSE. lv_result = 'Fail'. ENDIF.