2010 Sep 22 9:30 AM
Hi,
The output is now displayed using OOPS FACTORY ALV METHOD and TREE format is used. An internal table is passed to instantiate and all the columns of this internal table is picked up for display. Is there any method where I can eliminate any particular column from the output.
Pls. help me.
Thank you.
2010 Sep 22 10:48 AM
Hi ,
u can use method SET_VISIBLE of class CL_SALV_COLUMN for making a particular column invisible.
See SAP demo code SALV_DEMO_TREE_SIMPLE for details....
After creating the ALV u need to write
data: lr_column type ref to cl_salv_column.
try.
lr_column = ir_columns->get_column( 'MANDT' ).
lr_column->set_visible( if_salv_c_bool_sap=>false ).
catch cx_salv_not_found.
endtry.
Amitava
Sorry, i focused on "alv-tree-method" and forget factory (that's something i don't use so much :\).
2010 Sep 22 9:38 AM
Have you tried removing the column you don't want from the fieldcat?
2010 Sep 22 9:39 AM
Hi Simone,
If this normal use where we use a field catalog, it is easy to remove the column. This is using Factory method and hence the confusion.
Thank you.
2010 Sep 22 9:47 AM
Sorry, i focused on "alv-tree-method" and forget factory (that's something i don't use so much :\).
2010 Sep 22 10:48 AM
Hi ,
u can use method SET_VISIBLE of class CL_SALV_COLUMN for making a particular column invisible.
See SAP demo code SALV_DEMO_TREE_SIMPLE for details....
After creating the ALV u need to write
data: lr_column type ref to cl_salv_column.
try.
lr_column = ir_columns->get_column( 'MANDT' ).
lr_column->set_visible( if_salv_c_bool_sap=>false ).
catch cx_salv_not_found.
endtry.
Amitava
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |