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

ALV Header Display

Former Member
0 Likes
753

Hi Experts,

Now ALV Header is comming like this

<XYZ Company Report> < LOGO>

<Depatment : ABC>

I want to show like below form

<LOGO>

<XYZ Company Report>

<Depatment : ABC>

One more question how to get online logo to be uploaded in ALV Header.

Thanks,

Singha

Hi Experts,

Now ALV Header is comming like this

<XYZ Company Report> < LOGO>

<Depatment : ABC>

I want to show like below form

<LOGO>

<XYZ Company Report>

<Depatment : ABC>

One more question how to get online logo to be uploaded in ALV Header.

Thanks,

Singha

5 REPLIES 5
Read only

Former Member
0 Likes
720

hi,

i think you can do this using a hierarchial list display

use the FM reuse_alv_hierseq_list_display

for uploading Logo in ALv header

Use transaction SE78 to upload a image into SAP,

Another way for uploading the Logo in ALV header are as follows :

Steps for uploading Logo :-:

1. Goto the transaction OAER

2. Enter the class name as 'PICTURES'

3. Enter the class type as 'OT'

4. Enter the object key as the name of the logo you wish to give

5. Execute

6. Then in the new screen select Standard doc. types in bottom window

Click on the Screen icon

Now, it will ask for the file path where you have to upload the logo

7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE

Hope this will work .

-Thanks & Regards

Saurabh Goel

Read only

Former Member
0 Likes
720

Hi,

Hope this link will be helpful to solve your queries.

https://wiki.sdn.sap.com/wiki/display/ABAP/AlvinDetail

Thanks and Regards,

Ahamed.

Read only

Former Member
0 Likes
720

hi

You can use list display as well as hierarchial list display .

The later will be easier to implement since it is especiallyfor table with header and data .

use the FM reuse_alv_hierseq_list_display for header .

For online upload of the logo you should use FM reuse_alv_commentary_write .

First upload the logo on to the system via se78 .

Then pass the file as an export parameter in the FM .

one thing you need to remember is that all this need to be done in top_of_page event .

This will bring logo above the header .

Hope this may have helped you

Thanks and Regards

Aditi Wason

Read only

Former Member
0 Likes
720

hii,

Here is a short sample of putting logo at the top of ALV grid. Remember this only works online. If you would print the ALV, it would not show the logo.

 report zrich_0001 no standard page heading. * Global ALV Data Declarations type-pools slis. data: begin of i_alv occurs 0, matnr type mara-matnr, end of i_alv. * Miscellanous Data Declarations data: fieldcat type slis_t_fieldcat_alv, events type slis_t_event, list_top_of_page type slis_t_listheader, top_of_page type slis_formname value 'TOP_OF_PAGE'. start-of-selection. perform initialization. perform get_data. perform call_alv. end-of-selection. ************************************************************************ * Form Initialization ************************************************************************ form initialization. clear i_alv. refresh i_alv. perform eventtab_build using events[]. endform. ************************************************************************ * Form Get_Data ************************************************************************ form get_data. select matnr into table i_alv from mara up to 100 rows. endform. ************************************************************************ * CALL_ALV ************************************************************************ form call_alv. data: variant type disvariant. data: repid type sy-repid. repid = sy-repid. variant-report = sy-repid. variant-username = sy-uname. perform build_field_catalog. perform comment_build using list_top_of_page[]. * Call ABAP List Viewer (ALV) call function 'REUSE_ALV_GRID_DISPLAY' exporting it_fieldcat = fieldcat i_callback_program = repid is_variant = variant it_events = events[] i_save = 'U' tables t_outtab = i_alv. endform. ************************************************************************ * EVENTTAB_BUILD ************************************************************************ form eventtab_build using events type slis_t_event. * Registration of events to happen during list display data: tmp_event type slis_alv_event. call function 'REUSE_ALV_EVENTS_GET' exporting i_list_type = 0 importing et_events = events. read table events with key name = slis_ev_top_of_page into tmp_event. if sy-subrc = 0. move top_of_page to tmp_event-form. append tmp_event to events. endif. endform. ************************************************************************ * BUILD_FIELD_CATALOG ************************************************************************ form build_field_catalog. clear: fieldcat. refresh: fieldcat. data: tmp_fc type slis_fieldcat_alv. tmp_fc-reptext_ddic = 'Material'. tmp_fc-fieldname = 'MATNR'. tmp_fc-tabname = 'I_ALV'. tmp_fc-outputlen = 18. append tmp_fc to fieldcat. endform. ************************************************************************ * COMMENT_BUILD ************************************************************************ form comment_build using list_top_of_page type slis_t_listheader. data: tmp_line type slis_listheader. clear tmp_line. tmp_line-typ = 'H'. tmp_line-info = 'Here is a line of text'. append tmp_line to list_top_of_page. clear tmp_line. tmp_line-typ = 'S'. tmp_line-key = 'Key1'. tmp_line-info = 'Here is a value'. append tmp_line to list_top_of_page. clear tmp_line. tmp_line-typ = 'S'. tmp_line-key = 'Key2'. tmp_line-info = 'Here is another value'. append tmp_line to list_top_of_page. endform. ************************************************************************ * TOP_OF_PAGE ************************************************************************ form top_of_page. call function 'REUSE_ALV_COMMENTARY_WRITE' exporting i_logo = 'ENJOYSAP_LOGO' it_list_commentary = list_top_of_page. endform. 

regards,

Shweta

Read only

Former Member
0 Likes
720

Hai,

If you want this thing in Top Of Page, then Do LiKe This:

call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program     = sy-repid
      i_callback_html_top_of_page = 'TOPOFPAGE'             *"Use  i_callback_html_top_of_page insted of  i_callback_top_of_page*
      i_grid_title      = 'MATERIAL INWARD REGISTER [ADVANCE MRN WISE]'
      is_layout              = i_settings
      i_save                 = 'X'
      it_fieldcat            = i_fieldcat
    TABLES
      t_outtab               = it_data.

Make A Form With name TOPOFPAGE

form topofpage USING top TYPE REF TO cl_dd_document.

  data: ls_line type slis_listheader.
  refresh i_toppage. clear ls_line.
  data: date1(255).
  data: date2(60).
  data: text(255).
  data: text1(255).

  text = 'MATERIAL INWARD REGISTER [ADVANCE MRN WISE] '.

  concatenate 'From:' so_budat-low+6(2) '/' so_budat-low+4(2) '/'
                      so_budat-low+0(4) into date1.
  concatenate 'To:' so_budat-high+6(2) '/' so_budat-high+4(2) '/'
                    so_budat-high+0(4) into date2.
  concatenate text date1 date2 into text1 SEPARATED BY space.

  clear date1.
  CONCATENATE 'Run Date : ' sy-datum+6(2)'/' sy-datum+4(2) '/'
                            sy-datum+0(4) into date1.
  clear text.
  text = date1.

CALL METHOD top->add_picture EXPORTING picture_id = 'ENJOYSAP_LOGO'.
CALL METHOD top->add_text EXPORTING text =
  'ABC TELE-SYSTEM LIMITED'.
CALL METHOD top->add_gap EXPORTING width = 320.
CALL METHOD top->add_text EXPORTING text = text1.
CALL METHOD top->add_gap EXPORTING width = 320.
CALL METHOD top->add_text EXPORTING text = text.
endform.                    "topofpage

I hope it will solve your Problem