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 / sivaramakrishna

according to our requirment
get allthe records using select * from st_db into stu_itab1.
1.first sort the stu_itab1 by marks field.
now use the select single section from st_db into stu_itab2.
now we have to use select for all entries as below.
select section marks from stu_itab1 into table stu_itab3
for all entries in stu_itab2 upto 10 rows.

it may be not exact . but do try in this way

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will be your approach towards optimizing legacy code? Will you suggest change in technology? Does OO ABAP bring any performance benefits? How will you deal with queries in a loop? How will you optimize nested loops?

908


What is evaluation path, where do we do it and why? : sap abap hr

579


Explain pai and pbo.

720


Of the two call transaction and session method, which is faster?

702


Name the function module used to convert logical file names to physical file names in abap/4 programs?

596






What are the 3 types of tables in sap? : abap data dictionary

651


Is it possible to run host command from SAP environment? How do you run?

620


What are the Various Types of internal tables?

744


HI GUYS , FOR SAP INSTITUTION ATOS I BEST OR NOT? IAM PLANNING TO LEARN SAP COURSE IN ATOS... GIVE ME UR SUGGESTION ABOT ATOS?

2406


What is a currency factoring technique?

702


What does nw 7.4 sp 05/nw 7.5 sp 02 offers in abap?

692


Explain what are the events used in interactive reports?

496


How do you process errors in call transaction method? : abap bdc

688


How to read files and process BDC's automatically ?

1633


What are the difference between tables and structures? : abap data dictionary

665