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
What are the steps to be followed to set lockobjects? : sap abap data dictionary
What are the prerequisites for creating foreign key relationship?
When a program is created and need to be transported to prodn does selection texts always go with it? If not how do you make sure? Can you change the cts entries? How do you do it?
What is the difference between bdc_open_group and bdc_open_dataset. : abap bdc
hi frends this is bala raju from pune.i want to know diff between 4.7ee and ecc 5.0.if possible give me brief explanation.this question was asked in EDS(tele interview) in pune bye.
Interactive Report that list purchase order details of a vendor. When the user double clicks on material number it shows detail list with fields matkl, meins, brgew, ntgew, gewei.The selection screen consist of sales organisation, distribution channel and material number. plz mention the detail coding Tahnks, Rahul
In sap scripts, how will you link form with the event driven?
What is amdp (abap managed data procedures)?
How do you write manual bdc session method? : abap bdc
What are the objects of the abap dictionary or what types of objects can be created in the abap dictionary? : abap data dictionary
Why bapi need then bdc ? : abap bdc
What are data classes? What are the various data classes available for selection? : abap data dictionary
Explain get pernr concept when we use logical data base? : abap hr
What is generic area buffering in abap?
Explain how data is stored in cluster table?