cancel
Showing results for 
Search instead for 
Did you mean: 

FPM LIST - Dynamically set the position of column

Former Member
0 Kudos


How to set the index or position of a List column dynamically in FPM LIST?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

ulrich_miller
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

ulrich_miller
Active Participant
0 Kudos

I am afraid, if you have to go with static column configuration then it is unfortunately not possible to change the column order at runtime programmatically.

Former Member
0 Kudos

Hello Ulrich,

Thanks for your suggestion and information.

Regards,

Naga