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: 

How to change report title

Hi Friendz

Plz give me your expert suggestion.

I want to have title of my report as 'Demand plan report' with date and time stamp and plant, plant is taken from selectoin screen. This is an ALV grid display.

Warm regards

Manisha.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor

two ways oen is using the layout.

other set the Title using the parameter Grid title

layout-window_titlebar  = 'Demand plan report' .

call function 'REUSE_ALV_GRID_DISPLAY'
imporitng
.....
I_GRID_TITLE = 'Demand plan report' 
....

IS_LAYOUT    = layout
....

...

12 REPLIES 12

Former Member

Hi

Open report, click on go to then attributes

Aditya

Former Member
0 Kudos

If you are using screen painter means use

SET TITLE BAR command in PBO event

if you are use SE38 editor means

menubar - > GOTO -> Attributes -> TITLE (put ur Description)

Hope it will help you

Regards

deva

GauthamV
Active Contributor
0 Kudos

hi,

use set titlebar option.

for more information press f1 on set titlebar in se38.

Former Member
0 Kudos

*----


    • Form TOP-OF-PAGE *

*----


    • ALV Report Header *

*----


FORM top-of-page.

*ALV Header declarations

DATA: t_header TYPE slis_t_listheader,

wa_header TYPE slis_listheader,

t_line LIKE wa_header-info,

ld_lines TYPE i,

ld_linesc(10) TYPE c,

v_date1(10),

v_date2(10).

  • Title

wa_header-typ = 'H'.

wa_header-info = 'Title,'.

APPEND wa_header TO t_header.

CLEAR wa_header.

  • Date

wa_header-typ = 'S'.

wa_header-key = 'Report generated on Date: '.

  • CONCATENATE sy-datum+6(2) '.'

  • sy-datum+4(2) '.'

  • sy-datum(4) INTO wa_header-info. "todays date

CONCATENATE lv_date '.'

sy-datum(4) INTO wa_header-info. "todays date

  • wa_header-info = sy-datum.

APPEND wa_header TO t_header.

CLEAR: wa_header.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = t_header.

  • i_logo = 'ENJOYSAP_LOGO'.

ENDFORM. "top-of-page

former_member196280
Active Contributor
0 Kudos

Check this program "BCALV_GRID_01", you will understand how to display title on ALV

Ex:

gs_layout-grid_title = 'Flights'.

Regards,

SaiRam

Former Member
0 Kudos

step1:

data gs_layout type lvc_s_layo.
gs_layout-grid_title = 'THE TITLE YOU WANT' .

step2:

call method wcl_alv->set_table_for_first_display
    exporting
      is_layout                     = gs_layout
    changing
      it_outtab                     = gt_sflight[]

narin_nandivada3
Active Contributor
0 Kudos

Hi,

Use the system variable SY-TITLE. Assign new title to it.

Please Check this thread.

Hope it would help you.

Good luck

Narin

former_member188685
Active Contributor

two ways oen is using the layout.

other set the Title using the parameter Grid title

layout-window_titlebar  = 'Demand plan report' .

call function 'REUSE_ALV_GRID_DISPLAY'
imporitng
.....
I_GRID_TITLE = 'Demand plan report' 
....

IS_LAYOUT    = layout
....

...

0 Kudos

Hi

Open SE38 write your program name , select radio button attributes and open it in change mode

cheers

hitesh

0 Kudos

Thanks that worked

0 Kudos

Hello friendz

I have written the following code but in output m getting blank screen instead of title.

constants: c_header TYPE c VALUE 'H',

c_item TYPE c VALUE 'S'.

DATA: lv_r_line TYPE slis_listheader, " Hold list header

lv_date TYPE char10, " Date

lv_time TYPE char10, " Time

lv_title(120) TYPE c , " Title

lv_werks(4) TYPE c.

MOVE p_werks TO lv_werks.

  • Title Display

lv_r_line-typ = c_header. " header

lv_title = text-027.

lv_r_line-info = lv_title.

APPEND lv_r_line TO i_alv_top_of_page.

CLEAR lv_r_line.

  • Run date Display

lv_r_line-typ = c_item. " Item

WRITE: sy-datum TO lv_date MM/DD/YYYY.

lv_r_line-key = text-028.

lv_r_line-info = lv_date.

APPEND lv_r_line TO i_alv_top_of_page.

CLEAR: lv_r_line,

lv_date.

  • Run time Display

lv_r_line-typ = c_item. " Item

WRITE: sy-uzeit TO lv_time USING EDIT MASK '__:__:__'.

lv_r_line-key = text-029.

lv_r_line-info = lv_time.

APPEND lv_r_line TO i_alv_top_of_page.

CLEAR: lv_r_line,

lv_time.

lv_r_line-typ = c_item. " Item

lv_r_line-key = text-030.

lv_r_line-info = lv_werks.

APPEND lv_r_line TO i_alv_top_of_page.

CLEAR: lv_r_line,

lv_werks.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

IT_LIST_COMMENTARY = i_alv_top_of_page

  • I_LOGO =

  • I_END_OF_LIST_GRID =

  • I_ALV_FORM =

.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = sy-repid

i_callback_top_of_page = 'sub_build_report_title'

IT_FIELDCAT = lt_fieldcat[]

TABLES

t_outtab = <l_table>

EXCEPTIONS

PROGRAM_ERROR = 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.

Plz tell what could be the solution.

0 Kudos

Hi Friendz

Thank so much. I have solved my problem.

Now its working.

Rgrds

Manisha