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: 

ALV Header

Former Member
0 Kudos

Hi all,

I want title in the list display of an alv report.

i got it in the grid display but not in list display.

can anybody help me

Thank You

4 REPLIES 4

Former Member
0 Kudos

hi srikanth,

you want to display a header in a ALV output. the req is that i have to display it in a single line.

the line contains a standard text (typ S) and also a field value (typ A).

example, Pay results from 01.01.2007 to 31.01.2007.

for this i give one idea try like this

take an varible as string and concatenate standrade text and date and print it on header.

********************************************************

concatenater standred text datefielld into v_vari seperated by space

**here (standred text datefielld) are the fields you are using*

LISTHEAD-TYP = 'H'.

LISTHEAD-INFO = v_vari.

APPEND LISTHEAD.

********************************************************

try like this this may be help full to you .

reward points if help full .

Former Member
0 Kudos

try follwong code hope it will be helpful

DATA: WA_listheader TYPE slis_listheader.

REFRESH p_i_listheader.

CLEAR WA_listheader.

WA_listheader-typ = 'H'. "Header

WA_listheader-info = 'company name'

APPEND WA_listheader TO p_i_listheader.

WA_listheader-typ = 'S'.

WA_listheader-key = 'DATE'.

WA_listheader-info = sy-datum.

APPEND WA_listheader TO p_i_listheader.

WA_listheader-typ = 'S'.

WA_listheader-key = 'PAGE NO.'.

WA_listheader-info = sy-pagno.

APPEND WA_listheader TO p_i_listheader.

then just use wa_layout in import parameters of ur grid display FM

plz reward if useful

keep rockin

vivek

Edited by: vivek gaur on Jan 25, 2008 2:13 PM

Clemenss
Active Contributor
0 Kudos

Hi Srikanth,

and finally you should use

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = lt_header

in the top-of-page-form.

See the ample documentation for this function module or see the where-used-list especially for B* programs.

Regards,

Clemens

Former Member
0 Kudos

Thanks to all

anyway, i got the solution