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 is its? : abap hr
How many types of data classes are there in sap abap? : abap data dictionary
Badi concepts
Explain the use of insert and append statement in sap abap?
What do you mean by batch data communications programming?
Explain what are the events in screen programming?
Which function modules can be used to transfer the data using bdc programming? : abap bdc
Explain what is the difference between primary key and unique key?
What are the different kinds of lock modes?
HOW CAN YOU USE A PAGE COUNT IN CALLING A PAGE IN SMARTFORM?
What are the uses of the information in the data dictionary? : abap data dictionary
Have you processed BDCs ?
What do is landscape in sap project, I think its related to no. Of servers used, pls correct me if I am wrong, or what it is? : sap abap hr
Explain the session method? : abap bdc
Why do we need to code a loop statement in both the pbo and pai events for each table in the screen?