2011 Mar 31 6:05 PM
hi,
is there a way to add select/deselct column to report?
i am using SALV to create it .
thanks
2011 Apr 01 8:02 AM
Hi,
DATA: o_table TYPE REF TO cl_salv_table,
o_selections TYPE REF TO cl_salv_selections.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = o_table
CHANGING
t_table = t_vbak
.
CATCH cx_salv_msg .
ENDTRY.
o_selections = o_table->get_selections( ).
CALL METHOD o_selections->set_selection_mode
EXPORTING
value = 3.
This will create the Select/Deselect Column to the Report. The Method SET_SELECTION_MODE of CLASS CL_SALV_SELECTIONS will help you in achieving this.
Thanks and Regards,
Rathish R Nair
hi,
is there a way to add select/deselct column to report?
i am using SALV to create it .
thanks
2011 Mar 31 6:36 PM
Give your users the layout capability, by using the SALV Standard GUI Status copied from one of the SALV* demo programs in SAP. In SE80, show the GUI status, right click on it and copy into your program name...adjust as needed....Here's what I use in SALV:
data: gr_layout TYPE REF TO cl_salv_layout,
gr_alv TYPE REF TO cl_salv_table,
gs_key TYPE salv_s_layout_key,
. . .
gs_key-report = sy-repid.
. . .
* User can save layout.
gr_layout = gr_alv->get_layout( ).
gr_layout->set_key( gs_key ). "Pass Program Name
gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ). "user can do all layout functions including change displayed * columns and sorts, etc.
gr_layout->set_default( cl_salv_layout=>true ). "user can set his default layout.Or...in your field catalog definition:
( declared gr_column type ref to cl_salv_column_table)
gr_column->set_visible( abap_false ).Edited by: BreakPoint on Mar 31, 2011 7:37 PM
2011 Mar 31 6:36 PM
2011 Mar 31 6:40 PM
?? to choose whether or not to display a column in SALV? You have heard of SALV , right?
2011 Apr 01 8:02 AM
Hi,
DATA: o_table TYPE REF TO cl_salv_table,
o_selections TYPE REF TO cl_salv_selections.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = o_table
CHANGING
t_table = t_vbak
.
CATCH cx_salv_msg .
ENDTRY.
o_selections = o_table->get_selections( ).
CALL METHOD o_selections->set_selection_mode
EXPORTING
value = 3.
This will create the Select/Deselect Column to the Report. The Method SET_SELECTION_MODE of CLASS CL_SALV_SELECTIONS will help you in achieving this.
Thanks and Regards,
Rathish R Nair
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |