on 09-04-2015 7:40 PM
How to set the index or position of a List column dynamically in FPM LIST?
Hello Mallika,
In list uibb, implement the following method from IF_FPM_LIST_SETTINGS_COLUMN interface.
You can use DISPLAY_AT_POSITION method and achieve the same. Pass some value(required column position) to IV_POSITION parameter of this method.
Before this you need to get the column name.
Sample Code:
data: lo_column type ref to if_fpm_list_settings_column,
lo_var type ref to cl_fpm_list_settings_variant,
lv_move_col_name type string,
l_move_to_position type i.
lo_column = lo_var->if_fpm_list_settings_variant~get_column( lv_move_col_name ).
lo_column->display_at_position( l_move_to_position ).
Hope this will helps you.
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naga, Mallika,
please never ever use coding that does not belong to a public API. This will always create absolute disaster in the end.
I am afraid to tell that IF_FPM_LIST_SETTINGS_COLUMN does not belong to public API, so do not use this. Besides in your example coding, how do you get access to cl_fpm_list_settings_variant, I do not think that is possible.
Now to your actual question about how to programmatically determine the order of the columns: Usually the order of the columns is determined statically by the configuration, but you can do this: In the configuration do not add any columns. As a result the feeder class method get_default_config( ) is getting called. There you will see a public API that you can use in order to add the columns in the order that you prefer.
Kind regards,
Ulrich
Hi Ulrich and Naga,
Thanks for your responses.
I am using WIRE Schema and using FPM_LIST_UIBB_ATS component as target and hence I need to have static component configuration for the LIST component. Also in the GET_DATA method of the list feeder class, I am populating the data and here based on the current date, I would like to set the columns position.
When I have both static and dynamic configurations, Get_default_config method will not even be called.
Since Static configuration is must in this scenario, is there any way dynamically I can set or change the column position in any of the methods??
Appreciate your help.
Mallika
User | Count |
---|---|
89 | |
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.