A database table contains 3
fields(Student_no,Section,Total_marks).I want retrieve top 10
students from each section.Note:(Section contains data like
A,B,C.Each section contains more than 10 students).
Answer Posted / waseem
DATA itab LIKE zabc OCCURS 10 WITH HEADER LINE.
SELECT * FROM zbad5 INTO TABLE itab.
SORT itab BY sclass smarks.
data : count type i value 0.
LOOP AT itab.
AT NEW sclass.
count = count + 1.
IF ( count LE 10 ).
WRITE: / itab."-sno1, itab-sclass, itab-smarks.
ENDIF.
ENDAT.
AT END of sclass.
count = 0.
ENDAT.
ENDLOOP.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How we can give authorization on the fields of table control in a dialog-programming?
What is a table pool? : abap data dictionary
Difference between transparent tables and pooled tables? : abap hr
Difference between sy-tabix and sy-index?
Explain the differences between sap memory and abap memory?
Explain the differences between se01, se09 and se10?
Setting up a BDC program where you find information from?
What is output determination?
What are the sequences of event block?
How will you find manager of an employee
Explain the function module in bdc?
What are critical issues you have faced in your project
Did you use buffering?
What is the disadvantage of a call by reference? : abap modularization
what is mean be On Change of in Control Break statement