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: 

Header in alv

Former Member
0 Kudos

Hi all,

Can u tell me how to bring the header text in centre of page in alv grid display.

I have used top of page event to display the header. I am getting it as left aligned.

Please help me to sort this.

Regards,

Priya

5 REPLIES 5

Former Member
0 Kudos

U have to use OOPS concepts

The class to be used is CL_DD_DOCUMENT

Create the object for this and then pass parameters

The methods are ADD_GAP & TEXT

Regards,

Reward if helpful

Former Member
0 Kudos

<b>The header line is always left-justified .

We basically have three options for formatting :

S , A and H.

every line in Alv top-of-page is of 60 char length(slis_listheader-info).so i think the only option we have is to add required spaces to the left and display the required string</b>

Former Member
0 Kudos

hI

The header line is always left-justified .so you can't change into center.

basically we have three options for formatting :

S , A and H.

head_wa-typ = 'H'. -> if you use S ,then text will not bold

head_wa-info = mytext.

append head_wa to head_ing.

Try to convinenance the client.

Check the below link :

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

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4d40e790-0201-0010-c695-e7c...

<b>rEWARD IF USEFUL</b>

Former Member
0 Kudos

hi priya,

In ALV, for header ,

1. if u r using the function mod Commentry_Write,

then it is not possinble to display the header in Centre. By default , it is left and it has the maximum size also.

2. if u r using WRITE statement for display the header, then use

<b> x = sy-colno. y = sy-linno. " istead of colno, linno pass ur header postion's

TOP-OF-PAGE.

WRITE: 'Position of Header: ', x, y.</b>

With Rgds,

S.Barani

0 Kudos

Hi barani,

can u give an example for the above said, so that it will be ore useful.