02-23-2006 4:26 AM
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.
02-23-2006 4:30 AM
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
02-23-2006 4:39 AM
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.
02-23-2006 4:44 AM
02-23-2006 4:52 AM
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.
02-23-2006 4:52 AM
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>
02-23-2006 5:03 AM
Hi,
You can look into the code REUSE_ALV_GRID_COMMENTARY_SET. You will easily understand what needs to be done.
Regards,
Ravi
03-29-2006 5:19 AM
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.
03-29-2006 5:54 AM
05-21-2009 2:28 PM
are u sure we need to use split container? ...please pass me the whole code along with declarations
05-21-2009 2:29 PM
At the moment I need to add text in header..please advice on the simplest way to do this.
Regards,
Shital