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

ALV problem. Please help.

Former Member
0 Likes
1,687

Hi guys. I created a report using ALV however when the ALV is displayed the report is overlapped by the header and the footer of the ALV. Is there a way for me to correct this? Or is there a setting? Please help. thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,561

Hi Fred,

Could u provide the code u r using for the same,atleast for the alv part alone . I think it would help us understand the issue better.

Best Regards,

Gayathri.

20 REPLIES 20
Read only

Former Member
0 Likes
1,562

Hi Fred,

Could u provide the code u r using for the same,atleast for the alv part alone . I think it would help us understand the issue better.

Best Regards,

Gayathri.

Read only

Former Member
0 Likes
1,561

Hi Ferdinand,

Try to use the HTML TOP OF PAGE where you can set the heights for them.

I_HTML_HEIGHT_TOP(HTML_TOP_OF_PAGE height) and I_HTML_HEIGHT_END(HTML_END_OF_PAGE height).

Hope this will be helpful...

Thanks & Regards,

Kathir~

Read only

0 Likes
1,561

Hi,

How do you use this function? This is the code im using right now. What should I pass in the parameters? Please help.


  refresh events.
  events-name = slis_ev_top_of_page.
  events-form = 'TOP_OF_PAGE'.
  append events.

  events-name = slis_ev_end_of_list.
  events-form = 'END_OF_LIST'.
  append events.

  g_repid = sy-repid.
  slis_layout-colwidth_optimize = 'X'.
  slis_layout-edit_mode = 'X'.
*-------------- Actual ALV Report printed here -------------*
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_interface_check     = ' '
            i_callback_program    = g_repid
            it_fieldcat           = gt_fieldcat[]
            is_layout             = slis_layout
            it_events             = events[]
            I_HTML_HEIGHT_TOP     = 10
            i_html_height_end     = 10
       tables
            t_outtab           = i_rep.

  if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

Read only

0 Likes
1,561

I tried using the I_HTML_HEIGHT_TOP and the i_html_height_end but the footer is still overlapping the report because there are a lot of text displayed in the footer. Am i doing anything wrong? Or did i forgot to set anything? How can I coorect the height of the footer so it does not overlap?

Read only

Read only

0 Likes
1,561

should I remove events? Im currently using it_events right now..

Read only

0 Likes
1,561

Hi,

Try without events.

Could you please give the entire code and let us clearly know what you want to achieve from the report?

Read only

0 Likes
1,561

Hi Jayanthi,

This is my code for displaying the report. Howver, as you can see the footer contains a lot of text that's why it overlaps the report. When I execute the report, all I can see is the header and the footer. I have to drag the footer down to see the report. I would like to display the header, the report and the footer.

form fieldcat_build.

  refresh events.
  events-name = slis_ev_top_of_page.
  events-form = 'TOP_OF_PAGE'.
  append events.
*
*
  events-name = slis_ev_end_of_list.
  events-form = 'END_OF_LIST'.
  append events.

  g_repid = sy-repid.
  slis_layout-colwidth_optimize = 'X'.
  slis_layout-edit_mode = 'X'.
*-------------- Actual ALV Report printed here -------------*
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_interface_check     = ' '
            i_callback_program    = g_repid
            it_fieldcat           = gt_fieldcat[]
            is_layout             = slis_layout
            it_events             = events[]

       tables
            t_outtab           = i_rep.

  if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.

endform.                    " fieldcat_build

form end_of_list.

  data: footer type slis_listheader,
        lv_concat(60).
  constants: lc_a type c value 'A'.
  constants: lc_s type c value 'S'.

  refresh: slis_footer,
           slis_header.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-031.
  append footer to slis_footer.

*space
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-087.
  append footer to slis_footer.

* yearly figures
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-032.
  append footer to slis_footer.

*  clear : footer.
*  footer-typ = lc_a.
*  footer-info = text-064.
*  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-062.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-065.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-066.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-067.
  append footer to slis_footer.

*space
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-087.
  append footer to slis_footer.

* monthly figures
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-033.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-068.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-069.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-070.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-071.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-072.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-073.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-074.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-075.
  append footer to slis_footer.

*space
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-087.
  append footer to slis_footer.

* cummulative figures
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-076.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-078.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-079.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-080.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-081.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-082.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-083.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-084.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  footer-info = text-085.
  append footer to slis_footer.

*space
  clear : footer.
  footer-typ = lc_a.
  footer-info = text-087.
  append footer to slis_footer.

  clear : footer.
  footer-typ = lc_a.
  write : '**** End of Report ****' to footer-info.
  append footer to slis_footer.

  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = slis_footer
            i_end_of_list_grid = 'X'.


endform.  " END_OF_LIST.

form top_of_page.
  data: header type slis_listheader.

  data: l_concat(110) type c,
        lv_date(10) type c,
        lv_time(8).
  constants: c_a type c value 'A'.

*  refresh header.

  refresh:slis_header.

  clear: header, l_concat.
  header-typ = c_a.
  header-info = 'Hello'.
  append header to slis_header.

  clear: header, l_concat.
  header-typ = c_a.
  header-key = ' '. "Hello'.
  header-info = 'Test'.
  append header to slis_header.

  concatenate sy-uzeit+0(2) sy-uzeit+2(2) sy-uzeit+4(2)
              into lv_time separated by ':'.

  concatenate sy-datum+6(2) sy-datum+4(2) sy-datum+0(4)
              into lv_date separated by '.'.

  concatenate  'Date: ' lv_date 'Time: ' lv_time ' '
              into l_concat separated by space.
  header-typ  = c_a.
  header-info = l_concat.
  append header  to slis_header.

  clear : header, l_concat.
  concatenate sy-repid '/' sy-uname
               into l_concat separated by space.
  header-typ  = c_a.
  header-info = l_concat.
  append header to slis_header.
  clear : header, l_concat.

  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = slis_header[].

endform. " TOP_OF_PAGE


Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
1,561

Hi Ferdinand

This may be a GUI problem. Be sure that your SAP GUI is up to date or let's pray for that the latest SAP GUI has no such bugs .

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

0 Likes
1,561

Is there a workaround if this is a bug?

Read only

Former Member
0 Likes
1,561

Hi,

Just see that while creating the ratio specified should be 95 or if it is more it will get overlapped.

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 i006 WITH text-e01."Error in creating Docking container

LEAVE LIST-PROCESSING.

ENDIF.

ENDIF.

CREATE OBJECT o_alvgrid

EXPORTING

i_parent = o_dockingcontainer.

Thanks & Regards,

Judith.

Read only

0 Likes
1,561

Hi Judith,

Where can i find the code that you specified?

Read only

0 Likes
1,561

Hi,

I thought u r using Set_table_for_first_display.

Ok, u need not want to remove the it_events.

Check this link

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_events.htm

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm

Can get a fair idea.

Thanks & Regards,

Judith.

Read only

0 Likes
1,561

Hi Judith,

The header and the footer are actually displaying but the thing is the footer is overlapping the main part of the report since it contains a lot of text. Is there a way for me to set the height of the footer so that it won't overlap with the report?

Read only

0 Likes
1,561

Hi,

Just now I got this useful piece of information.

Check this link.They are reserving lines for footer.

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm

Hope it helps you.

Read only

0 Likes
1,561

Hi,

Thanks for the link. Unfortuantely, i fyou increase the text displayed in the footer it also increases the size of the footer which brings us back to the problem. =( Is there a way to set the height of the footer?

Read only

0 Likes
1,561

Or is there a way to increase page-size for the alv?

Read only

0 Likes
1,561

Hi,

Rather increasing the size of ALV,it is better if we find the option to make the footer scrollable.

While executing the events,it's going inside a function module and there the coding is

no-scrolling.

That's is the reason for overlapping.

Or if we can fix the height of the footer,the scrolling will automatically come,I guess.

Read only

0 Likes
1,561

Hi,

hmmm how do we that? I'm trying to debug the SAP program but I can't figure out what's happening... =(

Read only

0 Likes
1,561

Hi Ferdinand,

Can we have a look at your fieldcatalog structure?

Thanks

Varun