cancel
Showing results for 
Search instead for 
Did you mean: 

ALV fixed with problem

selvakumar_mohan
Active Participant
0 Kudos

Hi All,

I was trying to make my WD4A output ALV to be fixed width with the following code. But problem is i am not seeing any effect on the ALV output. Can you please help me in getting it done.

DATA: lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv( ).

  DATA; lv_value TYPE ref to cl_salv_wd_config_table.
  lv_value = lo_interfacecontroller->get_model(
  ).


 lv_value->IF_SALV_WD_TABLE_SETTINGS~set_fixed_table_layout( abap_true ).
 lv_value->IF_SALV_WD_TABLE_SETTINGS~set_scrollable_col_count( 8 ).
 lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_WIDTH( '100%' ).

Thanks & Regards,

Selvakumar M.

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

Remove % sign.

Try this


lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_WIDTH( '100' ).
lv_value->IF_SALV_WD_TABLE_SETTINGS~set_scrollable_col_count( 8 ).
lv_value->IF_SALV_WD_TABLE_SETTINGS~set_fixed_table_layout( abap_true ).

Regards

Arjun

selvakumar_mohan
Active Participant
0 Kudos

Hi Arjun,

I tried removing the % also but still i dont see any effect.

Thanks,

Selvakumar M,.

Former Member
0 Kudos

Hi,

Try giving it as 1090 .

100 is not set I guess because it is less than the minimum.

selvakumar_mohan
Active Participant
0 Kudos

Hi Lekha,

Problem still persists. Is that i need to write additional code to make the horizontal navigation bar visible in ALV.

The Actual Problem is that my ALV is having large number of fields which makes its width very large. So i was trying to make the ALV fixed width.

Please provide any solution for this.

Thanks,

Selvakumar M.

Former Member
0 Kudos

Hi,

Do you want to have the scrollbar for ALV.

Then you need to use the parameter WDDOTABLENAVIGATION as SCROLLBAR as applicaiton parameter.

Use the methods of model object to have the SET_SCROLLABLE_COL_COUNT and specify the columns. For this you need not set the wdith of the ALV also.

Using Viewcontainter inside a TCO is a good approach. Also set the width of the TCO to 700 or 600.

Regards,

Lekha.

selvakumar_mohan
Active Participant
0 Kudos

Hi,

I am not able to get it clear. Can you please be more detailed or provide me a link to understand the same..

Thanks,

Selvakumar M,.

arjun_thakur
Active Contributor
0 Kudos

Hi,

Ideally, l_table->if_salv_wd_table_settings~set_scrollable_col_count( 8 ). should create a horizontal scroll bar.

Former Member
0 Kudos

Hi,

First set the application parameter WDTABLENAVIGATION as SCROLLBAR.

Please check out this code -

***Variables
  DATA:
    lv_count TYPE i,                           "No. of scrollable cols on screen
lo_value type ref to cl_salv_wd_config_table.
      lv_count = 5.
      CALL METHOD lo_value->IF_SALV_WD_TABLE_SETTINGS~set_scrollable_col_count
        EXPORTING
          value = lv_count.

Regards,

Lekha.

selvakumar_mohan
Active Participant
0 Kudos

Thanks, Lekha/Arjun it works!

Thanks,

Selvakumar M.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You aslo try to embed view container inside the transparaent container and set the wdith for this TCO. In addition you make settings to ALV.

Regards,

Lekha.