Application Development and Automation 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: 
Read only

Increase ALV Header length

Former Member
0 Likes
3,550

Hi,

Does anybody know, How to increase the Header length in ALV Report?

The standard function module and class holds the length upto 70 Characters.

The FM - REUSE_ALV_GRID_DISPLAY has the parameter called 'I_GRID_TITLE' and it referes the data type 'LVC_TITLE'. When I increased this length to 255 in FM as well as in the class 'CL_GUI_ALV_GRID'. It did not display. Is there any other way to increase the length?

Thanks,

Ramesh

Hi,

Does anybody know, How to increase the Header length in ALV Report?

The standard function module and class holds the length upto 70 Characters.

The FM - REUSE_ALV_GRID_DISPLAY has the parameter called 'I_GRID_TITLE' and it referes the data type 'LVC_TITLE'. When I increased this length to 255 in FM as well as in the class 'CL_GUI_ALV_GRID'. It did not display. Is there any other way to increase the length?

Thanks,

Ramesh

5 REPLIES 5
Read only

Former Member
0 Likes
1,802

First of all - I would NOT change any of these objects!! You are changing SAP core and placing your implememtation at great risk as this code is run by hundreds/thousands of programs.

I would start by making a clone of all objects (including the LVC_TITLE) as Z or Y objects.

From there... make sure that data element LVC_TITLE is tied to a domain of greater than 70 chars long. You can create a custom domain of your liking as well for this.

Read only

Former Member
0 Likes
1,802

U may not be able to increase the length of the column header.

IF cl_gui_alv_grid=>offline( ) IS INITIAL.

    CREATE OBJECT o_dockingcontainer
      EXPORTING
<b>        ratio                       = '95'</b>
     EXCEPTIONS
      cntl_error                  = 1
      cntl_system_error           = 2
      create_error                = 3
      lifetime_error              = 4
      lifetime_dynpro_dynpro_link = 5
      others                      = 6.

    IF sy-subrc NE 0.
*      MESSAGE i001 WITH text-e01.
      LEAVE LIST-PROCESSING.
    ENDIF.

  ENDIF.

This is the max size of the docking container.

U can specify in the layout

FORM f9400_layout.

  w_layout-grid_title = sy-title.
  w_layout-zebra      = 'X'.
  w_layout-sel_mode   = 'B'.
 <b> w_layout-cwidth_opt = 'X'.</b> (Autamatically set the width according to the length of the header)
  w_variant-report    = sy-repid.
 ENDFORM.                    " f9400_layout

Hope this helps u.

Kindly reward points for the helpful answers.

Read only

Clemenss
Active Contributor
0 Likes
1,802

Hi Ramesh,

Function REUSE_ALV_GRID_DISPLAY has a Parameter I_CALLBACK_HTML_TOP_OF_PAGE

You can use this parameter to display a header of arbitrary length.

See SAP Demo BCALV_VERIFY_DATATYPES, especially Form Routine F01_ALV_EVENT_HTML_TOP_OF_PAGE for the methods creating extended header.

regards,

C.

Read only

Former Member
0 Likes
1,802

All,

Thanks Guys for the related answers.

Actually BCALV_GRID_01 this standard SAP report does the same work what I was trying to. We need to design the screen in such a way. i. e in the top, Design the Fields to show and in the bottom create custom control.

Using the Method SET_TABLE_FOR_FIRST_DISPLAY I was able to bring the result.

Once again thanks a lot guys.

Thanks,

Ramesh

Read only

Sudhakaran
Participant
0 Likes
1,802

Hi,

1. Instead of TOP_OF_PAGE event, use I_CALLBACK_HTML_TOP_OF_PAGE and CL_DD_DOCUMENT to add header content.

2. Use FM RSDG_WORD_WRAP to split the lengthy lines into multiple smaller ones and pass it to REUSE_ALV_COMMENTARY_WRITE.

Best regards, Sudhakaran