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

REPORT zscenario.
DATA itab LIKE zabc OCCURS 10 WITH HEADER LINE.
SELECT * FROM zbad5 INTO TABLE itab.
SORT itab BY sclass smarks.
LOOP AT itab.

AT NEW sclass.

WRITE: / itab."-sno1 itab-sclass itab-smarks.

ENDAT.
This display the report based upon the class.But i don't know how to retrieve 10 records from each class.

ENDLOOP.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are Pull and Push Methods?

1784


What are the layers of data description in r/3? : abap data dictionary

644


What are the functional areas, user groups? How does abap query work in relation to these?

595


What is logo in sap script?

577


SM35 transaction, How to automate BDC ?

622






Explain the inside concept in select-options?

570


How to convert the Unit for 'Distance' (The value from one Unit to another).

1450


In which table the material master data is stored?

573


Application Category?

924


What are the different methods of bdc? : abap bdc

609


Can we access static attribute from instance method

1006


Difference between transparent tables and pooled tables? : abap hr

563


What are differences between at selection-screen and at selection-screen output?

783


Difference between sy-tabix and sy-index? Where it is used?

541


What is the syntax for ‘call transaction’?

614