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 display the Logo by using TOP_OF_Page Event in OOPS

madan_c
Explorer
0 Kudos

Hi Gurus,

I'm using TOP_OF_Page event to print Header and Logo in the same conatiner.

Let me explain the case clearly,i have splitted the main conatiner in two parts like conatiner1 and conatainer2.

i want to display logo and header in the container1, and i'm trying to use the * vertical_split * method ,but i'm unable to display the logo by splitting this conatiner vertically.........

and if possible plz forward the sample code....

Hence plz suggest me how to handle this.

Thanks inadvance.

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

What is the class you're using to split the container?

6 REPLIES 6

SuhaSaha
Advisor
Advisor
0 Kudos

What is the class you're using to split the container?

0 Kudos

I'm tring to use the class as CL_DD_DOCUMENT to split the container1 vertically.

FYI....

DATA : right TYPE REF TO cl_dd_area.

CALL METHOD oref_doc->vertical_split

EXPORTING

split_area = oref_doc

split_width = '70%'

IMPORTING

right_area = right

EXCEPTIONS

invalid_split_area = 1

split_area_eq_right_area = 2

right_area_already_used = 3

OTHERS = 4.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

here i'm unable to displayt the object RIGHT .

Edited by: Madan.ngt on Feb 18, 2011 8:16 AM

Edited by: Madan.ngt on Feb 18, 2011 8:18 AM

Edited by: Madan.ngt on Feb 18, 2011 8:29 AM

0 Kudos

Hello,

Wow didn't know that you can split container using CL_DD_DOCUMENT

Anyway a where used list on 'VERTICAL_SPLIT' would have given you some hint. Check the FM 'REUSE_ALV_GRID_COMMENTARY_SET' for the usage.

I would rather use CL_GUI_SPLITTER_CONTAINER class to split which i feel is quite easier to understand. You can check the demo program DEMO_ABAP_OBJECTS_SPLIT_SCREEN for it's usage.

BR,

Suhas

0 Kudos

You are proceeding correctly. Just add appropriate objects to your right area i.e. add_icon . At the end merge and display whole document (not before!).

If still have problems refer standard program DD_SPLIT_DOCUMENT .

Regards

Marcin

Former Member
0 Kudos

Hi,

In your top container i.e, container1, you can directly display the logo as well as text as there are methods already available in class CL_DD_DOCUMENT(For eg, ADD_TEXT, ADD_PICTURE, ADD_ICON etc).

Data: lo_document TYPE REF TO cl_dd_document.

CREATE OBJECT lo_document

EXPORTING

style = 'ALV_GRID'.

CALL METHOD lo_document->add_text " To add text

EXPORTING

text = text-006

sap_fontsize = '18'

sap_emphasis = cl_dd_area=>strong. " For bold

CALL METHOD lo_document->new_line. " For new line

CALL METHOD lo_document->add_text

EXPORTING

text = text-018

sap_emphasis = cl_dd_area=>strong.

CALL METHOD lo_document->add_gap " To add gap in the same line

EXPORTING

width = 10.

CALL METHOD lo_document->add_picture " For picture

EXPORTING

picture_id = 'TRVPICTURE01'

width = '100'.

CALL METHOD lo_document->display_document

EXPORTING

parent = lo_top_container1.

Thanks and Regards,

Himanshu

Former Member
0 Kudos

Hi Madan,

Please refer following threads.Hope this will satisfy your requirement.

http://wiki.sdn.sap.com/wiki/display/Snippets/TopofPageinALV(OOPS).

http://wiki.sdn.sap.com/wiki/display/ABAP/LogoDisplayByALVOOPS.

Regards,

Renuka S.