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: 

Printing top of Page in Center

Former Member
0 Kudos

Hi all i have a title in ALV report i want this Tiltle to be printed on Center

8 REPLIES 8

Former Member
0 Kudos

check alv properties in any alv document..i used it where u can set a property to center.

Former Member
0 Kudos

Hi,

try out

FM REUSE_ALV_COMMENTARY_WRITE

thanks

Former Member
0 Kudos

Hi,

I'm not sure that you can achieve this

0 Kudos

hi,

First u tell me center means where topmost or middle of the report?

u can take one container ..there u can do it ..

~linganna

kamesh_g
Contributor
0 Kudos

Hi

You have OOPS concept for this .

Use Class 'CL_DD_DOCUMENT'

Former Member
0 Kudos

Hi,

FORM top_of_page.

DATA: l_commentary TYPE slis_t_listheader,

ls_line TYPE slis_listheader,

l_datum(10),

l_uzeit(8),

first_flag.

CLEAR ls_line.

ls_line-typ = 'H'.

ls_line-info = text-020.

APPEND ls_line TO l_commentary.

CLEAR ls_line.

ls_line-typ = 'S'.

ls_line-key = text-021.

ls_line-info = p_bukrs.

APPEND ls_line TO l_commentary.

CLEAR ls_line.

ls_line-typ = 'S'.

ls_line-key = text-022.

ls_line-info = g_f_butxt.

APPEND ls_line TO l_commentary.

CLEAR ls_line.

IF p_rad1 = 'X' AND p_ason_d IS NOT INITIAL.

ls_line-typ = 'S'.

ls_line-key = text-023.

WRITE: p_ason_d-low TO ls_line-info.

APPEND ls_line TO l_commentary.

ELSEIF p_rad2 = 'X' AND s_capt_d IS NOT INITIAL.

ls_line-typ = 'S'.

ls_line-key = text-024.

WRITE: 'From' TO ls_line-info.

WRITE: s_capt_d-low TO ls_line-info+5.

WRITE 'To' TO ls_line-info+17.

WRITE: s_capt_d-high TO ls_line-info+23.

APPEND ls_line TO l_commentary.

ELSEIF p_rad3 = 'X' AND s_dact_d IS NOT INITIAL.

ls_line-typ = 'S'.

ls_line-key = text-025.

WRITE: 'From' TO ls_line-info.

WRITE: s_dact_d-low TO ls_line-info+5.

WRITE 'To' TO ls_line-info+17.

WRITE: s_dact_d-high TO ls_line-info+23.

APPEND ls_line TO l_commentary.

ENDIF.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = l_commentary

i_logo = 'ENJOYSAP_LOGO'.

  • I_END_OF_LIST_GRID =

ENDFORM. "top_of_page

Here, in the Bolded section, you can see adjusting the contents as we wish. You can adjust it to the centre of the report output.

Thanks and Regards,

Suresh

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Jayesh,

You can try using the parameter I_CALLBACK_HTML_TOP_OF_PAGE of the FM 'REUSE_ALV_GRID_DISPLAY' for this purpose.

You can use the combination of the methods ADD_GAP & ADD_TEXT for achieving this purpose.

BR,

Suhas

former_member181995
Active Contributor
0 Kudos

It is possible!!

Here you go> /people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid

Cheers,

Amit.