cancel
Showing results for 
Search instead for 
Did you mean: 

FPM_LIST_UIBB Column Optimization

stefan_kagelmacher
Participant
0 Kudos

Hi,

is there a way to set colum optimization in FPM_LIST_UIBB dynamically?

Many THX and Best regards.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Create a enhancement in the view V_LIST method WDDOMODIFYVIEW -Post Exit and copy the code

DATA: lr_config TYPE REF TO cl_salv_wd_config_table.

   IF wd_comp_controller->mo_alv IS BOUND.

*... Configure ALV

     lr_config = wd_comp_controller->mo_alv->get_model( ).

     lr_config->if_salv_wd_table_settings~set_fixed_table_layout( abap_false ).

   ENDIF.

Its working I have tested in my system.

Former Member
0 Kudos

Hi,

Did you tried the solution? Is is working in your system now?

stefan_kagelmacher
Participant
0 Kudos

In WDDOMODIFYVIEW column optimization works.

But .... the horizontal scrollbar for whole application

Former Member
0 Kudos

Hi Stefan,

There is not direct way to optimize column width but there is a work-around for it.

In the method IF_FPM_GUIBB_LIST~GET_DEFINITION after filling EO_FIELD_CATALOG with the statement

eo_field_catalog ?= cl_abap_tabledescr=>describe_by_data( it_output ) you can do the following:

  • Get dynamic type description for the line type:

          DATA: lr_struct TYPE REF TO cl_abap_structdescr.

          lr_struct ?= cl_abap_structdescr=>describe_by_name( 'SFLIGHT' ).

  • LOOP at lr_struct->components table and copy the fields NAME and LENGTH into work area for append into ET_FIELD_DESCRIPTION.

Here is the complete code:

   DATA: lr_struct TYPE REF TO cl_abap_structdescr,

         wa_components LIKE LINE OF lr_struct->components,

         wa_field LIKE LINE OF et_field_description.

   lr_struct ?= cl_abap_structdescr=>describe_by_name( 'SFLIGHT' ).  "your structure name

   LOOP AT lr_struct->components INTO wa_components.

     wa_field-name = wa_components-name.

     wa_field-width = ( wa_components-length + 2 ) * 5.  "Convert char length to pixels

     APPEND wa_field TO et_field_description.

   ENDLOOP.



stefan_kagelmacher
Participant
0 Kudos

Thanks Manish for answer, but this is not what I want to do.

In GET_DEFINITION I can only set column width one time. At this time the cell value is not set, so the column space needed is not known. I need column optimization after filling the table and after ech scroll action.

Former Member
0 Kudos

Hi,

If you want to do that you can implement the enhancement in FPM_LIST_UIBB web-dynpro component.

Use a post-exit of method WDDOINIT in COMPONENTCONTROLLER of FPM_LIST_UIBB and use the following code:

DATA: lr_config TYPE REF TO cl_salv_wd_config_table.

   IF wd_this->mo_alv IS BOUND.

*... Configure ALV

     lr_config = wd_this->mo_alv->get_model( ).

     <activate the feature of ALV column optimization like you do in web-dynpro ALV>

    

   ENDIF.

stefan_kagelmacher
Participant
0 Kudos

The table is standard table not ALV but with option horizontal scrolling. Works your solution for this table kind too?

Former Member
0 Kudos

No, this enhancement will only work for ALV rendering type.

If thats not a issue, you can use ALV rendering type in list settings.

stefan_kagelmacher
Participant
0 Kudos

But ALV needs more memory. OK if I do this, what do you mean with post-exit. I have a FPM-application and a APPC. Which way I can call the table-config?

Many thanks.

Former Member
0 Kudos

You have to implement the enhancement in standard web-dynpro component FPM_LIST_UIBB

Goto component controller of FPM_LIST_UIBB web-dynpro component and create enhancement with code given above.

stefan_kagelmacher
Participant
0 Kudos

OK I do this, but the object lr_config has no way to set column optimization or I do not see it

Former Member
0 Kudos

Use this:

lr_config->if_salv_wd_table_settings~set_fixed_table_layout( abap_false ).

Remove all the width from configuration.

stefan_kagelmacher
Participant
0 Kudos

Does not work...

stefan_kagelmacher
Participant
0 Kudos

No Ideas?

Attribute Horizontal Scrollbar is the way, but then the columns are not width optimized.

Pleas help.