Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How we can give authorization on the fields of table control in a dialog-programming?

2327


What is a table pool? : abap data dictionary

1079


Difference between transparent tables and pooled tables? : abap hr

1138


Difference between sy-tabix and sy-index?

1338


Explain the differences between sap memory and abap memory?

985


Explain the differences between se01, se09 and se10?

1122


Setting up a BDC program where you find information from?

1212


What is output determination?

1231


What are the sequences of event block?

1085


How will you find manager of an employee

1339


Explain the function module in bdc?

1048


What are critical issues you have faced in your project

3363


Did you use buffering?

1098


What is the disadvantage of a call by reference? : abap modularization

1125


what is mean be On Change of in Control Break statement

1292