NAVAPAT_T

ABAP : MAX,MIN with name(openSQL)

Jul 21st, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 0.48 KB | None | 0 0
  1. TABLES : zpat_student.
  2. data : max_score type zpat_student-score,
  3.       names type zpat_student-name,
  4.       min_score type zpat_student-score.
  5. *--------------find max,min score-------------------------
  6. select max( score ) min( score ) into (max_score, min_score)
  7.   from zpat_student.
  8. *-------------find name matching with score---------------
  9.   SELECT * from zpat_student where score = max_score or score = min_score.
  10.     write : / zpat_student-name, zpat_student-score.
  11.   ENDSELECT.
Advertisement
Add Comment
Please, Sign In to add comment