REPORT  z17_15                                 .

 

DATA gt_itab    TYPE TABLE OF sflight.

DATA gr_table   TYPE REF TO cl_salv_table.

DATA gr_sorts   TYPE REF TO cl_salv_sorts.

DATA gr_agg     TYPE REF TO cl_salv_aggregations.

 

SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_itab

UP TO 25 ROWS.

 

cl_salv_table=>factory(

             IMPORTING

                          r_salv_table = gr_table

             CHANGING

                          t_table      = gt_itab ).

 

gr_sorts = gr_table->get_sorts( ).

gr_sorts->add_sort( columnname = 'CONNID' subtotal = 'X' ).

gr_agg = gr_table->get_aggregations( ).

gr_agg->add_aggregation( 'PRICE' ).

 

gr_table->display( ).

사이트운영 : http://sapjoy.co.kr  

저         서 : Easy ABAP, Plus ABAP

경         험 : SAP ABAP Tuning, SAP SCM(SD/PP/QM/PM/WM/APO)

자         격 : SAP SD / PP  / SAP ABAP Certification 등

메         일 : sapjoy@naver.com