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: 

Logo & TOP_OF_PAGE in OO ALV

Former Member
0 Kudos

Hi everybody,

I have been struggling on putting Logo and write few things on TOP_OF_PAGE in ALV using OOPS.

I search through forum and found few materials, but still looking precise help. Any suggestions???

Regards,

Deva.

10 REPLIES 10

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I actually have never seen it done using OO CL_GUI_ALV_GRID. I have seen many implementations using the REUSE function module. In order to do this in OO you will have to create another container in your screen or us a splitter container, and code the TOP yourself. It is all handled for you if you use the FM.

REgards,

Rich Heilman

0 Kudos

Dear Rich,

I have gone through much of the FM things and wanted to do the same with OOPS. Actually there is something to write for TOP_OF_PAGE as 'BCALV_GRID_01' program. But I couldn't find something with Logo.

Thanks.

Regards,

Deva.

0 Kudos

I see, I don't think that you will find the same functionality like in the FM in OO ALV grid.

Regards,

Rich Heilman

0 Kudos

Deva,

This is what you will have to do.

Split the initial container into two. display the list in the bottom one.

Now in the top one create a object with reference to CL_DD_DOCUMENT. Use the method vertical_split of this class to split the top container again into two pieces. These split areas will refer to CL_DD_AREA.

Once that is done, use one of the areas to display your logo as shown below.

call method document->vertical_split

exporting split_area = document

split_width = '70%'

importing right_area = a_logo.

call method a_logo->add_picture exporting picture_id = logo.

Regards,

Ravi

Note : Please reward the posts that help you.

0 Kudos

when u use method <b>TOP_OF_PA</b>GE in class

<b>CL_GUI_ALV_GRID</b>,

it imports a parameter <b>E_DYNDOC_ID</b> which is type ref to <b>cl_dd_document</b>.

in the class cl_dd_document , there are methods <b>ADD_ICON</b> and <b>ADD_PICTURE</b>, they may help u.

ex:

<b>form method_top_of_page using r_dyndoc_id

type ref to cl_dd_document</b>.

<b>r_dyndoc_id->add_icon</b>

0 Kudos

Hi,

You can look into the code REUSE_ALV_GRID_COMMENTARY_SET. You will easily understand what needs to be done.

Regards,

Ravi

Former Member
0 Kudos

Dear Friends,

I worked out this problem of Logo & TOP_OF_PAGE in OO for ALV.

As with various suggestions, my strategy can be split in following steps:-

a. Split the custom control using CL_GUI_SPLITTER_CONTAINER.

b. Assign ALV to one of the split container using CL_GUI_ALV_GRID.

c. Assign document to other split container using CL_DD_DOCUMENT. Logo can be assigned by method ADD_PICTURE and Text by method ADD_TEXT.

Thankyou everybody for kind help.

Regards,

Deva.

0 Kudos

Can we have some code snippet for the same, esp the logo part

0 Kudos

are u sure we need to use split container? ...please pass me the whole code along with declarations

0 Kudos

At the moment I need to add text in header..please advice on the simplest way to do this.

Regards,

Shital