on 05-26-2010 4:09 PM
Dear Friends,
Is it possible to freez (when scrolled) first few columns in ABAP Webdynpro ALV?
Regards,
Vijay.
Hi,
Use this method SET_FIXED_POSITION of class cl_salv_wd_column to fix the postion of your column.
Refer this help document
http://help.sap.com/saphelp_nw70/helpdata/EN/43/98b9423d17c511e10000000a1550b0/frameset.htm
First you have to fetch all alv columns and then loop at each columns and get reference of it, then you can call above mentioned method.
You can also make a where used list of mentioned method to find sample usages.
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vijay - Manas has answered your question but I will provide you the code so you can follow the steps:
data: lr_column Type Ref To cl_salv_wd_column,
lv_value Type Ref To cl_salv_wd_config_table,
lr_cmp_usage Type Ref To if_wd_component_usage,
lo_interfacecontroller Type Ref To iwci_salv_wd_table.
lr_cmp_usage = wd_this->wd_cpuse_alv( ). *ALV is the name you enter for your component usage when declaring component SALV_WD_TABLE at the beginning.
if lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
endif.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ). *once again your ALV name
lv_value = lo_interfacecontroller->get_model( ).
lr_column = lv_value->if_salv_wd_column_settings~get_column( 'Your Attribute name of the column' ).
lr_column->set_fixed_position( cl_wd_abstr_table_column=>e_fixed_position-left ). * here it locked your column at the left side of the screen
Good Luck!
Thanks!
Jason PV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to both of you. Still I couldnt resolve this issue.
When I execute to see my ALV output, I have scroll bar to my browser, but not to my ALV table.
A basic question here, do u have scroll bar to ur ALV? if yes, please let me know how to achive that?
as long as we have scrollbar to our browser I dont think so its possible.
Regards,
Vijay.
Vijay - you are correct, webdynpro code don't control the web browser scroll bar (if someone know, please post)
But you can add a scroll bar to your ALV with the following code, let's say that you have 15 columns in your ALV so you will set it to less than 15 so you have the scroll bar available in your screen you can implemented with the other code in my last post:
DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table,
lo_value TYPE REF TO cl_salv_wd_config_table,
lo_table_settings TYPE REF TO if_salv_wd_table_settings.
lo_cmp_usage = wd_this->wd_cpuse_alv( ). "your ALV name in the component usage
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
lo_value = lo_interfacecontroller->get_model( ).
IF lo_value IS NOT INITIAL.
lo_table_settings ?= lo_value.
lo_table_settings->set_scrollable_col_count( 10 ). "here you can play with the number, remember that it needs to be less than your total columns.
ENDIF.
Hope this help.
Please provide points if is helpful!
Jason PV
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.