How to put header and how to insert logo in this report

HI
I want  a header and logo in this report.how to do this in ALV report.Also why we have to put the          sy-repid.Plz tell me in this report where i have to do all this.Plz show me in detail.
REPORT  ZREPORT_ALV .
TYPE-POOLS : slis.
tables:vbak,vbap.
*DATA:  report_id LIKE sy-repid.
DATA: I_LAYOUT TYPE SLIS_LAYOUT_ALV.
data: ivariant(1) type c,
      itvariant like disvariant,
      w_variant like disvariant.
initialization.
*REPORT_ID = SY-REPID.
PERFORM F1000_LAYOUT_INIT. "using I_LAYOUT.
ivariant = 'A'.
itvariant = w_variant.
select-options:so_vbeln for vbap-vbeln.
data:itab like vbak occurs 0 with header line.
data:itab1 like vbap occurs 0 with header line.
start-of-selection.
select * from vbak into table itab where vbeln in so_vbeln.
if not itab[] is initial.
select * from vbap into table itab1
for all entries in itab
where vbeln = itab-vbeln.
endif.
data:ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat1  TYPE slis_t_fieldcat_alv.
****For alv display
IF NOT itab1[] IS INITIAL.
   DEFINE ls_fieldcat.
   add 1 to ls_fieldcat-col_pos.
    ls_fieldcat-fieldname    = &1.
    ls_fieldcat-outputlen    = &2.
    ls_fieldcat-seltext_l    = &3.
     ls_fieldcat-emphasize  = &4.
    append ls_fieldcat to lt_fieldcat1.
    clear ls_fieldcat.
  END-OF-DEFINITION.
    ls_fieldcat 'VBELN'           '10'     'Sales Order Number'.
   ls_fieldcat 'POSNR'           '6'        'SO Item'.
    ls_fieldcat 'MATNR'           '13'      'Material No'.
m_fieldcat1 'NETWR'           '13'        'Amount'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
  I_INTERFACE_CHECK                 = ' '
  I_BYPASSING_BUFFER                = ' '
  I_BUFFER_ACTIVE                   = ' '
  I_CALLBACK_PROGRAM                = 'wf_report'
  I_CALLBACK_PF_STATUS_SET          = ' '
  I_CALLBACK_USER_COMMAND           = ' '
  I_CALLBACK_TOP_OF_PAGE            = ' '
  I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
  I_CALLBACK_HTML_END_OF_LIST       = ' '
  I_STRUCTURE_NAME                  =
I_BACKGROUND_ID                   = ' '
  I_GRID_TITLE                      =
  I_GRID_SETTINGS                   =
   IS_LAYOUT                         =  I_LAYOUT
   IT_FIELDCAT                       =  lt_fieldcat1
  IT_EXCLUDING                      =
  IT_SPECIAL_GROUPS                 =
  IT_SORT                           =
  IT_FILTER                         =
  IS_SEL_HIDE                       =
  I_DEFAULT                         = 'X'
  I_SAVE                            = ' '
  IS_VARIANT                        =   ITVARIANT
  IT_EVENTS                         =
  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                          =  itab1
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.
endif.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
   I_SAVE              = ivariant
  CHANGING
   CS_VARIANT          = itvariant
EXCEPTIONS
  WRONG_INPUT         = 1
  NOT_FOUND           = 2
  PROGRAM_ERROR       = 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.
FORM F1000_LAYOUT_INIT. "USING I_LAYOUT TYPE SLIS_LAYOUT_ALV.
*CLEAR I_LAYOUT.
i_layout-colwidth_optimize = 'X'.
I_LAYOUT-key_hotspot = u2018Xu2019.
I_LAYOUT-hotspot_fieldname =  MATNR.
ENDFORM.

hi,,,,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid >>>>>>>>>>>>> your report name.
regarding logo and header,,,,
first store the logo in T-code OAOR, then call that in your report.......
data: heading        TYPE slis_t_listheader,
      wa_header      TYPE slis_listheader,
     events         TYPE slis_t_event.
* To display TOP_OF_PAGE.
FORM top_of_page.
  DATA : text(40),txtdt(40).
  CLEAR l_string.
  l_string = 'JCB India Limited'(hd2).
  wa_header-typ  = 'H'.
  wa_header-info = l_string.
  APPEND wa_header TO heading.                              " index 1.
  CLEAR l_string.
  WRITE :'Number of records:' TO text,dbcnt TO text+20 LEFT-JUSTIFIED.
  wa_header-typ  = 'S'.
  wa_header-info = text.
  APPEND wa_header TO heading.
  CLEAR l_string.
  wa_header-typ  = 'S'.
  WRITE : 'Report Run Date  :' TO txtdt,sy-datum TO txtdt+20 DD/MM/YY.
  WRITE sy-datum TO dat DD/MM/YY.
  wa_header-info = txtdt.
  APPEND wa_header TO heading.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      i_logo             = 'ENJOYSAP_LOGO'
      it_list_commentary = heading.
  CLEAR heading.
ENDFORM.                    "top_of_page
to execute top-of-page you have to create events.
for ex......
FORM create_event USING p_events 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_events.
  READ TABLE p_events WITH KEY name = slis_ev_top_of_page
                           INTO ls_event.
  IF sy-subrc = 0.
    MOVE formname_top_of_page TO ls_event-form.
    APPEND ls_event TO p_events.
  ENDIF.
ENDFORM.                    " create_event

Similar Messages

  • How to put header and footer information in excel chart

    I modified the create chart.vi, I got from this site and able to create a chart from *.xls file. Now I want to print the filename as header and date and time the chart created as footer in the excel chart. Any idea is appreciated.
    Thank you
    MM
    Attachments:
    Create_Rundown_Chart.vi ‏246 KB
    SN20755-Horiz_1-031027-160128-rundowndata.xls ‏15 KB

    Under the property node _Chart where you have the ChartTitle, add the property PageSetup. Cascade that into another property node and choose CenterHeader and CenterFooter. You can write the strings directly into these properties. Use the following codes:
    Filename = &F, Date = &D, Time = &T
    Be sure to close all references that do not leave the page (ie. Chart, Legend, ChartArea, etc.). Otherwise Excel will hang later on.
    Michael Munroe
    www.abcdefirm.com
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • How to get Header and footer in PDF file from a report program

    I am generating spool from ALV GRID DISPLAY. Only the body of a report is coming in the SPOOL. I mean content of the TOP_UP_PAGE event is not coming in the SPOOL. Please suggest me.
    Coding I am pasting here.
    * Begin of modification(+) by I080845 ( Prasanta Maiti ) 12/23/2011 Defect# 17821
        IF sy-batch IS NOT INITIAL
    * Begin of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
        and i_final is NOT INITIAL.
    * End of modification(+) by I080845 ( Prasanta Maiti ) 01/19/2012 Defect# 18155
    * The print parameters are retrived and validate
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
    *           ARCHIVE_TEXT          = c_check
    *           AR_OBJECT             = c_check
    *          ARCHIVE_REPORT         = c_check
    *          COVER_PAGE             = c_check
              in_archive_parameters  = v_arcpar
              in_parameters          = v_pripar
              destination            = 'LOCL'
              layout                 = 'X_65_512/2'"c_layout
              line_count             = '65'  "60
              line_size              = '1024'
              no_dialog              = c_check
            IMPORTING
              out_archive_parameters = v_arcpar
              out_parameters         = v_pripar
              valid                  = v_val
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    IF v_val  NE space AND sy-subrc = 0.
            v_pripar-prrel = space.
            v_pripar-primm = space.
            NEW-PAGE PRINT ON NEW-SECTION PARAMETERS v_pripar
            ARCHIVE PARAMETERS v_arcpar NO DIALOG.
            NEW-PAGE.
    **    displaying output in PDF
    *    PERFORM f_show_record.
    *   ALV Display
            PERFORM f_alv_display.
            NEW-PAGE PRINT OFF.
            CALL FUNCTION 'ABAP4_COMMIT_WORK'.
          ENDIF.
          IF NOT sy-spono IS INITIAL.
            "Declarations
            v_spool_id = sy-spono.
    * Checking the flag for too large spool
    *    IF v_too_large IS INITIAL.
            CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
              EXPORTING
                src_spoolid              = v_spool_id
                no_dialog                = space
              IMPORTING
                pdf_bytecount            = v_bytecount
              TABLES
                pdf                      = i_pdf
              EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
    Edited by: Thomas Zloch on Feb 10, 2012

    Hi,
    Try with ALV LIST DISPLAY. I dont thing so its possible with ALV GRID DISPLAY.

  • How to change header and footer in login page in oracle apps r12

    Hi all,
    how to change header and footer in login page in oracle apps r12 and login button background color, please help me
    thanks
    saran

    how to change header and footer in login page in oracle apps r12 and login button background color, please help meTips For Personalizing The E-Business Suite R12 Login Page (MainLoginPG) [ID 741459.1]
    How to Personalize Login page in R12? [ID 579917.1]
    R12 Login Page: How to Personalize the Logo ? [ID 849752.1]
    Thanks,
    Hussein

  • How to place header and footer  in OO-ALV program using class

    How to place header and footer  in OO-ALV program using class tell me wat r the class we shold use and their attributes as well

    Hi Venkatesh,
    Take a look at this how to [ABAP Objects - ALV Model - Using Header and Footer|https://wiki.sdn.sap.com/wiki/x/xdw]
    it's explaining how to define the classes and use it for display an ALV with Header and Footer.
    Regards,
    Marcelo Ramos

  • How to print header and footer in SET_TABLE_FOR_FIRST_DISPLAY

    Hello Experts,
             How to print header and footer while using the method SET_TABLE_FOR_FIRST_DISPLAY, any tips from the experts will be appreciated.
    Regards,
    Babu

    Hi,
    there are four events for printing: print_end_of_list, print_top_of_list, print_end_of_page and print_top_of_page. More information about implementing these events is in this bible for ALV:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Cheers

  • How to put headers and footers in web analysis

    Hi All,
    Can anyone of you please let me know how to put headers and footers in web analysis...
    Thanks & Regards
    Ambica Atluri

    Hi Anu,
    I have already gone through the document. In that i dint find anything related to headers and footers.Only thing that is available is sorting the dimension headers.
    Please let me know if you have any other info regarding this.
    Thanks & Regards
    Ambica Atluri

  • How to enable RFC and how to use it in Report..please tell its very urgent

    Dear Techie's,
    Please tell its very urgent..
    How to enable RFC and how to use it in Report. ??
    Virendra

    hi,
    pls chk any of these links.
    http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    rgds
    Anver

  • I need information on how Adobe Drive works and how to set it up

    Hey folks,
    believe it or not, but I have been searching a lot on the web already on how to find information how Adobe Drive works and how to set it up.
    Most information that I found is old and seems to be valid only for older versions of Creative suite. Here in the company we use CS5.5 and will switch to CS6 soon.
    I already downloaded Adobe Drive 3 and installed it on my Mac. Unfortunately I don't know what to do next? Do I need Adobe CQ to make it work? Or can I use it with an existing SVN infrastructure, that we have here? Actually I would like to access the SVN via Adobe Bridge. But after the installation of Adobe Drive my Bridge CS5.5 is crashing while starting up, and I didn't find out how to fix this again.
    Actually I just found the manual for Adobe Drive 3 and read it. Seems to be easy in case its working. But it's not in my case, as mentioned above.
    Any idea what could be the problem?

    Thanks,
    in the meantime I managed to re-setup Adobe Drive 3 again. Bridge CS5.1 is still crashing (i have a log-file with a detailed error-report, if somebody knows how to extract information from this.
    At least now I can start Drive as a standalone application.
    So now my main question is how to connect Drive 3 to our subversion infrastructure in the company. Does anybody have information on this?

  • "Open In Tabs." How it got there and how to get rid of it?

    I've searched the forums and tried all I can think of but cannot figure out:
    1) How an "Open in Tabs" item got in my Bookmarks Menu -
    When I go to Main Menu>Bookmarks, at the very bottom is a dividing line and below it, "Open In Tabs." Yet, when I Show All Bookmarks, I cannot find it anywhere. It's not a folder, it's not a link or site, its not in the Bookmarks Bar or the Bookmarks Menu - but it's there when I drop down from Main Menu>Bookmarks.
    2) How to create my own "open in tabs" with only two bookmarks in it that I can set to open at starting up Safari.
    Right now, when I click it, it tries to open everthing in my Bookmarks Menu.
    Can anyone explain (how it got there and how to get rid of it) - and help me do what I'm trying to do (open two sites at startup)? Thanks.
    (Safari 1.3.2-OS 10.3.9)
    nÔÔdle--hëad Per-rrr-plexed

    I have to apologize, I accidently gave the link to Safari Enhancer when I mentioned Safari Extender.
    Safari Enhancer and Safari Extender are two different programs with two different purposes.
    Enhancer is a free standalone program to adjust some of the features in Safari that can not be adjusted using Safari's Preferences. It also alows you to make these changes without having to use the Terminal.
    Extender is a shareware Safari plugin that adds its own items to the control-click contextual menus in Safari and includes menu items to work with tabs, mail, user agents, printing, and other functions.
    Both are useful programs. I have and use each of them.

  • Today my money is deducted Rs.60 when I try to download paid applications of any amount and I am getting message transaction declined, so why my money is deducted. I lost almost Rs 480 rupees . So how to get refund and how to make card working?

    Today my money is deducted Rs.60 when I try to download paid applications of any amount and I am getting message transaction declined, so why my money is deducted. I lost almost Rs 480 rupees . So how to get refund and how to make card working?

    Today my money is deducted Rs.60 when I try to download paid applications of any amount and I am getting message transaction declined, so why my money is deducted. I lost almost Rs 480 rupees . So how to get refund and how to make card working?

  • How to download itunes and how to use windows in my iPad?

    How to download itunes and how to use windows in my iPad?

    The iTunes  app comes pre installed on your iPad.
    Use Windows? The iPad is an iOS device. Not possible to run Windows on an iPad.

  • WHAT are tokens and how it is issued and how it is viewed and solved by who

    WHAT are tokens and how it is issued and how it is viewed and solved by who
    points will be awarded

    Hi Jagrut,
    If you are talking of support token then,
    TOKENs are nothing but the issues faced in the actual live system(Production).
    So the end user who is facing will raise it, it will be assigned to the production support team and they will solve it.
    Regards,
    Atish

  • Samsung Droid Charge: how many got NEW and how many got REFURBISHED?

    Question for folks who ordered the Samsung Droid Charge as replacement....
    How many got NEW and how many got REFURBISHED phones?
    There are some members on this forum who reported getting refurbished
    units, sometimes even without batteries and battery doors.
    The VZW corporate store that I went to told me that their customers all got
    new-in-the-box units within 2 to 3 days after visiting the store.
    The store manager assured me the same thing.... but I couldn't decide if I really
    wanted a Samsung Droid Charge or the dual-core processor HTC Incredible 2....
    so I'm gonna sleep on it for a couple of days.   (the HTC can be ordered over
    the phone, without requiring a store visit, according to the manager)

    potove wrote:
    Thanks!   I made a mistake... it was the Motorola X2 that has the dual-core processor.
    Am I being silly here? Will a Motorola X2 with dual-core process be that much faster
    than the Samsung Droid Charge with single-core processor? 
    Not that much faster, and could even be somewhat slower depending on settngs

  • TS4147 I updated my iphone yesterday.  I have the 4S.  I have my daughters and mine contacts now.  I don't want hers.  How did that happen and how do I get rid of them?

    I updated my iphone yesterday.  I have the 4S.  I have my daughters and mine contacts now.  I don't want hers.  How did that happen and how do I get rid of them?

    This happens with you are both syncing data such as contacts on your devices with the same iCloud account.  This will result in the data being merged and synced back to all connected devices.  To correct this you need to have different iCloud accounts on each device.
    To do this, on the device that will be changing iCloud accounts go to Settings>iCloud and turn all data that is syncing with iCloud (contacts, calendars, etc.) to Off.  When prompted choose to keep the data on the iPhone.  After everything is turned off, scroll to the bottom and tap Delete Account.  (This will only delete the account from the phone, not from iCloud, so the other phone won't be effected by this.)  Next, set up a new iCloud account using a different ID, then turn data syncing for contacts, etc. back to On.  When prompted, choose Merge.  This will upload the data to your new account.  At this point you will have two separate iCloud accounts on each phone with identical data.
    Next, you'll have to go to icloud.com on your computer and sign into each iCloud account separately and delete the unwanted data (for example, deleting her contacts from your iCloud account and vice versa).  These changes will be reflected on each device and things should now be fixed.

Maybe you are looking for

  • LabVIEW 7.0 Build Error 26097

    Hi All, Blast from the past here. I am working on resurrecting an old program (I work for a company where our products are in use for 30 to 50 years). I have all of the vis assembled, the computer is a Windows XP running LabVIEW 7.0 professional with

  • Quicktime 7.6 and Snapz Pro X

    I'm running an older version of Snapz Pro X on my older iMac (flat-screen, domed) under Tiger 10.4.11. I have and paid for the newer Snapz Pro X on my white Macbook purchased this Summer, running Leopard (hence my profile info here), but don't much l

  • Want to add extra functionality

    Hi,     I want to add extra functionality in TC CO40 with BADI.I have identified the BADI.Now I want to put that BADI into standard program.How to go for it?

  • 6140 and Windows 2003

    Hi, We have a 6140 connected to a Windows 2003 Server EE SP1. After volume creation via CAM (version 6.4.1.5), it can be viewed on Device Manager, but cannot be managed (under Disk Management). Server was restarted without success. Different profiles

  • Rebuilding database in Aperture

    Rebuilding database in Aperture causes "Recovered Folder" to appear in project, even with Aperture & Mac trashes empty.  Tried deleting "recovered" images and emptying trashes then rebuilding but it has the same effect, another Recovered Folder.