Insert Image/Logo in ALV List

Hi everyone,
I'm trying to insert a photo as a logo in ALV report. I've figured out that in SAP, we have 2 function to generate an ALV report: REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY.
   REUSE_ALV_GRID_DISPLAY can support display options better than REUSE_ALV_LIST_DISPLAY, thus we can use REUSE_ALV_GRID_DISPLAY to display company's logo. It's ok when we display the report on computer screen, but the problem is that when we print the ALV report, it always converts ALV to the form of LIST_DISPLAY, instead of GRID_DISPLAY. Thus, the logo is not printed!!!
Are there an solution that help me have the logo printed along with the report?.
Thank you and regards,
Long

Hello,
I am afraid that printing logos via ALV is not possible, since the output stream
sent to the printer is pure text.
Regards,
David

Similar Messages

  • LOGO with ALV List

    Hi all,
    Can anyone tell me if it is possible to display LOGO while using ALV list i.e with 'REUSE_ALV_BLOCK_LIST_APPEND'
    &  'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    If it is possible, how can I do it? I had tried COMMENTRY_WRITE in Top Of Page, I am able to display the text but not the logo.
    If it is not possible what could be other possible way to do it?
    Thanks in advance,
    Vimal

    Hi Vimal,
    Welcome to SDN.
    In case you want to change your program using Grid, then refer the link for Logo upload.
    Re: How do I insert a logo in ALV using Function Modules?
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
    Reward points if this Helps.
    Manish

  • Company Logo in ALV List Header

    Hi,
    I have created an ALV list and would like to put our company logo in the header. How can I do this?
    Thanks,
    Shah.

    Hi,
    In the transaction OAOR, you should be able to insert your company Logo.
    GOTO - OAOR (Business Document Navigator)
    Give Class Name - PICTURES Class Type - OT..... then Execute
    It will show you the list, then select ENJOYSAP_LOGO.
    On that list, you will find one control with a "create" tab.
    Click std. doc types.
    Select SCREEN and double-click.
    It will push FILE selection screen.
    Select your company logo (.gif) and press OK.
    It will ask for a description- for instance: "company logo".
    It will let you know your doc has been stored successfully.
    You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
    Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
    Reward points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Display Logo in ALV LIST header

    Hi Experts!!
    I need the logo to be displayed in the header of ALV LIST but not the grid display. I searched for this, and got the results for ALV grid display. Kindly let me know if there's any way of printing the logo in the ALV List display. I hope that's possible with oops.
    Please help me out.
    Thanks and Regards,
    Seenu

    hello srinivas,
    Check the Examples in LIBS trxn,
    see the example One-Line List with Top of Page
    regards,
    Shweta

  • Inserting image(logo) in jframe

    hi..i'm trying to insert a image(logo) in my jframe.
    the following is my code :
    ImageIcon icon = new ImageIcon("c:\\java\\nm_logo-medium.jpeg");
              JLabel image = new JLabel(icon,JLabel.CENTER);
              image.setBounds(10, 10, 20, 20);
              getContentPane().add(image);
              p1.add(image);
    how come my image does not appear??

    getContentPane().add(image);
    p1.add(image);your adding the image 2 times, to 2 different containers, add the image to one of the container & ensure that the container is added to the frame & is visible.
    hope this helps u.
    regards,
    Afroze.

  • How do I insert a logo in ALV using Function Modules?

    hai !
           i want to display the logo on the grid .
        can any one suggest me which function i should use?
        any  help will be appreciated.

    Hi,
    Look at the sample code to display LOGO.
      call function 'REUSE_ALV_GRID_DISPLAY'
         exporting
           i_callback_program      = i_repid
           i_callback_user_command = 'USER_COMMAND_PERNR'
           it_fieldcat             = header
           is_layout               = gt_layout
           i_callback_top_of_page  = 'TOP-OF-PAGE1'
           i_grid_title            = xyz
           it_sort                 = gt_sort[]
           i_default               = 'X'
           i_save                  = 'U'
           is_variant              = gt_variant
           it_events               = gt_events
          tables
           t_outtab                = t_output.
      clear t_output.
    Form TOP-OF-PAGE1
    form top-of-page1.
      data: header type slis_t_listheader,
      wa type slis_listheader. "infield like wa-info, nline type n.
    TITLE AREA
      wa-typ = 'S'.
      wa-info = text-h04.
      append wa to header.
      wa-typ = 'S'.
      write sy-datum to wa-info mm/dd/yyyy.
      concatenate text-h03 wa-info into wa-info separated by space.
      append wa to header.
      wa-typ = 'S'.
      concatenate text-h02 sy-uname into wa-info separated by space.
      append wa to header.
      wa-typ = 'S'.
      concatenate text-h01 sy-repid into wa-info separated by space.
      append wa to header.
    ********" LOGO
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = header
                i_logo             = 'ENJOYSAP_LOGO'.
    *********" LOGO
    endform.
    Here in TOP-OF-PAGE form it will show you the Prog name,Date, User Name.
    Just you need to give the text in it.
    You can refer the below link also.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
    Thanks.
    If this helps you reward with points.
    Message was edited by: KDeepak

  • Inserting Image/Logo

    Hi
    How do I insert a image in to top right of the report in test stand (opposite to STATION ID, SERIAL NUMBER ect..). See attached word file for exact location.
    OR
    Top of the Report?
    Attachments:
    Test_stand_Logo.doc ‏69 KB

    Hi,
    Try this example.
    In the ModifyReportHeader. In the Expression step, I use a Find() to get a start index after the string "Sttion ID:"
    Then I use the SearchAndReplace() to change "\n" for the string contained in Locals.AddToHeader, but I only do this once. Hence the value 1 after the False parameter.
    Hope this helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    Computer10.seq ‏46 KB

  • How to insert a logo in ALV

    Hello all,
    when I run a report that uses REUSE_ALV_GRID_DISPLAY function I can see a EnjoySAP logo. I would like to change that logo, to do so, I went to tx SMW0 to import the logo I need and I have changed the name of the logo in my program. However, when I run it I don't see any logo.. is there anything wrong? or something missing...
    thank you.
    Miguel.

    Look at OSS Note 695372.
    Regards,
    Subramanian V.

  • How do attach LOGO  to ALV ( object oriented)

    Hi,
    How do we attach logo to the output list of ALV.
    Regards
    Vara

    Hi,
    In the transaction OAOR, you should be able to insert your company Logo.
    GOTO - OAOR (Business Document Navigator)
    Give Class Name - PICTURES Class Type - OT..... then Execute
    It will show you the list, then select ENJOYSAP_LOGO.
    On that list, you will find one control with a "create" tab.
    Click std. doc types.
    Select SCREEN and double-click.
    It will push FILE selection screen.
    Select your company logo (.gif) and press OK.
    It will ask for a description- for instance: "company logo".
    It will let you know your doc has been stored successfully.
    You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
    The following is the code for inserting the logo in ALV.
    FORM TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        I_LOGO = 'ENJOYSAP_LOGO'
        IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.
    Regards,
    Ferry Lianto

  • How to upload logos in alv reports

    how to upload logos in alv reports?

    Hi Kishore,
    ALV LOGO
    Re: How do I insert a logo in ALV using Function Modules?
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
    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
    Here you go !!
    *& Form TOP_OF_PAGE
    text
    FORM F_TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LISTHEADER
    i_logo = Logo name
    I_END_OF_LIST_GRID =.
    ENDFORM. "TOP_OF_PAGE
    Hope this helps.
    Manish

  • Logo in ALV

    Hi Gurus,
    I need a ALV Report in the below given  manner.
    Logo
    Company Details
    Customer Number
      Sales Details
    Customer Number
      Sales Details
    Customer Number
      Sales Details
    Footer
    Is it possible ? How?
    Thanks & regards,
    Lijo Joseph

    Hi,
    Write  the code in Top-of-page event in ALV.
    The following is the code for inserting the logo in ALV.
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
               I_LOGO             = 'ENJOYSAP_LOGO'
                IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
    ENDFORM.
    ALso include the company details in the top-ofpage event.
    regards,
    keerthi

  • Insert logo in alv

    hello experts....
    In alv reports how i insert logo into alv grid ?tell me procedure, in the same report how insert background logo?

    Hi,
    At first you have to upload the logo in the application server using transaction 'OAER'.
       1. Go to Transaction OAER,
       2. Give Class Name as PICTURES
       3. Class type as OT
       4. Object Key as the name of the Object u want to specify
       5. Upon execution you would be prompted to give the file path details. Just upload which ever logo u want to display
       6. Now you can use the same name in your ALV FM
    In your ALV program, you need to have event for TOP_OF_PAGE, and also this works only in case of Grid not in ALV LIST.
    Look at the sample code to display LOGO.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      i_callback_program = i_repid
      it_fieldcat = header
      is_layout = gt_layout
      i_callback_top_of_page = 'TOP-OF-PAGE1'
      i_grid_title = xyz
      it_sort = gt_sort[]
      i_default = 'X'
      i_save = 'U'
      is_variant = gt_variant
      it_events = gt_events
    tables
      t_outtab = t_output.
    Form TOP-OF-PAGE1
    form top-of-page1.
    data: header type slis_t_listheader,
          wa     type slis_listheader.
    TITLE AREA
    wa-typ = 'S'.
    wa-info = text-h04.
    append wa to header.
    wa-typ = 'S'.
    write sy-datum to wa-info mm/dd/yyyy.
    concatenate text-h03 wa-info into wa-info separated by space.
    append wa to header.
    wa-typ = 'S'.
    concatenate text-h02 sy-uname into wa-info separated by space.
    append wa to header.
    wa-typ = 'S'.
    concatenate text-h01 sy-repid into wa-info separated by space.
    append wa to header.
    ********" LOGO
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = header
    i_logo = 'ENJOYSAP_LOGO'.
    *********" LOGO
    endform.
    Here in TOP-OF-PAGE form it will show you the Prog name,Date, User Name.

  • Logo using  List ALV list dispaly

    Hi,
    I am using FM:REUSE_ALV_COMMENTARY_WRITE to print logo in ALv header with list display using REUSE_ALV_LIST_DISPLAY.
    Header is being displayed except logo.Below is the code.
    Please let me know if anything to be done additionally to get the logo ,if naybody has displayed logo using list display i mean above FMs.
    FORM TOP_OF_PAGE.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = ''.
      append x_heading to t_heading.
    Program name
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Program: '.
      x_heading-info = sy-repid.
      append x_heading to t_heading.
    User who is running the report
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'User: '.
      x_heading-info = sy-uname.
      append x_heading to t_heading.
    Date of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Date: '.
      write sy-datum to x_heading-info.
      append x_heading to t_heading.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
           I_LOGO                   = 'ENJOYSAP_LOGO'
           IT_LIST_COMMENTARY       = t_heading
      I_END_OF_LIST_GRID       =
       I_ALV_FORM               = 'X'.
    ENDFORM.

    Hi,
    Kindly go through this below sample program:
    *+
    REPORT  YKC_ALV_OOPS_LOGO_DISPALY.
    tables: MARA.
    TYPE-POOLS cndp.
    data: begin of it_tab occurs 0,
          matnr like mara-matnr,
          ersda like mara-ersda,  "creation date
          ernam like mara-ernam,  "person created
          pstat like mara-pstat,  "maint stat
          lvorm like mara-lvorm,  "flg for deletion
          mtart like mara-mtart,  "mat type
          meins like mara-meins,  "uom
          end of it_tab.
    data: wa_it_tab like line of it_tab.  "making work area
    data: i_modified TYPE STANDARD TABLE OF mara,"For getting modified rows
          w_modified TYPE mara.
    CLASS lcl_events_d0100 DEFINITION DEFERRED.
    DATA: event_receiver1  TYPE REF TO lcl_events_d0100,
          i_selected_rows TYPE lvc_t_row,                "Selected Rows
          w_selected_rows TYPE lvc_s_row.
    *----declaration for logo display custom container
    DATA  url(132).
    custom container
    DATA pic_container TYPE REF TO cl_gui_custom_container.
    picture Control.
    DATA picture TYPE REF TO cl_gui_picture.
    Definition of Control Framework
    CLASS cl_gui_cfw DEFINITION LOAD.
          CLASS lcl_events_d0100 DEFINITION
    CLASS lcl_events_d0100 DEFINITION.
      PUBLIC SECTION.
       METHODS:
    *double_click FOR EVENT double_click
                            OF cl_gui_alv_grid
                            IMPORTING e_row
                                      e_column.
        METHODS
            handle_hotspot_click
            FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
                 e_row_id
                 e_column_id
                 es_row_no
                 sender.
    *---code addition for ALV pushbuttons
    *--for placing buttons
        METHODS handle_toolbar_set
            FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING
                  e_object
                  e_interactive.
    *---user command on clicking a button
        METHODS handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING
                 e_ucomm.
    ENDCLASS.                    "lcl_events_d0100 DEFINITION
                        LOCAL VARIABLE
    DATA ok_code TYPE sy-ucomm.
                          FOR VARIANT
    DATA st_var TYPE disvariant .
    DATA save TYPE c.
    st_var-report = 'YKC_ALV_OOPS_LOGO_DISPALY'.
    save = 'A'.
            FOR LAYOUT
    DATA loyo TYPE lvc_s_layo.
    loyo-zebra = 'X'.
    loyo-detailinit = 'X'.
    loyo-info_fname = 'RED'.
              FOR FIELD CATALOG
    DATA fcat TYPE lvc_t_fcat.
    DATA wa_fcat LIKE LINE OF fcat.
    *--Declaration for toolbar buttons
    DATA : ty_toolbar      TYPE stb_button.
    DATA : e_object        TYPE REF TO cl_alv_event_toolbar_set,
           io_alv_toolbar  TYPE REF TO cl_alv_event_toolbar_set.
    *---custom container
    DATA container TYPE REF TO cl_gui_custom_container.
    DATA ref_grid TYPE REF TO cl_gui_alv_grid.
    CREATE OBJECT container
      EXPORTING
        container_name = 'CONTAINER'."name of container in module pool
    CREATE OBJECT ref_grid
      EXPORTING
        i_parent = container.
          CLASS lcl_events_d0100 IMPLEMENTATION
    CLASS lcl_events_d0100 IMPLEMENTATION.
    *---method for hotspot
      METHOD handle_hotspot_click.
        DATA:ls_col_id   TYPE lvc_s_col.
        READ TABLE it_tab INTO wa_it_tab
                                 INDEX e_row_id-index.
        IF sy-subrc = 0.
          CHECK ( wa_it_tab-matnr IS NOT INITIAL ).
          CASE e_column_id-fieldname.
            WHEN 'MATNR'.
              leave program.
            WHEN OTHERS.
          do nothing
          ENDCASE.
          CALL METHOD ref_grid->set_current_cell_via_id
            EXPORTING
              is_row_id    = e_row_id
              is_column_id = ls_col_id.
        ENDIF.
      ENDMETHOD.                    "handle_hotspot_click
    **---method for handling toolbar
      METHOD handle_toolbar_set.
        CLEAR ty_toolbar.
        ty_toolbar-function = 'EDIT'. "name of btn to  catch click
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'EDIT'.
        APPEND ty_toolbar    TO e_object->mt_toolbar.
      ENDMETHOD.                    "handle_toolbar_set
      METHOD handle_user_command.
        DATA: wr_data_changed TYPE REF TO cl_alv_changed_data_protocol.
        DATA: lt_rows TYPE lvc_t_row,
              lt_index TYPE  lvc_s_row-index.
        CASE e_ucomm.
          WHEN 'EDIT'.
          perform save_database.
          CALL METHOD ref_GRID->REFRESH_TABLE_DISPLAY.
        ENDCASE.
      ENDMETHOD.                    "handle_user_command
    *---End of page
    ENDCLASS.                    "lcl_events_d0100 IMPLEMENTATION
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM field_catalog.
    *&      Form  get_data
          text : getting data into internal table
    -->  p1        text
    <--  p2        text
    form get_data .
      select matnr ersda ernam pstat lvorm mtart meins
             into table it_tab
             from mara
             where matnr GE '000000000000000001'.
    endform.                    " get_data
    *&      Form  field_catalog
          text
    -->  p1        text
    <--  p2        text
    form field_catalog .
      REFRESH fcat.
      DATA: lv_pos TYPE i.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-coltext = 'Material No'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-hotspot = 'X'.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'ERSDA'.
      wa_fcat-coltext = 'Creation Date'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-edit = 'X'.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'ERNAM'.
      wa_fcat-coltext = 'Person Created'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'PSTAT'.
      wa_fcat-coltext = 'Maint Stat'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'LVORM'.
      wa_fcat-coltext = 'Flag For Deletion'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'MTART'.
      wa_fcat-coltext = 'Material Type'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      lv_pos = lv_pos + 1.
      wa_fcat-fieldname = 'MEINS'.
      wa_fcat-coltext = 'UOM'.
      wa_fcat-col_pos = lv_pos.
      wa_fcat-outputlen = 18.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      CREATE OBJECT event_receiver1.
    *---setting event handlers
    SET HANDLER event_receiver1->double_click         FOR ref_grid.
      SET HANDLER event_receiver1->handle_toolbar_set   FOR ref_grid.
      SET HANDLER event_receiver1->handle_user_command  FOR ref_grid.
      SET HANDLER event_receiver1->handle_hotspot_click FOR ref_grid.
              ALV GRID DISPLAY
      CALL METHOD ref_grid->set_table_for_first_display
        EXPORTING
          is_variant      = st_var
          i_save          = save
          is_layout       = loyo
        CHANGING
          it_outtab       = it_tab[]
          it_fieldcatalog = fcat.
      CALL SCREEN 100.
    endform.                    " field_catalog
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
    create the custom container
        CREATE OBJECT pic_container
                      EXPORTING container_name = 'CUSTOM'.
    create the picture control
    create the picture control
        CREATE OBJECT picture
                      EXPORTING parent = pic_container.
    Request an URL from the data provider by exporting the pic_data.
        CLEAR url.
        PERFORM load_pic_from_db CHANGING url.
    load picture
        CALL METHOD picture->load_picture_from_url
          EXPORTING
            url = url.
       init = 'X'.
        CALL METHOD cl_gui_cfw=>flush
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
    error handling
        ENDIF.
    *---for editing
      CALL METHOD ref_grid->register_edit_event
      EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified.
      SET PF-STATUS 'S100'.
      SET TITLEBAR 'XXX'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  exit  INPUT
          text
    module exit input.
      CASE ok_code.
        WHEN 'EXIT' .
          CLEAR ok_code.
          LEAVE PROGRAM.
      ENDCASE.
    endmodule.                 " exit  INPUT
    *&      Form  SAVE_DATABASE
          text : saving into DDIC from internal table
    -->  p1        text
    <--  p2        text
    FORM SAVE_DATABASE .
    Getting the selected rows index
        CALL METHOD ref_grid->get_selected_rows
                    IMPORTING  et_index_rows = i_selected_rows.
    Through the index capturing the values of selected rows
        LOOP AT i_selected_rows INTO w_selected_rows.
        READ TABLE it_tab INTO wa_it_tab INDEX w_selected_rows-index.
        IF sy-subrc EQ 0.
          MOVE-CORRESPONDING wa_it_tab TO w_modified.
          APPEND w_modified TO i_modified.
        ENDIF.
      ENDLOOP.
      MODIFY mara FROM TABLE i_modified.
    ENDFORM.                    " SAVE_DATABASE
    *&      Form  LOAD_PIC_FROM_DB
          text : loading logo
         -->P_URL      text
    FORM load_pic_from_db  CHANGING p_url.
      DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.
      DATA html_table LIKE w3html OCCURS 1.
      DATA return_code LIKE  w3param-ret_code.
      DATA content_type LIKE  w3param-cont_type.
      DATA content_length LIKE  w3param-cont_len.
      DATA pic_data LIKE w3mime OCCURS 0.
      DATA pic_size TYPE i.
      REFRESH query_table.
      query_table-name = '_OBJECT_ID'.
      query_table-value = 'ENJOYSAP_LOGO'.u201Dname of logo
      APPEND query_table.
      CALL FUNCTION 'WWW_GET_MIME_OBJECT'
        TABLES
          query_string        = query_table
          html                = html_table
          mime                = pic_data
        CHANGING
          return_code         = return_code
          content_type        = content_type
          content_length      = content_length
        EXCEPTIONS
          object_not_found    = 1
          parameter_not_found = 2
          OTHERS              = 3.
      IF sy-subrc = 0.
        pic_size = content_length.
      ENDIF.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type     = 'image'
          subtype  = cndp_sap_tab_unknown
          size     = pic_size
          lifetime = cndp_lifetime_transaction
        TABLES
          data     = pic_data
        CHANGING
          url      = url
        EXCEPTIONS
          OTHERS   = 1. *+
    Hope it helps you
    Regrds
    Mansi

  • INSERTING LOGO IN ALV GRID

    hi experts,
    how can i insert logo in alv grid..can u send me some examples of alv that includes all the functionalities like user-command,commentary write n also logo insertion etc..
    regards,
    raman

    hi ,
        chk out this .....and  try this ..
    for getting the events ....
    FORM ZVRPSALV_EVENT_CAT  CHANGING RT_EVENT TYPE slis_t_event .
        DATA : s_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = RT_EVENT
       EXCEPTIONS
         list_type_wrong = 1
         OTHERS          = 2.
    CASE sy-subrc.
       WHEN 1.
         MESSAGE s000 WITH 'List type does not exist'(058).
         LEAVE LIST-PROCESSING.
       WHEN 2.
         MESSAGE s000 WITH 'Error with List Type'(059).
         LEAVE LIST-PROCESSING.
    ENDCASE.
      READ TABLE RT_EVENT WITH KEY NAME = slis_ev_top_of_page INTO s_event .
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE'(056) TO s_event-form.
        APPEND s_event TO rt_event.
        CLEAR s_event.
      ENDIF.
    ENDFORM.                    " EVENT_CAT
    *&      Form  ZVRPSALV_GRIDDISPLAY1
          text
    -->  p1        text
    <--  p2        text
    FORM ZVRPSALV_GRIDDISPLAY1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
       I_CALLBACK_USER_COMMAND           = 'DISPLAY_DOCUMENT '
       I_CALLBACK_TOP_OF_PAGE            = ' TOP-OF-PAGE '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'BASIC LIST'
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = T_FCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         = RT_EVENT
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = T_ITAB
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " ZVRPSALV_GRIDDISPLAY1
    SUBROTINE FOR DISPLAYING THE SECONDRY ALV GRID.
    FORM DISPLAY_DOCUMENT USING R_UCOMM  LIKE SY-UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
    IF RS_SELFIELD-FIELDNAME = 'VBELN'.
      READ TABLE T_ITAB INDEX  RS_SELFIELD-TABINDEX .
    V_VBELN = T_ITAB-VBELN.
    LOOP AT T_ITAB WHERE VBELN = V_VBELN.
       Move: T_ITAB-POSNR to T_ITAB1-POSNR  ,
             T_ITAB-MATNR to T_ITAB1-MATNR ,
             T_ITAB-MATKL to T_ITAB1-MATKL,
             T_ITAB-ARKTX to T_ITAB1-ARKTX  ,
             T_ITAB-PSTYV to T_ITAB1-PSTYV  ,
             T_ITAB-SPART to T_ITAB1-SPART ,
             T_ITAB-GSBER to T_ITAB1-GSBER ,
             T_ITAB-KWMENG to T_ITAB1-KWMENG .
       Append T_ITAB1.
    ENDLOOP.
       ENDIF.
    *&      Form  ZVRPSALV_COMMENT
          text
         -->P_T_HEADER  text
    FORM ZVRPSALV_COMMENT  USING  P_T_HEADER type slis_t_listheader .
    DATA : LS_LINE TYPE SLIS_LISTHEADER.
    CLEAR LS_LINE .
    LS_LINE-TYP = 'H'.
    LS_LINE-INFO =  'HEADING LIST'.
    APPEND LS_LINE TO P_T_HEADER.
      CLEAR LS_LINE.
      LS_LINE-typ = 'S'.
      write sy-datum to LS_LINE-info MM/DD/YYYY.
      CONCATENATE text-041 LS_LINE-info INTO LS_LINE-info separated by space .
      APPEND LS_LINE TO P_T_HEADER.
    ENDFORM.                    " ZVRPSALV_COMMENT
    SUBROUINE FOR TOP OF PAGE.
    FORM TOP_OF_PAGE.
    clear t_header.
    DATA: LV_HEADER TYPE SLIS_LISTHEADER.
      LV_HEADER-TYP = 'S'.
      WRITE SY-DATUM TO LV_HEADER-INFO MM/DD/YYYY.
      CONCATENATE TEXT-041 LV_HEADER-INFO INTO LV_HEADER-INFO SEPARATED BY SPACE.
      APPEND LV_HEADER TO T_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         IT_LIST_COMMENTARY       = T_HEADER
        I_LOGO                   = ' ENJOYSAP_LOGO '
       I_END_OF_LIST_GRID       =
       I_ALV_FORM               =
    ENDFORM.
    *&      Form  ZVRPSALV_EVENTTAB
          text
         <--P_T_EVENT  text
    FORM ZVRPSALV_EVENTTAB  CHANGING P_T_EVENT TYPE SLIS_T_EVENT.
      DATA : LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = P_T_EVENT.
    SEARCH THE TOP OF PAGE EVENT.
      READ TABLE P_T_EVENT WITH KEY NAME = SLIS_EV_TOP_OF_PAGE INTO LS_EVENT .
      IF SY-SUBRC = 0 .
      MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
      APPEND LS_EVENT TO P_T_EVENT.
      ENDIF.
    ENDFORM.                    " ZVRPSALV_EVENTTAB
    thanks and regards
    Priyank Dixit

  • Is it possible to display LOGO in simple ALV list?

    Hi Guys,
    Is it possible to display LOGO in simple ALV list. If yes plz explain in details.
    Thanks
    Sharat

    Yes it is possible to display logo at the top of the page.
    TYPE-POOLS: slis.
    *     Data Decalaration
    DATA: it_vbak TYPE TABLE OF vbak.
    DATA: g_repid TYPE sy-repid.
    DATA: it_listheader TYPE slis_t_listheader,
           wa_listheader TYPE slis_listheader.
    *     START-OF-SELECTION
    START-OF-SELECTION.
       g_repid = sy-repid.
       SELECT * FROM vbak INTO TABLE it_vbak.
       PERFORM build_alv_header.
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           i_callback_program     = g_repid
           i_callback_top_of_page = 'TOP_OF_PAGE'
           i_structure_name       = 'vbak'
         TABLES
           t_outtab               = it_vbak.
    *&      Form  BUILD_ALV_HEADER
    FORM build_alv_header .
    *  Type H is used to display headers i.e. big font
       wa_listheader-typ  = 'H'.
       wa_listheader-info ='Flight Details'.
       APPEND wa_listheader TO it_listheader.
       CLEAR wa_listheader.
    *  Type S is used to display key and value pairs
       wa_listheader-typ = 'S'.
       APPEND wa_listheader TO it_listheader.
       CLEAR wa_listheader.
    *  Type A is used to display italic font
       wa_listheader-typ = 'A'.
       wa_listheader-key = 'Date    :' .
       wa_listheader-info ='SAP ALV Report'.
       APPEND wa_listheader TO it_listheader.
       CLEAR wa_listheader.
    ENDFORM.                    " BUILD_ALV_HEADER
    *&      Form  top_of_page
    FORM top_of_page.
       CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
         EXPORTING
           it_list_commentary = it_listheader
           i_logo         = 'PARI'.
    ENDFORM.                    "top_of_page

Maybe you are looking for