Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CL_SALV_TABLE

Former Member
0 Likes
1,054

hi,

Can anyone tell me how to handle user commands using CL_SALV_TABLE method.if possible please attach the code sample.

Thanks.

Sarala.

Message was edited by:

SAP SAR

hi,

Can anyone tell me how to handle user commands using CL_SALV_TABLE method.if possible please attach the code sample.

Thanks.

Sarala.

Message was edited by:

SAP SAR

6 REPLIES 6
Read only

Former Member
0 Likes
975

data: gt_outtab type table of SFLIGHT.

data: gr_table type ref to cl_salv_table.

data: lr_aggregations type ref to cl_salv_aggregations.

select * from SFLIGHT into corresponding fields of table gt_outtab.

call method cl_salv_table=>factory

IMPORTING

R_SALV_TABLE = gr_table

changing

t_table = gt_outtab.

lr_aggregations = gr_table->get_aggregations( ).

lr_aggregations->clear( ).

try.

lr_aggregations->add_aggregation( columnname = 'SEATSMAX' ).

catch cx_salv_not_found cx_salv_data_error cx_salv_existing.

endtry.

gr_table->display( ).

The above code sets the aggregation (SUM) for column "SEATSMAX"

Please give me reward points.

Thanks

Murali Poli

Read only

0 Likes
975

Hi ,Thanks for your replay,

But this is not answer for my question.please read the question again.

Read only

0 Likes
975

Hi Murali,

I have tried your code for sum the values of the required columns.

But it not works for me.

And how to create sum text at the end of the result.

Read only

0 Likes
975

Hi.

I am also having the same problem with your code.

It didnt show the sum of the columns.

Pls help this.

Read only

0 Likes
975

Thanks I solved my problem

Read only

Former Member
0 Likes
975

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=53583

Edited by: SongLi on Sep 3, 2009 8:18 AM

Edited by: SongLi on Sep 3, 2009 8:18 AM