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: 

Heading with parameter in ALV report

Former Member
0 Kudos
503

hi

i want to add heading to my ALV report which i created using factory method.

in my code i wrote:

data:gr_display type ref to cl_salv_display_settings.

gr_display = gr_table->get_display_settings( ).

gr_display ->set_striped_pattern( cl_salv_display_settings=>true).

gr_display->set_list_header( 'this alv report has' X <-- here i want to add variable)

how can i add variable ( which is global variable ) insted of the X ??

thanks

1 ACCEPTED SOLUTION

peter_ruiz2
Active Contributor
0 Kudos
104

hi,

use this.

DATA:

gd_headr type char100.

concatenate 'this alv report has' <variable>

into gd_headr separated by space.

gr_display->set_list_header( gd_headr ).

regards,

Peter

3 REPLIES 3

peter_ruiz2
Active Contributor
0 Kudos
105

hi,

use this.

DATA:

gd_headr type char100.

concatenate 'this alv report has' <variable>

into gd_headr separated by space.

gr_display->set_list_header( gd_headr ).

regards,

Peter

0 Kudos
104

but my variable is not from type chat

its an intiger so i cannt concatenate

0 Kudos
104

hi,

you would have to convert it to type char.

data:

gd_i2c type c.

move <variable> to gd_i2c.

then concatenate gd_i2c with your string.

regards,

Peter