Application Development and Automation 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: 
Read only

Regarding ALV GRID Headers

Former Member
0 Likes
781

Hi All,

I have a issue regarding <b>ALV GRID Headers</b>.

Actually using object oriented [<b>OO ABAP</b>] i am displaying <b>2 ALV Grids</b> one after other on a single page.

Now i want to give <b>Company Standard Header</b> above Both those grids. In Normal Reports we will use <b>TOP-OF-PAGE</b> to do it, Now i want same thing in <b>OO ABAP</b>.

Can anybody tell me how can i solve this issue.

Thanks in advance.

Thanks & Regards,

Rayeez.

8 REPLIES 8
Read only

Former Member
0 Likes
694

HI shaik,

1. Its oo alv.

2. Hence, screen painter is there.

3. Just place a TEXTBOX (text field)

(using drag&drop)

on the top of the alv grid container.

(use output only property for display only purpose)

4. Assgin value to this textfield in your pbo.

regards,

amit m.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
694

here also u can use TOP OF PAGE EVENT, but the other easiest method is,

two methods below:

1st method: above the container, in the layout, place the text fields.

2nd method :if u want to use top_of_page event, u can handle

like this

CLASS LCL_EVENT_RECEIVER DEFINITION.

PUBLIC SECTION.

METHODS HANDLE_TOP_OF_PAGE

FOR EVENT PRINT_TOP_OF_PAGE OF CL_GUI_ALV_GRID.

METHODS HANDLE_END_OF_LIST

FOR EVENT PRINT_END_OF_LIST OF CL_GUI_ALV_GRID.

ENDCLASS. "cl_event_receiver DEFINITION

----


  • CLASS CL_EVENT_RECEIVER IMPLEMENTATION

----


*

----


CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.

METHOD HANDLE_TOP_OF_PAGE.

perform top_of_page.

ENDMETHOD . "handle_top_of_page

METHOD HANDLE_END_OF_LIST .

PERFORM END_OF_LIST.

ENDMETHOD . "handle_end_of_list

ENDCLASS . "cl_event_recei

but u need to pass printing parameters of structure LVC_S_PRNT to IS_PRINT of set_table_for_first_display.

NOTE: U CAN SEE O/P only in print preview.

SO BETTER TO GO FOR THE FIRST METHOD

Read only

Former Member
0 Likes
694

hi,

since it is OO alv, top_of_page can be done some thing different.

check this thread , in second page You can see the code given by Miss.Srilatha check it.

regards

vijay

Read only

0 Likes
694

Hi,

I have already created Company Header information using screen painter above 2 ALV Grids. [1st Way].

What i want is i had create header as below

<b>Program: Program Name Client PageNo

Date/Time: Date/Time Prog description</b>

Production Orders

Grid1

Planned Orders

Grid2

Now what i want is i want to make All Header details come under one color above them. Means both lines where i will display header should be in same color so that it will be diffrentiated.

Can anybody solve this issue.

Thanks for prevoius replies.

Thanks & Regards,

Rayeez.

Read only

0 Likes
694

Hi again,

1. If u want more than 1 line,

then u will have to use

more than 1 textboxes/input fields

at design time.

regards,

amit m.

Read only

0 Likes
694

Hi,

I had put more than 1 line, But my requirement is i want to make Both the header lines into one color both lines should come under one color not fields.

Like i had made Header Bold in my posting likewise i want to make both those lines one colored as in normal report.

Thanks & Regards,

Rayeez.

Read only

0 Likes
694

Hi again,

1. Make both the fields

OUTPUT ONLY

( In properties window)

2. Then their BACKGROUND COLOUR

will be the same as screen back color.

3. Hence, it will look list LIST.

regards,

amit m.

Read only

0 Likes
694

Hi Amit,

I had done that things already all the fields will be in same color. But what i want is i want to make both the header lines into one color. Means if field is not there in line then also it will have color on those parts.

Color of both lines should be smae.

Thanks for your replies.

Thanks & Regards,

Rayeez.