2013 Jun 21 10:21 AM
| Number | Name | Type | Type 1 | 180 | 50 | 100 | 30 | 30 | 30 | |||
| Type 2 | 120 | 90 | 30 | |||||||||
| Type 3 | 100 | 0 | 70 | 30 | 30 | 30 | ||||||
| Type 4 | 10 | 0 | 0 | 0 | 0 | 0 | ||||||
| Total | 410 | 140 | 200 | 60 | 60 | 60 | ||||||
I can get the data till type 1-4 but how can we attach internal table to cl_salv_table disply and also the total in the last row ?
2013 Jun 21 7:33 PM
Hi,
Please looks at program SALV_DEMO_METADATA .
form set_aggregations.
Please check out the demo programs in Package SALV_OBJECTS for more goodies....
Regards.
| Number | Name | Type | Type 1 | 180 | 50 | 100 | 30 | 30 | 30 | |||
| Type 2 | 120 | 90 | 30 | |||||||||
| Type 3 | 100 | 0 | 70 | 30 | 30 | 30 | ||||||
| Type 4 | 10 | 0 | 0 | 0 | 0 | 0 | ||||||
| Total | 410 | 140 | 200 | 60 | 60 | 60 | ||||||
I can get the data till type 1-4 but how can we attach internal table to cl_salv_table disply and also the total in the last row ?
2013 Jun 21 1:07 PM
Hi Ravi
You can call the method SET_DATA of cl_salv_table with passing the internal table and call DISPLAY method of cl_salv_table of display the table.
if you want to "Total" row in your table display. than take a structure of like internal table and loop at internal table,add the value of column wise records in others local varible, afte loop assign these local var values to your structure elements corresponding and than append this structure to your internal table.
Afte that call the REFRESH method of cl_salv_table class.
Regards
Amit Verma
2013 Jun 21 1:18 PM
Share your exact code of calling CL_SALV_TABLE and also if there is any usage of class CL_SALV_COLUMNS.
For totals in last row, sort the data using CL_SALV_SORT.
Cheers!
Abhinab
2013 Jun 21 4:36 PM
method GENERATE_OUTPUT.
DATA: lx_msg TYPE REF TO cx_salv_msg.
DATA: lr_salv_sorts TYPE REF TO cl_salv_sorts.
data: gr_funct type ref to cl_salv_functions.
data: gr_columns type ref to cl_salv_columns_table.
data: gr_column type ref to CL_SALV_COLUMN_table.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = o_alv
CHANGING
t_table = t_intab.
CATCH cx_salv_msg INTO lx_msg.
ENDTRY.
gr_funct = o_alv->get_functions( ).
gr_funct->set_all( Abap_True ).
o_alv->display( ).
endmethod.
1. The dynamic transparent table is giving data from column 1 to column 4 as shown above in table. And also need to merge the rows with similar data from column 1 to 3.
2. Another internal table is to be shown simultaneously giving the total both right and down side of the internal table like in above table from column 5 to 10.
At this moment I am getting the display from column 1 to 4 using above code without merge. but now how we can attach the internal table with such total on both sides ?
2013 Jun 21 7:33 PM
Hi,
Please looks at program SALV_DEMO_METADATA .
form set_aggregations.
Please check out the demo programs in Package SALV_OBJECTS for more goodies....
Regards.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |