Multiple header in ALV list

hi abapers,
i got a requirement to disply material no.'s in descending order in lav grid/list both..
now, when i did sorting of the column, grid is displaying the output fine but in list HEADER IS GETTING PRINTED MULTIPLE TIMES, one for each new matnr [although it gets descendigly sorted],
below is my code of sorting, could you please expalin why is this happening,. ?? is this compatibiltiy issue ??
*&      Form  ZF_SORTING
      text
     -->P_I_SORTINFO  text
FORM zf_sorting USING p_i_sortinfo TYPE slis_t_sortinfo_alv.
  DATA l_sortinfo TYPE slis_sortinfo_alv.
  REFRESH p_i_sortinfo.
  CLEAR l_sortinfo.
*&-- passing attributes to sort the column
L_SORTINFO-SPOS = '1'.           " 1 sorting position
  l_sortinfo-fieldname = 'MATNR'.      "fieldname
  l_sortinfo-tabname = 'I_FINAL'.      "final table
  l_sortinfo-down = 'X'.          "enable
  l_sortinfo-group = ' * '.      "DONT REPEAT COMMON ITEM
  APPEND l_sortinfo TO p_i_sortinfo.
ENDFORM.                    " ZF_SORTING
*&      Form  zf_display_alv_list
      text
-->  p1        text
<--  p2        text
FORM zf_display_alv_list .
*&--calling FM to display LIST LAYOUT
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program       = v_progname
      I_CALLBACK_PF_STATUS_SET = 'ZF_PF_STATUS_SET'
      is_layout                = wa_layout
      it_fieldcat              = i_fieldcat
      I_DEFAULT                = 'X'
      it_events                = i_eventcat
      it_sort                  = i_sortinfo
      I_SAVE                   = C_SAVE        "all user/default
      IS_VARIANT               = IT_VARIANT1
    TABLES
      t_outtab                 = i_final
    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.                    " zf_display_alv_list
Please help,

Hi,
Did you find a solution for this?, I am also having a similar requirement.
If you have any work around please share.
Thanks.

Similar Messages

  • Multiple Heading in ALV Grid

    Hello ,
    I have a requirement to display Multiple heading in ALV Grid, I am using the Class 'cl_gui_alv_grid'. please let me know if you have Any suggestions.
    Ex:
    |                 Divison                     |     
    Sub D:1
    Sub D: 2
    Sub D: 3
        Like wise i have few more divisions to display and Under we need to display the Sub Division also .
    Thanks in Advance..  Waiting for your suggestions.
    With Best Regards
    Nags

    Hi,
    I had attempted to do it in the object oriented way, but found no ready solution, so I settled for the below solution.
    Please use the function REUSE_ALV_COMMENTARY_WRITE.
    This allows you to print multiple lines in the header.
    I had a requirement of showing 5 lines in the header.
    So i went on like:
    DATA: it_list_commentary TYPE slis_t_listheader,
               wa_list_commentary TYPE slis_listheader.
    wa_list_commentary-typ = 'H'.
    wa_list_commentary-info = <text>.
    APPEND wa_list_commentary TO it_list_commentary.
    wa_list_commentary-typ = 'S'.
    wa_list_commentary-info = <text>.
    APPEND wa_list_commentary TO it_list_commentary.
    I fed he internal table with all 5 lines like above.
    Finally I called the function.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_list_commentary.
    Regards,
    Prosenjit.
    Edited by: prosenjit chaudhuri on Jan 28, 2009 6:14 AM

  • Displaying a header on alv list

    hi there,
    i want to display a header on alv list.
    i have already used
    call method alvgrid->set_table_for_first_display
    regrads

    Hi,
    use the TOP_OF_PAGE event and add the event to the IT_EVENTS internal table..
    In the subroutine that is assigned to the event..
    FORM top_of_page.
            CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
              EXPORTING
                it_list_commentary = heading.
    ENDFORM.
    Thanks,
    Naren

  • Couldn't print header of ALV list

    Hi All,
    I couldn't print header for the alv list. Code is below.
    REPORT ztest123456 .
    TYPE-POOLS: slis.
    DATA: wa_fieldcat TYPE slis_fieldcat_alv,
          g_t_tfieldcat TYPE slis_t_fieldcat_alv,
          itab1 TYPE STANDARD TABLE OF cdhdr,
          g_t_event TYPE slis_t_event,
          wa_event TYPE slis_alv_event,
          g_pos TYPE i VALUE 1,
          head TYPE slis_t_listheader,
          wa_head TYPE slis_listheader.
    START-OF-SELECTION.
      SELECT * FROM cdhdr INTO TABLE itab1
      WHERE objectclas = 'COND_A'
        AND tcode = 'VK12'.
      SORT itab1 BY objectclas.
      wa_head-typ  = 'H'.
      wa_head-info = 'Records in cdhdr table'.
      APPEND wa_head TO head.
      PERFORM sub_fldctlg USING: 'OBJECTCLAS' 'ITAB1' 13 'Object class'.
          FORM sub_fldctlg                                              *
    FORM sub_fldctlg USING u_fname TYPE slis_fieldcat_alv-fieldname
                           u_tname TYPE slis_fieldcat_alv-tabname
                           u_outlen TYPE slis_fieldcat_alv-outputlen
                           u_seltext TYPE slis_fieldcat_alv-seltext_l.
      CLEAR wa_fieldcat.
      wa_fieldcat-col_pos = g_pos.          "Column Position
      wa_fieldcat-fieldname = u_fname.      "Field Name
      wa_fieldcat-tabname = u_tname.        "Table Name
      wa_fieldcat-outputlen = u_outlen.     "Output column Length
      wa_fieldcat-seltext_l = u_seltext.    "Column Header
      g_pos = g_pos + 1.                    "Incrementing column position
      APPEND wa_fieldcat TO g_t_tfieldcat.    "Appending field Catalog
    ENDFORM.
    *&      Form  sub_top
    FORM sub_top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = head.
    ENDFORM.                    " sub_top
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           IMPORTING
                et_events = g_t_event.
      READ TABLE g_t_event INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'SUB_TOP'.
        MODIFY g_t_event FROM wa_event INDEX sy-tabix.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program             = sy-repid
         it_fieldcat                    = g_t_tfieldcat
         it_events                      = g_t_event
        TABLES
          t_outtab                       = itab1.
    Thanks in advance.

    Hi,
    The issue is resolved. I just pass the program name (SY-REPID) through a variable to the function module that displays list/grid. I came to know that these system variable behavior is UN-predictable in SAP and hence passed program name through a global variable instead of using a system variable value.
    Thanks..

  • How to Change Column header in ALV List

    hello,
    is there a way to change the column header/label of an ALV list other than inheriting it from the source table it is bound to?
    thanks,
    sid

    Yes, you can.  If you are using a field catalog, you can change the field labels in your program.
    For example.
      data: fc_tmp type slis_fieldcat_alv .
      clear: fieldcat. refresh: fieldcat.
      clear: fc_tmp.
    <b>  fc_tmp-reptext_ddic    = 'Material Number'.</b>
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
    If you are using the MERGE funciton module to get your field catalog, then you just need to loop thru it and change the field which is holding the description, then modify the line of the field catalog.
    REgards,
    Rich Heilman

  • How To Create Header in ALV List Report

    Hi All,
    I want to create a Header for <b>MY ALV List Report</b>!
    How can i achieve the same. It should come above <b>ALV</b>.
    ALV report i had already written and it is coming correctly.
    Heading should look like this:
    <i>1st Line</i>
    <b>PROGRAM NAME: XXXXXX      CLIENT: XXXXXXXXXX   PAGE:XX</b>
    <i>2nd Line</i>
    <b>RUN DATE/TIME: XXXXX - XXXX     REPORT NAME/HEADER</b>
    How can i acheive the same in <b>ALV List Report</b>!
    I am amking use of <b>REUSE_ALV_LIST_DISPLAY</b> Function module.
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    Hi Prasad,
    Use the sample code specified below as the guideline. For more info. refer to the documentation of the FM 'REUSE_ALV_COMMENTARY_WRITE'.
    DATA: first(01) type c,
    events type slis_t_event,
    gt_list_top_of_page type slis_t_listheader,
    ls_event type slis_alv_event.
    initialization.
    call function 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = events
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2.
    read table events with key name = 'TOP_OF_PAGE'
    into ls_event.
    if sy-subrc = 0.
    move: 'TOP_OF_PAGE' to ls_event-form.
    append ls_event to events.
    clear ls_event.
    endif.
    End of additions
    Start-of-selection
    START-OF-SELECTION.
    Top-of-page
    TOP-OF-PAGE.
    PERFORM TOP_OF_PAGE.
    FORM TOP_OF_PAGE .
    data: ls_line type slis_listheader.
    if first is initial.
    ls_line-typ = 'S'.
    ls_line-key = 'Run Date :'.
    write: sy-datum to ls_line-key+10 mm/dd/yyyy.
    ls_line-info = 'Billing Date:'.
    write: s_fkdat-low to ls_line-info+15 mm/dd/yyyy.
    ls_line-info+28 = 'To'.
    write s_fkdat-high to ls_line-info+32 mm/dd/yyyy.
    append ls_line to gt_list_top_of_page.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = gt_list_top_of_page.
    first = 'N'.
    else.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = gt_list_top_of_page.
    endif.
    ENDFORM. " top_of_page
    <b>Please mark helpful answer.</b>
    Regards,
    Amit Mishra

  • Long header in ALV list

    Hi,
    how to add a long header line ( more than 60 characters ) to an ALV list, please ?
    I tried with filling a table with structure SLIS_T_LISTHEADER, but this only allows lines up to 60 characters...
    thanks,
    Rolf

    Unless you can break it into 2 lines, you're pretty much stuck with the 60 char line.
    I seem to remember we tried doing this using the HTML option for the header, but we found that it was inconsistent and
    not to our liking.  We reverted to 2 lines.

  • Handling Multiple checkboxes iin ALV list??

    Hi,
    I have a requirement of generating a list with multiple checkboxes corresponding to each line/row of the list..Based on the selection of some/all the rows of the list I have to invoke some functionality on the click of some button..
    I am able to get the chk-boxes on the list also i have got the button on the std PF-status of ALV list, but I am not able to handle multiple selection of the chk-boxes??
    plz help..

    On the field catalog definition for the amount field pass CFIELDNAME as the <currency> fieldname. if this is maintained, i would assume it will solve your issue.
    Say for example, the amount field is AMOUNT and the corresponding currency fieldname is 'CURRENCY', the field catalog for this field should be filled in something like this.
    t_fieldcat-fieldname = 'AMOUNT'.         "amount field name
    t_fieldcat-tabname = 'IT_FINAL'.           "internal table name
    t_fieldcat-cfieldname = 'CURRENCY'.   "currency field name which will be referred
    append t_fieldcat.
    Hope this helps.
    Thanks,
    Balaji

  • Select multiple lines in ALV list

    Hi Everyone,
    I have an ALV list which has checkboxes. Now when we select the check boxes and press enter it should  take me back into the program with only those lines in an internal table for which the checkboxes have been clicked. Is this possible.
    Any input is greatly appreciated.
    Thanks
    Kumar.

    yes... perhaps it is in how you are processing it. i am NOT using hotspots. i created a GUI status with a icon, and assigned it to a specific OK_CODE. then, when you display the ALV,
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_grid_title             = w_alv_title
          is_layout                = t_alvlayout
          it_fieldcat              = t_alvfieldcat
          it_events                = t_alveventcat
          it_sort                  = t_alvsortcat
          i_save                   = i_save
          is_variant               = default_layout
          i_default                = 'X'  " Allow Display Variants
          i_callback_program       = w_alv_callback_prog
          i_callback_user_command  = w_alv_command_handler
          i_callback_pf_status_set = w_alv_gui_status_setter
          i_callback_top_of_page   = 'STANDARD_LIST_HEADING'
        tables
          t_outtab                 = t_alvdata
        exceptions
          program_error            = 1
          others                   = 2.
    you specify a command handler callback, with the callback program and form
      w_alv_command_handler = 'ALV_COMMAND_HANDLER'.
      w_alv_callback_prog = sy-repid.
    then the handler would do something like this
    form alv_command_handler using r_ucomm like sy-ucomm
                               rs_selfield type slis_selfield.
      read table alvdata into alvline index rs_selfield-tabindex.
      case r_ucomm.
        when 'DELETE'.
    * make sure at least one line was selected
          read table alvdata into alvline with key select = true.
          if sy-subrc <> 0.
            message i014.
          else.
            call function 'POPUP_TO_CONFIRM'
              exporting
                titlebar              = 'Delete Confirmation'
                text_question         = 'Are you sure?'
                text_button_1         = 'Yes'
                text_button_2         = 'No'
                default_button        = '2'
                display_cancel_button = ' '
              importing
                answer                = answer
              exceptions
                text_not_found        = 1
                others                = 2.
            if sy-subrc = 0 and answer = '1'.
              loop at alvdata into alvline where select = true.
                perform delete_a_message.
              endloop.
    * refresh the list data
              perform load_alvdata.
              rs_selfield-refresh = true.
            endif.
          endif.
        endif.
    * process hotspots
        when '&IC1'.
          case rs_selfield-fieldname.
            when 'FILENAME'.
              submit ylo_newbreed_message_edit
                with p_file = alvline-filename
                with p_change = ' '
                 and return.
            when 'LASTSTS'.
              perform display_messages.
          endcase.
      endcase.
    endform.                    "alv_command_handler
    i cut a lot fo code out of this, so it may be missing some endif or whatever, but as you can see, you check the ok code, and if it matches your GUIstatus button, you loop over the internal table and process the data
    sorry for the long reply. i hope it helps

  • Icon in Header of ALV list

    Hello friends,
    I want to display icon in ALV header list.
    Caould you please tell me how can i achieve this.
    Currently instead of icon it is showing as '@5B@'.
    CREATE OBJECT document.
    CALL METHOD document->add_icon
    EXPORTING
    sap_icon = 'ICON_LED_GREEN'.
    ls_header-typ  = 'S'.
    write ICON_LED_GREEN AS ICON TO text_001.
    CONCATENATE 'Aufnr:'
                               p_aufnr
                              text_001
                  INTO ls_header-info.
      APPEND ls_header TO lt_header.
      CLEAR: ls_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         it_list_commentary       =  lt_header
        I_LOGO                   =
        I_END_OF_LIST_GRID       =
        I_ALV_FORM               =

    Hi,
    Check this
    w_events-name = 'TOP_OF_PAGE'.
      w_events-form = 'TOP_OF_PAGE'.
      APPEND w_events TO i_events.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          it_fieldcat        = i_fieldcat
          it_events          = i_events
        TABLES
          t_outtab           = it_data.
    FORM top_of_page.
      WRITE:/ '@08@',"  Green light; positive
              '@09@',"  Yellow light; neutral
              '@0A@'."  Red light; negative
    ENDFORM.                    "top_of_page

  • Multiple Header in ALV

    Hello everybody,
    i am working on a report programme in which req. is to print header everytime set of 3 fields changes and also if record overflows.
    1. if record overflows : header is same as in previous page
    2. if new set of field occurs : new header should be printed.
    Can someone please suggest me how to do this using ALV report.
    Details : I have to do subtotaling with a particular set of field 4 times. 2 times on the same field which i am doing it manually and creating an internal table which conatins all the information.
    Regards,
    Abhishek Gupta

    Hello everybody,
    i am working on a report programme in which req. is to print header everytime set of 3 fields changes and also if record overflows.
    1. if record overflows : header is same as in previous page
    2. if new set of field occurs : new header should be printed.
    Can someone please suggest me how to do this using ALV report.
    Details : I have to do subtotaling with a particular set of field 4 times. 2 times on the same field which i am doing it manually and creating an internal table which conatins all the information.
    Regards,
    Abhishek Gupta

  • ALV with multiple header & dynamic columns

    Hello All,
    I have a requirement where in I need to print multiple header in alv.
    For eg.
    User Name : <Name_1>
    Channel     : <Channel_1>
    Sale Org    : <Sales Org_1>
    Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8
    User Name : <Name_2>
    Channel     : <Channel_2>
    Sale Org    : <Sales Org_2>
    Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8
    no of columns (Col1 , col2 )  are dynamic  . Which would be the best alv type do I need do use?  Is it possible using simple alv grid display. How to handle dynamic column.
    Thnx.

    it is not possible with normal grid or list.
    I guess it is possible by using ALV Block list
    Modified below program to get mutiple header
    REPORT z_alv_block_list.
    Type-pools
    TYPE-POOLS: slis.
    Data declarations.
    DATA: BEGIN OF t_vbak OCCURS 0,
            vbeln TYPE vbeln,
            bstnk TYPE vbak-bstnk,
            erdat TYPE vbak-erdat,
            kunnr TYPE vbak-kunnr,
          END OF t_vbak.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln  TYPE vbeln,
            matnr  TYPE vbap-matnr,
            netpr  TYPE vbap-netpr,
            waerk  TYPE vbap-waerk,
            kwmeng TYPE vbap-kwmeng,
            meins  TYPE vbap-meins,
          END OF t_vbap.
    DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
    DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
    DATA: v_repid         TYPE syrepid.
    DATA: s_layout        TYPE slis_layout_alv.
    DATA: v_tabname       TYPE slis_tabname.
    DATA: t_events        TYPE slis_t_event.
    start-of-selection event.
    START-OF-SELECTION.
      v_repid = sy-repid.
    Get the fieldcatalog for the first block
      PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.
    Get the fieldcatalog for the second block
      PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.
    Get the data for the first block
      SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
             INTO TABLE t_vbak
             FROM vbak WHERE vbeln > '0060000100'.
    Get the data for the second block
      SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10
    ROWS
             INTO TABLE t_vbap
             FROM vbap WHERE vbeln > '0060000100'.
    init
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
           EXPORTING
                i_callback_program = v_repid.
    First block
      v_tabname = 'ITAB1'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout   = s_layout
                it_fieldcat = t_fieldcatalog1
                i_tabname   = v_tabname
                it_events   = t_events
           TABLES
                t_outtab    = t_vbak.
    Second block
      v_tabname = 'ITAB2'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout   = s_layout
                it_fieldcat = t_fieldcatalog2
                i_tabname   = v_tabname
                it_events   = t_events
           TABLES
                t_outtab    = t_vbap.
    *Display
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
          FORM GET_FIELDCAT1                           
          Get the field catalog for the first block    
    FORM get_fieldcat1 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
      DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
      s_fieldcatalog-col_pos       = '1'.
      s_fieldcatalog-fieldname     = 'VBELN'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'VBELN'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Customer purchase order.
      s_fieldcatalog-col_pos       = '2'.
      s_fieldcatalog-fieldname     = 'BSTNK'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'BSTNK'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Creation date.
      s_fieldcatalog-col_pos       = '3'.
      s_fieldcatalog-fieldname     = 'ERDAT'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'ERDAT'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Customer
      s_fieldcatalog-col_pos       = '4'.
      s_fieldcatalog-fieldname     = 'KUNNR'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'KUNNR'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    ENDFORM.
          FORM GET_FIELDCAT2                           
          Get the field catalog for the second block   
    FORM get_fieldcat2 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
      DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
      s_fieldcatalog-col_pos       = '1'.
      s_fieldcatalog-fieldname     = 'VBELN'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'VBELN'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Material number
      s_fieldcatalog-col_pos       = '2'.
      s_fieldcatalog-fieldname     = 'MATNR'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'MATNR'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Net price
      s_fieldcatalog-col_pos       = '3'.
      s_fieldcatalog-fieldname     = 'NETPR'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'NETPR'.
      s_fieldcatalog-cfieldname    = 'WAERK'.
      s_fieldcatalog-ctabname      = 'T_VBAP'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Currency.
      s_fieldcatalog-col_pos       = '4'.
      s_fieldcatalog-fieldname     = 'WAERK'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'WAERK'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Quantity
      s_fieldcatalog-col_pos       = '5'.
      s_fieldcatalog-fieldname     = 'KWMENG'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'KWMENG'.
      s_fieldcatalog-qfieldname    = 'MEINS'.
      s_fieldcatalog-qtabname      = 'T_VBAP'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    UOM
      s_fieldcatalog-col_pos       = '6'.
      s_fieldcatalog-fieldname     = 'MEINS'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'MEINS'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    ENDFORM.

  • 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

  • Header in every page of ALV List

    Hi All,
    I am working in ALV list now the requirement is that i have to fetch the data based on inputs given when the report executed. and the values which i gave in the input is printed as header of ALV list.
    I have done everything except that when i am printing the Header it is coming only on the first page but we want it in every page the list spreads. please help me ASAP.
    Regards,
    hrk

    Hi,
    As my knowledge, It can not do the thing you told (you can do this thing with Smartforms). but you can separate your report with a condition to break page. Here an example that you can break page with condition when company code changes or GL account changes.
    firstly, build a sort table:
    FORM sort_build CHANGING pt_sort TYPE slis_t_sortinfo_alv.
    *-- company code
      gs_sort-spos      = 1.
      gs_sort-fieldname = 'BUKRS'.
      gs_sort-tabname   = 'GT_FKONT'.
      gs_sort-up        = 'X'.
      gs_sort-group     = '*'.
      gs_sort-subtot    = 'X'.
      APPEND gs_sort TO gt_sort.
    *-- Account
      gs_sort-spos      = 2.
      gs_sort-fieldname = 'SAKNR'.
      gs_sort-tabname   = 'GT_FKONT'.
      gs_sort-up        = 'X'.
      gs_sort-group     = '*'.
      gs_sort-subtot    = 'X'.
      APPEND gs_sort TO gt_sort.
    ENDFORM.     
    and attach the sorted table to FM:
    FORM alv_list_display TABLES pt_itab
                          USING  pv_pf_status_set
                                 pv_user_command.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = gv_repid
          i_callback_user_command  = pv_user_command
          i_callback_pf_status_set = pv_pf_status_set
          is_layout                = gs_layout
          i_save                   = gv_save
          it_excluding             = gt_excluding[]
          is_variant               = gs_variant
          it_events                = gt_events[]
          it_event_exit            = gt_event_exit[]
          it_fieldcat              = gt_fieldcat[]
          *it_sort                  = gt_sort[]*   "sort table
        IMPORTING
          e_exit_caused_by_caller  = gv_exit_caused_by_caller
          es_exit_caused_by_user   = gt_exit_caused_by_user
        TABLES
          t_outtab                 = pt_itab.
    ENDFORM.
    regards,
    Thien
    Edited by: Thien Pham on Dec 1, 2009 2:48

  • Changing the status of heading in ALV

    HI Gurus,
    I am creating a ALV report program. When I execute the statements (with select options and parameters only)
    I get the output selection screen. But the header comes as the report program name like ZRR_ALV_LIST..
    But I need to change this to some other text of my choice.
    Please help me on this.
    Thanks & Regards,
    Gopinath GS.
    Edited by: Gopigs on May 20, 2011 8:35 AM
    Moderator Message: Basic Question.
    Edited by: kishan P on May 20, 2011 12:31 PM

    This is the simple code that I have done.
    REPORT  zrr_alv_list NO STANDARD PAGE HEADING.
    TABLES:anla.
    TYPE-POOLS: slis.
    SELECTION-SCREEN BEGIN OF BLOCK b100 WITH FRAME TITLE text-bl0.
    SELECT-OPTIONS: s_bukrs FOR anla-bukrs,
                    s_anln1 FOR anla-anln1,
                    s_anln2 for anla-anln2.
      PARAMETERS: p_date LIKE anla-erdat.
    SELECTION-SCREEN END OF BLOCK b100.
    When I execute I get the selection screen. But the header of the selection screen gives the report program name 'zrr_alv_list'.
    Instead i need to put up the header as 'ALV LIST DISPLAY'.
    Also one more query I got just now.
    How can I get the current fiscal year end date and default it to the Parameters field p_date??
    Gs.
    Edited by: Gopigs on May 20, 2011 9:00 AM

Maybe you are looking for

  • Questions on Slideshows in & from Lightroom 4

    As a Mac user that is relatively new to LR, I need a bit of guideance. I am accustomed to creating slideshows in iMovie. However, this is the first time that I have used LR to process my images for export to iMovie. Without going into detail, the RAW

  • InDesign 2014 CC crashes every time I try to export to pdf

    This started happening after I updated to OSX Yosemite. When I try to export a pdf (just a 4 page file, not even any images) InDesign crashes. The Problem report says : Application Specific Information: *** Terminating app due to uncaught exception '

  • Please help, simple requirement using Layers, there must be a solution?!

    Hi, I am using a trial version of Adobe Acrobat X Pro, with a view to purchasing the program for several members of my staff. However, it does not seem to be able to do something fairly simple which I need.. unless someone can help please! I work wit

  • OS X Mountain Lion will not download

    I'm trying to download OS X Mountian Lion update and it will not download on my Mac Book Pro. I've purchased it and it says it's "downloading" although in about and hour the download progress bar has not moved. I've tried restarting the computer, pau

  • Rotate 3D interfering with state reset?  *help*

    I have several shapes (in photoshop) that transition between states... size, location, opacity, etc. One of the shapes has a manually applied action "Rotate 3D" on the transition from State 1 -> State 2. I have 2 buttons.  A "Next Button" that moves