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
Is logo in script 1st stored as tiff format before uploading or in jpeg format?and where is that stored after uploading?
Events that can be used in both the classical and interactive reports
Have you processed BDCs ?
What is sql trace? : abap data dictionary
What is the project you are currently working and work that you are doing
How to transfer data into line items using batch input session method? : abap bdc
What is off cycle payroll run
How do you validate the selection criteria of a report? And how do you display initial
Can you print decimals in type n? What is difference between float and packed data type?
please give the remaining answers.
If your project is support project ? when is your implementation has completed ?
hi,how to diable the popup window which is displayed afetr executing the SAP script program?
What is meant by slab? How is indian slab and us slab? : sap abap hr
Which commands are used for interactive reports?
What is the use of info groups? : sap abap hr