Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SET_HORIZONTAL_SCROLLBARS

Former Member
0 Kudos

Hi All

In my program I am creating one dynamic internal table (no of columns and their heading known only at run time) with the following method.

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = fieldcatalog

  • it_grid_fcat

IMPORTING

ep_table = dref.

and then calling the following method to show it on the screen to the user

CALL METHOD grid->set_table_for_first_display

EXPORTING

is_layout = struct_grid_lset

CHANGING

it_outtab = <it_disptab>

it_fieldcatalog = fieldcatalog

.

But I am facing 2 problems in that

1) I am unable to get the column heads as passed thruough 'fieldcatalog-seltext'

2) I am not getting the horizontal scroll bar.

I tried to access the method

SET_HORIZONTAL_SCROLLBARS of class CL_GUI_ALV_GRID_BASE

but getting the message as this is protected.

any clue on above.

Best Regards

Sandeep

6 REPLIES 6

Former Member
0 Kudos

Hi Sandeep,

The column headings are to be populated in the FIELDCATALOG-COLTEXT field.

Regards,

Anand Mandalika.

Could you please close the other threads by marking them as answered ?

0 Kudos

Hi,

additionally assigning some points if a answer was of some help!

regards

Siggi

Former Member
0 Kudos

Hi Anand,

I tried with col_text also that is not working. Regarding closing of the other threads in fact I wanted to have some more clarification in those cases but anyways I will close them .

Best Regards

Sandeep

0 Kudos

Hi,

W_LAYOUT TYPE LVC_S_LAYO ,

W_VARIANT TYPE DISVARIANT.

CALL METHOD o_alvgrid->set_table_for_first_display

EXPORTING

is_variant = w_variant

i_save = c_a

is_layout = w_layout

CHANGING

it_outtab = p_output[]

it_fieldcatalog = p_fieldcat[]

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

Check it once and in fieldcatalog fieldcat-<b>coltext</b> = text-002. Column heading will display.

Check once again. U have mentioned as <b>col_text</b>.

Thanks & Regards,

Judith.

0 Kudos

Hi Sandeep,

If you have specified COLTEXT, then ideally it should work I cannot think of a case where it wouldn't. If your code is not too big, then could you post it here? At least the contents of the fieldcatalog table at the time of the call to the SET_TABLE_FOR_FIRST_DISPLAY ?

Regards,

Anand Mandalika.

0 Kudos

Hi Anand,

Thanks you are correct. It worked with coltext. But now that horizontal bar is still not showing what could be the reason for that?

Best Regards

Sandeep