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
What are the different methods of bdc? : abap bdc
What is the function of the transport system and workbench organiser?
How to transfer data into line items using batch input session method? : abap bdc
Explain the concept of clusters in payroll
What are control tables? : abap data dictionary
How do you validate the selection criteria of a report? And how do you display initialvalues in a selection screen?
What are the rules to create a BAPI?
How move-corresponding works
What are the aggregate objects in the dictionary? : abap data dictionary
hi..i hav developed an interactive report in which alv list display in basic list and 1st secondary list in alv grid display.I want to get summation(total) of the columns in the secondary list.I hav used 'do_sum' but i couldnt get.is there any other way to get summation(total) in secondary list which is an alv grid display
What are aggregated objects : abap data dictionary
What are the techniques involved in using sap supplied programs?
How will you define posting procedures?
What is the difference between free and refresh?
What are the steps in a bdc session? : abap bdc