How to get list header in ECC6.0 of ALV reports ?

Hello i want to display header in ALV reports this the code what i am using..
*ALV TOP-OF-PAGE DECLATRACTION
DATA : W_LISTHEADER TYPE SLIS_LISTHEADER,
       T_LISTHEADER TYPE SLIS_T_LISTHEADER.
**PUPULATING TOP-OF-PAGE.
  w_LISTHEADER-TYP = 'H'.
  W_LISTHEADER-INFO = 'Report for Sales'.
  APPEND W_LISTHEADER TO T_LISTHEADER.
  CLEAR W_LISTHEADER.
It is working fine in SAP4.7 version but in ECC6.0 it is not working where i have to do changes..
Thks

Hi,
Try the top-of-page by using events, like
Data Declaration
TYPE-POOLS: slis.
TABLES: mara.
TYPES: BEGIN OF i_mara,
       matnr LIKE mara-matnr,
       mtart LIKE mara-mtart,
       meins LIKE mara-meins,
       groes LIKE mara-groes,
       volum LIKE mara-volum,
       END OF i_mara.
DATA: it_mara TYPE STANDARD TABLE OF i_mara INITIAL SIZE 0.
ALV Data Declaration
DATA: fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
      i_events TYPE slis_t_event,
      w_events LIKE LINE OF i_events,
      i_repid TYPE sy-repid.
DATA: i_comment TYPE slis_t_listheader,
      wa_comment TYPE slis_listheader.
START-OF-SELECTION.
  PERFORM data_retrieval.
  PERFORM bld_fldcat.
  PERFORM call_events.
  PERFORM display_alv_report.
*&      Form  CALL_EVENTS
      text
FORM call_events.
W_events-name = slis_ev_top_of_page.
W_events-form = 'TOP-OF-PAGE'.
append W_events  to i_events.
clear W_events .
ENDFORM.                    "CALL_EVENTS
Build field catalog for ALV
FORM bld_fldcat.
  fldcat-fieldname = 'MATNR'.
  fldcat-seltext_m = 'MATERIAL NUMBER'.
  fldcat-col_pos = 0.
  APPEND fldcat TO fldcat.
  CLEAR fldcat.
  fldcat-fieldname = 'MTART'.
  fldcat-seltext_m = 'MATERIAL TYPE'.
  fldcat-emphasize = 'C111'.
  APPEND fldcat TO fldcat.
  CLEAR fldcat.
  fldcat-fieldname = 'MEINS'.
  fldcat-seltext_m = 'UNIT OF MEASURE'.
  APPEND fldcat TO fldcat.
  CLEAR fldcat.
  fldcat-fieldname = 'GROES'.
  fldcat-seltext_m = 'SIZE'.
  APPEND fldcat TO fldcat.
  CLEAR fldcat.
  fldcat-fieldname = 'VOLUM'.
  fldcat-seltext_m = 'VOLUME'.
  APPEND fldcat TO fldcat.
  CLEAR fldcat.
ENDFORM.                    "BLD_FLDCAT
Display report using ALV List
FORM display_alv_report.
  i_repid = sy-repid.
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
   EXPORTING
     i_callback_program             = I_REPID
     it_fieldcat                    = fldcat[]
     i_save                         = 'A'
     it_events                      = i_events
    TABLES
      t_outtab                       = it_mara
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.                    "DISPLAY_ALV_REPORT
Retrieve data from MARA table and populate itab IT_MARA
FORM data_retrieval.
  SELECT matnr mtart meins groes volum
  INTO TABLE it_mara FROM mara UP TO 50 ROWS.
ENDFORM.                    "DATA_RETRIEVAL
*&      Form  TOP_OF_PAGE
      text
FORM TOP-OF-PAGE.
  CLEAR i_comment[].
  wa_comment-typ = 'H'.
  wa_comment-info = 'TOP OF PAGE' .    "SY-PAGNO.
  APPEND wa_comment TO i_comment.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary       = i_comment.
ENDFORM.                    "GENERATE_USERCOMMAND_FOOTER
Regards,
Chandu

Similar Messages

  • How to get sum for each currency's in ALV Report

    Hi,
    A column has amounts with various currency's.
    May I know how to get sum quantity for each currency in ALV Report?
    Thanks in advance.

    Hi,
    Currency value column should have reference to currency code column.
    Regards,
    Wojciech

  • How to get list of custom objects used in abap report program?

    Hi friends,
    I have a requirement in which I have to scan the entire abap report and retrieve list of custom objects used in it for example custom tables, data elements, structures, table types etc,. Is there any provision in SAP like fuction modules to do this functionality?  As of now I am coding everything manually where so many possibilities are there for all kinds of objects. Provide your answers and suggestions...
    Thanks,
    Nastera

    Hi,
    The best way to do this is environment analysis. Follow the steps:
    1. Open se38, type in the program name (don't click on on display/change or create button, stay on first screen only)
    2. Click on environment analysis button (hot key SHIFT+F4)
    3. It will throw a pop-up, which will ask for type of object you want to see, which are linked /used by this program. select all (or may be if you are only interested in Tables, then select table only)
    4. Hit 'Enter'
    You will get the full list of all objects used in this report program. Just note down the one which starts with Z or Y and that's it.
    Cheers,
    Anid

  • How to get PO header text in PO list

    Hi All,
    Please let me know how to get PO header text in PO list.
    Thanks,
    Ama

    Check this link for answer
    PO Header Text

  • How to get list of holidays in  year

    hi,
      how to get list of holidays for a calender year.
       if any body knows function modules please help me.
    thanks and regards
    sathish

    HOLIDAY_GET Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.
    HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the
    date is a holiday by checking the parameter HOLIDAY_FOUND.
    Example: HOLIDAY_CHECK_AND_GET_INFO
    data: ld_date like scal-datum default sy-datum,
    lc_holiday_cal_id like scal-hcalid default 'CA',
    ltab_holiday_attributes like thol occurs 0 with header line,
    lc_holiday_found like scal-indicator.
    CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
    EXPORTING
    date = ld_date
    holiday_calendar_id = lc_holiday_cal_id
    WITH_HOLIDAY_ATTRIBUTES = 'X'
    IMPORTING
    HOLIDAY_FOUND = lc_holiday_found
    tables
    holiday_attributes = ltab_holiday_attributes
    EXCEPTIONS
    CALENDAR_BUFFER_NOT_LOADABLE = 1
    DATE_AFTER_RANGE = 2
    DATE_BEFORE_RANGE = 3
    DATE_INVALID = 4
    HOLIDAY_CALENDAR_ID_MISSING = 5
    HOLIDAY_CALENDAR_NOT_FOUND = 6
    OTHERS = 7.
    if sy-subrc = 0 and
    lc_holiday_found = 'X'.
    write: / ld_date, 'is a holiday'.
    else.
    write: / ld_date, 'is not a holiday, or there was an error calling the function'.
    endif.

  • How to get list of software installed in a system

    How to get list of softwares installed in a system?. should i use registry to get information or control panel?
    is there any package available for this? how should i start with/
    thanks

    How to get list of softwares installed in a system?.Using native code, if at all.
    should i use registry to get information or control panel?Linux has neither.
    is there any package available for this? how should i start with/ Learn the Windows API or Google for some native tool.

  • How to get list of docs for particulat billing type on plant wise

    very urgent
    is there any t-code, report to look thi
    how to get list of billing docs grnerated  for particulat billing type and if possible  on plant wise also
    very urgetnt
    points to be rewarded
    eagerly waitng from sap gurus

    Dear chakri
    As you may be aware, in VF05 you need to enter either Payer Code or Material Code and then based on the selection criteria, the report will generate.  Please give the (ensure that this code is exist in billing document) Payer code and now select "Further sel.criteria" and DONT forget to enter the date in from column of "Billing docs.date".  By default, there you can see one month date range. 
    Still if you get error message, please let me know the error message.
    thanks
    G. Lakshmipathi

  • How to get list of drives present in local file system?

    Hi all,
    I want to show all drives and their contents using JTree.
    Does anybody know how to get list of drives present in local file system?

    Thank you!
    I have new question.
    I want to disply size and file type. Can you give ur suggestion in order to do that?
    I want to provide following using JTree
    + root <Dir> 50KB
    - file1 <txt> 10KB
    - file2 <bmp> 20KB
    + root2 <Dir> 200KB
    -file1 <jpeg> 50KB
    Is this possible?
    Plz reply..........
    bye

  • How to get list of tables used in packages

    Dear All
    Can you pls tell me how to get list of tables used in packages
    Regards

    select referenced_name
      from user_dependencies
    where name = 'your_package'
       and referenced_type = 'TABLE'Regards,
    Rob.

  • How to get list of file names from a directory?

    How to get list of file names from a directory?
    Please help

    In addition, this:
    String filename = files;Should be this:
    String filename = files;
    That's just because he didn't use the "code" tags, so [ i ] made everything following it become italicized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get column header text in IWDTable

    Hi
    Just want to know how to get column header name in IWDTable.
    I know that you can get it with
    IWDAbstractTableColumn[] groupedColumns = table.getGroupedColumns();
    for (int i = 0; i < groupedColumns.length; i++) {
         IWDAbstractTableColumn column = groupedColumns<i>;
         column.getHeader().getText();
    But what if text isnt set on header level but its rendered from cellEditor  model binding (im not sure if its like that).

    Finally after your suggestion i did it with this code
    String header = column.getHeader().getText();
                       if ((header == null || header.length() == 0) && column instanceof IWDTableColumn){
                            IWDTableCellEditor tableCellEditor = ((IWDTableColumn) column).getTableCellEditor();
                            if (tableCellEditor instanceof IWDTextView){
                                 String bindingPath = ((IWDTextView)tableCellEditor).bindingOfText();
                                  StringTokenizer tokenizer = new StringTokenizer(bindingPath,".");
                                  String token = "";
                                  IWDNodeInfo nodeInfo = context.getNodeInfo();
                                  while (tokenizer.hasMoreTokens()){
                                       token = tokenizer.nextToken();
                                       if (tokenizer.hasMoreTokens()){
                                            nodeInfo = nodeInfo.getChild(token);          
                                  IWDAttributeInfo attribute = nodeInfo.getAttribute(token);
                                  ISimpleType simpleType = attribute.getSimpleType();
                                  simpleType.getDescription();
                                 header = simpleType.getDescription();

  • How to get listed as a XMP partner?

    Hi there
    We have just released a major metadata/keywords update, to our Digital Asset Management solution, based on Adobes XMP format.
    Does anybody know how to get listed on the XMP partner page: http://www.adobe.com/products/xmp/partners.html
    Thanks,
    Jesper
    Filecamp.com

    Hi Frank
    Just wanted to make sure you got our company information:
    Your full company name
    Filecamp AG
    A company representative (name, title)
    Jesper Faurby, CEO, Filecamp AG
    About the partner
    Filecamp is a lightweight Digital Asset Management, Image Library, and Online Proofing solution. Filecamp provides a secure customer branded platform to organize, review, approve, and share digital assets. Subscribers are from all over the world - ranging from freelancers to large corporations, usually from within the creative/media industry.
    The value of XMP technology
    "Adobe's XMP technology enables Filecamp to read and write metadata for common file types. Our customers appreciate the embedded metadata which allows keywords and more, to "travel" along with the files across various products, vendors and platforms."
    Logo
    A 170x55 px version of the logo can be downloaded from here: https://files.filecamp.com/public/file/21xp-1cum8c4d
    Many thanks for your help. Please let me know if you have any questions.
    Ok?
    Best regards
    Jesper Faurby
    www.filecamp.com
    Media Asset Management, Image Library, Professional File Hosting & Online Proofing ... in one integrated, secure and cost-effective solution.

  • How to get List Item attachments name without write any custom code or any database query?

    Hi,
    How to get List Items attachments name without write any custom code or any database query?

    You can get it from Rest,
    There are 2 options,
    1) create a 'Result Source' which has a search query for that List which has attachments 
     - Use rest query to get the 'Filename' , it will have the attachment file name 
    For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be 
    http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
    You can refine the query, be giving proper 'querytext'
    2) Use the List rest api
    For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
    You can get he attachments for 1st item using this 
    http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How to get list of buttons count

    how to get list of buttons count in the oracle web page (similar to child objects concept in QTP for getting buttons count in a page)

    Hi Rakesh,
    I think you are looking for something like this:
    Using Powershell to list all users that had completed
    a password reset within the last 30 days
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • How to get list of modified repository objects in SPAU

    Hi,
    While applying Support pack for HR (SAP ERP 6.0) I get SPAU prompt with message:
    "The system detected that 10 of the repository objects in the Support Packages have been modified in
    your system . Check whether you want to retain or restore these changes you have made. Fore more
    info about performing modification adjustment see modification adjustment help..."
    Now as I call SPAU i get the screen with following options:
    Correction in SAP Note
    With modification Assistant
    Without  modification Assistant
    etc..
    Can someone guide me How to get list of modified repository objects in SPAU.
    Thanks & Regards
    Vishal

    Hi,
    In SPAU you will get with modification assistence. just expand the subtree, and follw standard process .
    This is to retain the enhancement. If there are any data dictionary related correction go to SPDD.
    Regards
    Rahul

Maybe you are looking for

  • Problem in my leptop

    It is a V6211 au model. When the A/C adapter is plugged in, the ring around the plug jack is lit and the icon for charging the battery is lit also. When I press the power button to start up the laptop, the rest of the icons light up in blue and the f

  • P67a-GD55 sound problem

    I noticed today that the left audio channel was noticably quieter than the right. I unplugged the audio cable from the audio port and plugged it back in and it fixed it. Does this sound like a hardware or software issue? P67a-GD55 i5-2500k 8GB Corsai

  • Palm TX Won't Keep User Account ID After Hard Reset

    I downloaded some malware and it froze my TX. I had to do a hard reset and when I went to resynch everything I got a dialog box that said that my handheld didn't have a user account ID and I got the choice of selecting an existing one or creating a n

  • Air Application won't work

    New to fireworks.  I'm trying to prototype an air application.  I have succussfully created it once, but my links were not created yet so I started again from the original psd file.  Now, no matter what I do it will not finish the creation.  I get re

  • N73 photo quality

    hello everyone. I have a question over the photo quality. though I have chosen the best image quality (3M), the average size of my photos is about 250kb- and their quality- especially of those shot in dark places with flash on- isn't as good as I exp