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 is its? : abap hr

1093


How many types of data classes are there in sap abap? : abap data dictionary

1150


Badi concepts

1442


Explain the use of insert and append statement in sap abap?

1136


What do you mean by batch data communications programming?

1013


Explain what are the events in screen programming?

1071


Which function modules can be used to transfer the data using bdc programming? : abap bdc

1198


Explain what is the difference between primary key and unique key?

1168


What are the different kinds of lock modes?

1097


HOW CAN YOU USE A PAGE COUNT IN CALLING A PAGE IN SMARTFORM?

2121


What are the uses of the information in the data dictionary? : abap data dictionary

1260


Have you processed BDCs ?

1115


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

1121


Explain the session method? : abap bdc

1219


Why do we need to code a loop statement in both the pbo and pai events for each table in the screen?

1144