2007 Aug 14 2:10 PM
Hi all
How can i display the various functions in an alv using factory class?
Points will be rewarded
Regards
Vivek
2007 Aug 14 2:14 PM
Hii
are your referring to the factory class CL_SALV?
If so, here is some sample code:
use the CL_SALV_FUNCTIONS class. Create the object reference variable and receive the object using the GET_FUNCTIONS method of the GR_TABLE object.
Call the method SET_ALL to force the ALV grid to show all standard functions.
report zalvom_demo1.
data: ispfli type table of spfli.
data: gr_table type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
start-of-selection.
select * into table ispfli from spfli.
cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ).
gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_table->display( ).
Regards
Preeti
Plz reward if useful
Thnk you for prompt reply.
I got the desired output
2007 Aug 14 2:14 PM
Hii
are your referring to the factory class CL_SALV?
If so, here is some sample code:
use the CL_SALV_FUNCTIONS class. Create the object reference variable and receive the object using the GET_FUNCTIONS method of the GR_TABLE object.
Call the method SET_ALL to force the ALV grid to show all standard functions.
report zalvom_demo1.
data: ispfli type table of spfli.
data: gr_table type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
start-of-selection.
select * into table ispfli from spfli.
cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ).
gr_functions = gr_table->get_functions( ). gr_functions->set_all( abap_true ). gr_table->display( ).
Regards
Preeti
Plz reward if useful
2007 Aug 14 2:16 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |