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: 

Reuse_alv_commentry_write

Former Member
0 Kudos
104

Hai,

I need to display the heading at the center of my report using the function module ' Reuse_alv_commentry_write ' . But I m getting the heading at the left corner of my report. How to bring it in the center of my report.

Thanks in Advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos
61

Please give me reward points...

5 REPLIES 5

Former Member
0 Kudos
62

Please give me reward points...

Former Member
0 Kudos
61

Hi

Create a text symbol and put space before the title.

For eg. Text symbol 001.

001 - ` .Report Title`.

Now pass this text symbol as parameter to the FM.

Former Member
0 Kudos
61

HI,

In that fm export parameters

typ = 'S'.

then u will get required letterings in the center.

Regards,

Nagaraju

Former Member
0 Kudos
61

hi

<b>Refer this code.</b>

FORM build_listheader USING p_it_listheader TYPE slis_t_listheader.

DATA: itab_listheader TYPE slis_listheader.

REFRESH p_it_listheader.

CLEAR itab_listheader.

itab_listheader-typ = 'H'.

itab_listheader-info = Sy-repid.

APPEND itab_listheader TO p_it_listheader.

CLEAR itab_listheader.

itab_listheader-typ = 'H'.

itab_listheader-info = sy-datum.

APPEND itab_listheader TO p_it_listheader.

CLEAR itab_listheader.

itab_listheader-typ = 'H'.

itab_listheader-info = sy-time.

APPEND itab_listheader TO p_it_listheader.

ENDFORM. " BUILD_LISTHEADER

form BUILD_EVENTCAT using p_i_eventcat TYPE SLIS_T_EVENT.

DATA: I_EVENT TYPE SLIS_ALV_EVENT.

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

I_LIST_TYPE = 0

IMPORTING

ET_EVENTS = P_I_EVENTCAT

  • EXCEPTIONS

  • LIST_TYPE_WRONG = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CLEAR I_EVENT.

read table p_i_eventcat with key name = slis_ev_top_of_page into I_event.

if sy-subrc = 0.

move 'TOP_OF_PAGE' to I_event-form.

append I_event to p_i_eventcat.

endif.

FORM top_of_page .

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = it_listheader

i_logo = 'ENJOYSAP_LOGO'

  • I_END_OF_LIST_GRID =

.

ENDFORM. " TOP_OF_PAGE

<b>reward points for useful ans</b>

Regards

Aarti

sreeramkumar_madisetty
Active Contributor
0 Kudos
61

Hi Arun

Create a text element and while giving the description for that text element give the appropriate space .

Now use the FM: Reuse_alv_commentry_write as usual.

Hope you can get it.

Regards,

Sree