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

Is logo in script 1st stored as tiff format before uploading or in jpeg format?and where is that stored after uploading?

2001


Events that can be used in both the classical and interactive reports

1555


Have you processed BDCs ?

1019


What is sql trace? : abap data dictionary

1142


What is the project you are currently working and work that you are doing

1497


How to transfer data into line items using batch input session method? : abap bdc

1036


What is off cycle payroll run

2187


How do you validate the selection criteria of a report? And how do you display initial

1035


Can you print decimals in type n? What is difference between float and packed data type?

1158


please give the remaining answers.

2173


If your project is support project ? when is your implementation has completed ?

2017


hi,how to diable the popup window which is displayed afetr executing the SAP script program?

2023


What is meant by slab? How is indian slab and us slab? : sap abap hr

1057


Which commands are used for interactive reports?

1150


What is the use of info groups? : sap abap hr

989