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

What are the different methods of bdc? : abap bdc

1010


What is the function of the transport system and workbench organiser?

1052


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

1054


Explain the concept of clusters in payroll

2710


What are control tables? : abap data dictionary

977


How do you validate the selection criteria of a report? And how do you display initialvalues in a selection screen?

1157


What are the rules to create a BAPI?

1616


How move-corresponding works

1346


What are the aggregate objects in the dictionary? : abap data dictionary

1148


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

2930


What are aggregated objects : abap data dictionary

1024


What are the techniques involved in using sap supplied programs?

1006


How will you define posting procedures?

1325


What is the difference between free and refresh?

1078


What are the steps in a bdc session? : abap bdc

975