ALV tree display

Hi,
I have to make a list with three hierarchical levels.
By the 2nd level I know how.
My dout is how to add the 3rd hierarchical level?
The code i use is:
FORM create_alvtree_hierarchy .
  DATA: ld_ebeln_key TYPE lvc_nkey,
        ld_ebelp_key TYPE lvc_nkey,
        ld_zekkn_key type lvc_nkey.
  LOOP AT it_ekko INTO wa_ekko.
    PERFORM add_ekko_node USING      wa_ekko
                            CHANGING ld_ebeln_key.
    LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln EQ wa_ekko-ebeln.
      PERFORM add_ekpo_line USING      wa_ekpo
                                       ld_ebeln_key
                              CHANGING ld_ebelp_key.
     LOOP AT it_ekbe INTO wa_ekbe WHERE ebeln EQ wa_ekpo-ebeln
                                    AND ebelp EQ wa_ekpo-ebelp.
       PERFORM add_ekbe_line USING      wa_ekbe
                                        ld_ebelp_key
                               CHANGING ld_zekkn_key.
     ENDLOOP.
    ENDLOOP.
  ENDLOOP.
FORM add_ekko_node USING    ps_ekko LIKE wa_ekko
                                               value(p_relate_key)
                                  CHANGING p_node_key.
  DATA: ld_node_text TYPE lvc_value.
Set item-layout
  DATA: lt_item_layout TYPE lvc_t_layi,
        ls_item_layout TYPE lvc_s_layi.
  ls_item_layout-t_image   = '@3P@'.
  ls_item_layout-fieldname = gd_tree->c_hierarchy_column_name.
  ls_item_layout-style     = cl_gui_column_tree=>style_default.
  ld_node_text             = ps_ekko-ebeln.
  APPEND ls_item_layout TO lt_item_layout.
Add node
  CALL METHOD gd_tree->add_node
    EXPORTING
      i_relat_node_key = p_relate_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      i_node_text      = ld_node_text
      is_outtab_line   = ps_ekko
      it_item_layout   = lt_item_layout
    IMPORTING
      e_new_node_key   = p_node_key.
ENDFORM.                    " ADD_EKKO_NODE
FORM add_ekpo_line USING    ps_ekpo LIKE wa_ekpo
                                              value(p_relate_key)
                                CHANGING p_node_key.
  DATA: ld_node_text TYPE lvc_value.
Set item-layout
  DATA: lt_item_layout TYPE lvc_t_layi,
        ls_item_layout TYPE lvc_s_layi.
  ls_item_layout-t_image   = '@3P@'.
  ls_item_layout-fieldname = gd_tree->c_hierarchy_column_name.
  ls_item_layout-style     = cl_gui_column_tree=>style_default.
  ld_node_text             = ps_ekpo-ebelp.
  APPEND ls_item_layout TO lt_item_layout.
Add node
  CALL METHOD gd_tree->add_node
    EXPORTING
      i_relat_node_key = p_relate_key
      i_relationship   = cl_gui_column_tree=>relat_last_child
      i_node_text      = ld_node_text
      is_outtab_line   = ps_ekpo
      it_item_layout   = lt_item_layout
    IMPORTING
      e_new_node_key   = p_node_key.
ENDFORM.                    " ADD_EKPO_LINE
Thanks in advance.
Rui

HI!
  TRY THIS CODE
TYPE-POOLS : fibs,stree.
TYPE-POOLS:slis.
DATA : t_node TYPE snodetext.
DATA : it_node LIKE TABLE OF t_node,
       wa_node LIKE t_node.
DATA: t_fieldcat    TYPE slis_t_fieldcat_alv,
      fs_fieldcat   TYPE slis_fieldcat_alv.
DATA:w_repid LIKE sy-repid.
*Internal Table declarations
DATA: BEGIN OF fs_scarr,
        carrid LIKE scarr-carrid,
      END OF fs_scarr.
DATA:BEGIN OF fs_spfli,
      carrid LIKE spfli-carrid,
      connid LIKE spfli-connid,
     END OF fs_spfli.
DATA:BEGIN OF fs_sflight,
      carrid LIKE sflight-carrid,
      connid LIKE sflight-connid,
      fldate LIKE sflight-fldate,
     END OF fs_sflight.
DATA:BEGIN OF fs_sbook,
      carrid LIKE sbook-carrid,
      connid LIKE sbook-connid,
      fldate LIKE sbook-fldate,
      bookid LIKE sbook-bookid,
     END OF fs_sbook.
DATA:
     t_scarr LIKE
             TABLE
                OF fs_scarr,
     t_spfli LIKE
             TABLE
                OF fs_spfli,
     t_sflight LIKE
               TABLE
                  OF fs_sflight,
     t_sbook LIKE
             TABLE
                OF fs_sbook.
START-OF-SELECTION.
  PERFORM get_data.
  PERFORM build_tree.
  PERFORM display_tree.
*&      Form  GET_DATA
*       text
*  -->  p1        text
*  <--  p2        text
FORM get_data .
  SELECT carrid
    FROM scarr
    INTO TABLE t_scarr.
  SELECT carrid
         connid
   FROM  spfli
   INTO TABLE t_spfli
   FOR ALL ENTRIES IN t_scarr
   WHERE carrid EQ t_scarr-carrid.
SELECT CARRID
        CONNID
        FLDATE
FROM   SFLIGHT
INTO CORRESPONDING FIELDS OF TABLE T_SFLIGHT
FOR ALL ENTRIES IN T_SPFLI
WHERE  CONNID EQ T_SPFLI-CONNID.
ENDFORM.                    " GET_DATA
*&      Form  BUILD_TREE
*       text
*  -->  p1        text
*  <--  p2        text
FORM build_tree .
  CLEAR: it_node,
        wa_node.
  SORT: t_scarr BY carrid,
        t_spfli BY carrid connid,
        t_sflight BY carrid connid fldate,
        t_sbook BY carrid connid fldate bookid.
  wa_node-type = 'T'.
  wa_node-name = 'Flight Details'.
  wa_node-tlevel = '01'.
  wa_node-nlength = '15'.
  wa_node-color = '4'.
  wa_node-text = 'Flight'.
  wa_node-tlength ='20'.
  wa_node-tcolor = 3.
  APPEND wa_node TO it_node.
  CLEAR wa_node.
  LOOP AT t_scarr INTO fs_scarr.
    wa_node-type = 'C'.
    wa_node-name = 'CARRID'.
    wa_node-tlevel = '02'.
    wa_node-nlength = '8'.
    wa_node-color = '1'.
    wa_node-text = fs_scarr-carrid.
    wa_node-tlength ='20'.
    wa_node-tcolor = 4.
    APPEND wa_node TO it_node.
    LOOP AT t_spfli INTO fs_spfli WHERE carrid EQ fs_scarr-carrid.
      wa_node-type = 'C'.
      wa_node-name = 'CONNID'.
      wa_node-tlevel = '03'.
      wa_node-nlength = '8'.
      wa_node-color = '1'.
      wa_node-text = fs_spfli-connid.
      wa_node-tlength ='20'.
      wa_node-tcolor = 4.
      APPEND wa_node TO it_node.
    ENDLOOP.
   LOOP AT t_sflight INTO fs_sflight WHERE  connid eq fs_spfli-connid.
      wa_node-type = 'C'.
      wa_node-name = 'FLDATE'.
      wa_node-tlevel = '04'.
      wa_node-nlength = '8'.
      wa_node-color = '1'.
      wa_node-text = fs_sflight-FLDATE.
      wa_node-tlength ='20'.
      wa_node-tcolor = 4.
      APPEND wa_node TO it_node.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    " BUILD_TREE
*&      Form  DISPLAY_TREE
*       text
*  -->  p1        text
*  <--  p2        text
FORM display_tree .
  CALL FUNCTION 'RS_TREE_CONSTRUCT'
* EXPORTING
*   INSERT_ID                = '000000'
*   RELATIONSHIP             = ' '
*   LOG                      =
    TABLES
      nodetab                  = it_node
   EXCEPTIONS
     tree_failure             = 1
     id_not_found             = 2
     wrong_relationship       = 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.
  w_repid = sy-repid.
  CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
   EXPORTING
     callback_program                = w_repid
*     callback_user_command           = 'USER_COMMAND'
*   CALLBACK_TEXT_DISPLAY           =
*   CALLBACK_MOREINFO_DISPLAY       =
*   CALLBACK_COLOR_DISPLAY          =
*   CALLBACK_TOP_OF_PAGE            =
*     callback_gui_status             = 'SET_PF'
*   CALLBACK_CONTEXT_MENU           =
*   STATUS                          = 'IMPLICIT'
*   CHECK_DUPLICATE_NAME            = '1'
*   COLOR_OF_NODE                   = '4'
*   COLOR_OF_MARK                   = '3'
*   COLOR_OF_LINK                   = '1'
*   COLOR_OF_MATCH                  = '5'
*   LOWER_CASE_SENSITIVE            = ' '
*   MODIFICATION_LOG                = ' '
*   NODE_LENGTH                     = 30
*   TEXT_LENGTH                     = 75
*   TEXT_LENGTH1                    = 0
*   TEXT_LENGTH2                    = 0
*   RETURN_MARKED_SUBTREE           = ' '
*   SCREEN_START_COLUMN             = 0
*   SCREEN_START_LINE               = 0
*   SCREEN_END_COLUMN               = 0
*   SCREEN_END_LINE                 = 0
*   SUPPRESS_NODE_OUTPUT            = ' '
*   LAYOUT_MODE                     = ' '
*   USE_CONTROL                     = STREE_USE_LIST
* IMPORTING
*   F15                             =
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
*    I_INTERFACE_CHECK              = ' '
*    I_BYPASSING_BUFFER             =
*    I_BUFFER_ACTIVE                = ' '
    I_CALLBACK_PROGRAM             = W_REPID
    I_CALLBACK_PF_STATUS_SET       = 'SET_PF'
    I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
*    I_STRUCTURE_NAME               =
*    IS_LAYOUT                      =
*    IT_FIELDCAT                    =
*    IT_EXCLUDING                   =
*    IT_SPECIAL_GROUPS              =
*    IT_SORT                        =
*    IT_FILTER                      =
*    IS_SEL_HIDE                    =
*    I_DEFAULT                      = 'X'
*    I_SAVE                         = ' '
*    IS_VARIANT                     =
*    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
*    IR_SALV_LIST_ADAPTER           =
*    IT_EXCEPT_QINFO                =
*    I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
*  IMPORTING
*    E_EXIT_CAUSED_BY_CALLER        =
*    ES_EXIT_CAUSED_BY_USER         =
   TABLES
     t_outtab                       = T_SFLIGHT
  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_TREE

Similar Messages

  • Editable Field in ALV TREE Display Using OOPs

    Hi,
    I am trying to make a field editable on the ALV Tree display. I could create an editable check box. But could not make a field Editable. I have made EDIT = 'X' in the fieldcatalog for the particular field. but  it is not working.
    Please help me in solving this. Its very urgent.

    You do this with the following code example
      DATA: ls_layout TYPE lvc_s_layi.
      CLEAR ls_layout.
      ls_layout-class     = cl_item_tree_control=>item_class_text.
      ls_layout-editable   = 'X'.
      ls_layout-fieldname = your fieldname.
      APPEND ls_layout TO lt_layout.
    add PO header to tree
          CALL METHOD tree->add_node
            EXPORTING
              i_relat_node_key = space
              i_relationship   = cl_gui_column_tree=>relat_last_child
              i_node_text      = l_node_text
              is_outtab_line   = ls_po_item
              is_node_layout   = wa_layout_node
              it_item_layout   = lt_layout
    Roy

  • Double click in ALV tree display....

    Hi all,
    I am able to display output in tree format. But I want to add the double click functionality to some of the fields in output. Means if I double click on some value in output tree, it should call some transaction. Please help me with this issue of double clicking.
    My code as of now is as below:
    Please tell how to handle events in this report tree display and how and where to write the code for this functionlity of double click.
    FORM alv_tree.
    PERFORM build_sort_table.  “----
    table is sorted
    create container for alv-tree
      DATA: l_tree_container_name(30) TYPE c,
            l_custom_container TYPE REF TO cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
      CREATE OBJECT l_custom_container
          EXPORTING
                container_name = l_tree_container_name
          EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
    create tree control
      CREATE OBJECT tree1
        EXPORTING
            i_parent              = l_custom_container
            i_node_selection_mode =
                                  cl_gui_column_tree=>node_sel_mode_multiple
            i_item_selection      = 'X'
            i_no_html_header      = ''
            i_no_toolbar          = ''
        EXCEPTIONS
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
    create info-table for html-header
      DATA: lt_list_commentary TYPE slis_t_listheader.
      PERFORM build_comment USING
                     lt_list_commentary. “----
    already created
    repid for saving variants
      DATA: ls_variant TYPE disvariant.
      ls_variant-report = sy-repid.
    register events
      PERFORM register_events.
    create hierarchy
      CALL METHOD tree1->set_table_for_first_display
              EXPORTING
                   it_list_commentary   = lt_list_commentary
                   i_background_id      = 'ALV_BACKGROUND'
                   i_save               = 'A'
                   is_variant            = ls_variant
              CHANGING
                   it_sort              = gt_sort[]
                   it_outtab            = itab_outtab
                   it_fieldcatalog      = t_fieldcat. "gt_fieldcatalog.
    expand first level
      CALL METHOD tree1->expand_tree
             EXPORTING
                 i_level = 1.
    optimize column-width
      CALL METHOD tree1->column_optimize
               EXPORTING
                   i_start_column = tree1->c_hierarchy_column_name
                   i_end_column   = tree1->c_hierarchy_column_name.
    ENDFORM.                    " alv_tree
    FORM register_events.
    define the events which will be passed to the backend
      data: lt_events type cntl_simple_events,
            l_event type cntl_simple_event.
    define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      append l_event to lt_events.
      call method tree1->set_registered_events
        exporting
          events = lt_events
        exceptions
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
    ENDFORM.                    " register_events

    hi
    (also check u have refresh the field)
    Check the demo program,In this double click the data fields it will display some field in screen,You can check it
    BCALV_GRID_DND_TREE
    Thanks
    Edited by: dharma raj on Jun 17, 2009 7:41 PM

  • Call Transaction in ALV Tree Display on Double Click

    Hi Experts,
    How can i call any Transaction on Double clicking  a field in ALV Tree?
    I'm able to call the transaction when Double clicked a field but it is not reading the value of the field on which i double click. It calls the transaction skipping the first screen with always the same value of the field.
          E.g : Whether i click on Purchase order no.  450000010 or 450000003 it displays the purchase order 4500000010 after it goes to ME23N transaction skipping the first screen.
            I am Trying Method ITEM_DOUBLE_CLICK of Class CL_GUI_COLUMN_TREE
    by passing the parameter NODE_KEY.But it's not working.
    Thanks & Regards,
    Vinit Ranjan

    hi
    (also check u have refresh the field)
    Check the demo program,In this double click the data fields it will display some field in screen,You can check it
    BCALV_GRID_DND_TREE
    Thanks
    Edited by: dharma raj on Jun 17, 2009 7:41 PM

  • ALV tree - Displaying of footer

    Hi Experts,
    I have an ALV report which has a tree output.I want to display some text in the footer.How can I do that?
    I searched a lot but I just got information on how to display the footer in an alv grid but nothing about alv tree.
    Thanks in advance.
    Regards,
    Puja

    hii puja,
    check below code where ALV footer is printed which will display the selection screen parameter at bottom of output ________________________________________________________________ SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001. "General Selections SELECT-OPTIONS: s_bukrs FOR gs_knb1-bukrs NO INTERVALS OBLIGATORY, "Company code s_grupp for gv_grupp no intervals no-extension. "Customer credit group SELECT-OPTIONS: s_kunnr FOR gs_kna1-kunnr . "Customer number SELECTION-SCREEN: END OF BLOCK blk1. "General Selections SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME . SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN COMMENT 1(41) text-002. PARAMETERS : p_tmoney(3) TYPE c . "Target money at risk SELECTION-SCREEN END OF LINE. SELECTION-SCREEN: END OF BLOCK blk2. _______________________________________________________________ CLASS lcl_event_receiver DEFINITION. PUBLIC SECTION. METHODS: end_of_list FOR EVENT end_of_list OF cl_gui_alv_grid IMPORTING e_dyndoc_id. ENDCLASS. "lcl_event_receiver DEFINITION &---- *& CLASS IMPLEMENTATION &---- &---- * CLASS lcl_event_receiver IMPLEMENTATION &---- * Class implementation for TOP-OF-PAGE &---- CLASS lcl_event_receiver IMPLEMENTATION. METHOD end_of_list. "implementation DATA : lv_text TYPE sdydo_text_element, lv_tbmar(15) TYPE c, " All Customers Base Money at Risk lv_tmr(15) TYPE c, " Total Money at Risk lv_emr(15) TYPE c, " Excess Money at Risk lv_mtemr(15) TYPE c, " Monthly Target Excess Money at Risk lv_var(15) TYPE c, " Variance lv_bukrs TYPE bukrs, lv_grupp TYPE grupp_cm, lv_kunnr TYPE kunnr, lv_kunnr1 TYPE kunnr, lv_tmoney(6) TYPE c. * To display all the parameters in selection screen *Company code CALL METHOD go_dyndoc_id->new_line. CALL METHOD go_dyndoc_id->new_line. MOVE s_bukrs-low TO lv_bukrs. CONCATENATE text-027 lv_bukrs INTO lv_text SEPARATED BY space. CALL METHOD go_dyndoc_id->add_text EXPORTING text = lv_text sap_style = cl_dd_area=>key. *Customer Credit Group CALL METHOD go_dyndoc_id->new_line. MOVE s_grupp-low TO lv_grupp. CONCATENATE text-028 lv_grupp INTO lv_text SEPARATED BY space. CALL METHOD go_dyndoc_id->add_text EXPORTING text = lv_text sap_style = cl_dd_area=>key. *Customer Number CALL METHOD go_dyndoc_id->new_line. MOVE s_kunnr-low TO lv_kunnr. MOVE s_kunnr-high TO lv_kunnr1. IF lv_kunnr1 IS INITIAL. CONCATENATE text-029 lv_kunnr INTO lv_text SEPARATED BY space. ELSE. CONCATENATE text-029 lv_kunnr ' TO ' lv_kunnr1 INTO lv_text SEPARATED BY space. ENDIF. CALL METHOD go_dyndoc_id->add_text EXPORTING text = lv_text sap_style = cl_dd_area=>key. *Target Excess Money at risk CALL METHOD go_dyndoc_id->new_line. MOVE p_tmoney TO lv_tmoney. CONCATENATE text-030 lv_tmoney INTO lv_text SEPARATED BY space. CALL METHOD go_dyndoc_id->add_text EXPORTING text = lv_text sap_style = cl_dd_area=>key. IF go_html_cntrl IS INITIAL. CREATE OBJECT go_html_cntrl EXPORTING parent = go_parent_html. ENDIF. DATA: lv_background_id TYPE sdydo_key VALUE space. CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET' EXPORTING document = go_dyndoc_id bottom = space. CALL METHOD go_dyndoc_id->merge_document. CALL METHOD go_dyndoc_id->set_document_background EXPORTING picture_id = lv_background_id. go_dyndoc_id->html_control = go_html_cntrl. CALL METHOD e_dyndoc_id->display_document EXPORTING reuse_control = abap_true parent = go_parent_html EXCEPTIONS html_display_error = 1. IF sy-subrc 0. MESSAGE i014. ENDIF. ENDMETHOD. "END_OF_LIST ENDCLASS. "lcl_event_receiver IMPLEMENTATION _________________________________________________________ &---- *& Module mod_init_9000 OUTPUT &---- * Place the values from grid object to custom container for ALV display ---- MODULE mod_init_9000 OUTPUT. DATA: lo_event_receiver TYPE REF TO lcl_event_receiver."#EC * IF cl_gui_alv_grid=>offline( ) IS INITIAL. IF go_container IS INITIAL. * Create a custom container control for ALV control CREATE OBJECT go_container EXPORTING container_name = 'CN_GRID_CONTROL'. * Split Controls CREATE OBJECT go_splitter EXPORTING parent = go_container rows = 2 columns = 1. CALL METHOD go_splitter->set_row_height EXPORTING id = 1 height = 68. CALL METHOD go_splitter->get_container EXPORTING row = 2 column = 1 RECEIVING container = go_parent_html. CALL METHOD go_splitter->get_container EXPORTING row = 1 column = 1 RECEIVING container = go_parent_grid. * Create a ALV Control CREATE OBJECT go_grid EXPORTING i_parent = go_parent_grid. CREATE OBJECT go_dyndoc_id EXPORTING style = gc_style. "ALV_GRID PERFORM sub_fieldcat_layout. CREATE OBJECT lo_event_receiver. SET HANDLER lo_event_receiver->end_of_list FOR go_grid. CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid. * Set Table for first display PERFORM sub_table_display. CALL METHOD go_dyndoc_id->initialize_document. CALL METHOD go_grid->list_processing_events EXPORTING i_event_name = gc_event "END_OF_LIST i_dyndoc_id = go_dyndoc_id. ENDIF. ENDIF. ENDMODULE. " mod_init_9000 OUTPUT _____________________________________________________ &---- *& Form SUB_TABLE_DISPLAY &---- * Display the output ---- FORM sub_table_display . DATA gs_layo TYPE lvc_s_layo. gs_layo-zebra = abap_true. gs_layo-sel_mode = gc_save. CALL METHOD go_grid->set_table_for_first_display EXPORTING i_save = gv_save i_default = gc_Default is_layout = gs_layo CHANGING it_outtab = gt_final[] it_fieldcatalog = gt_fcat. ENDFORM. " SUB_TABLE_DISPLAY
    regards,
    Shweta

  • How to handle the check box in the alv tree display

    Hello,
    in my ALV Tree Report i have a check box in the output.
    I have one check box in the selection screen as select all .
    if this is selected then all the check boxes in the output must be selected that is (X).
    am using CL_GUI_ALV_TREE  for this.
    Please give me some input how to make that check boxes 'X' in the above mentioned case.
    With Regards,
    Sumodh.P

    Sumodh,
    check this
    Re: Select all checkbox in ALV tree
    please search before posting
    Thanks
    Bala Duvvuri

  • I need to create a hyperlink option in my ALV tree display output.

    As the ALV output appears clicking on PO number --Hyperlink should take me a company's website.Can any just suggest me some info regarding the same???

    Regarding making hyperlink in OOPs ALV
    hyperlink in an column (ALV REPORT)
    how to handle the hyperlink in alv
    Please give me reward points
    Thanks
    Murali Poli

  • Traffic Lights in ALV Tree

    Hi Experts ,
    Could you suggest if we can use traffic lights in ALV tree Display and if possible  program(T-code ) you have gone thorugh.
    I already checked BCALV_TREE_06 , its totally different just showing icons .
    Regards,
    Karan
    Edited by: Karan_Chowdary on Dec 24, 2011 7:28 AM

    First in your output table for ALV.. add the light coloum.
    for example:
    DATA: BEGIN OF IMARA OCCURS 0,
    LIGHT(4) TYPE C,
    MATNR TYPE MARA-MATNR,
    MTART TYPE MARA-MTART,
    MAKTX TYPE MAKT-MAKTX,
    COLOR_LINE(4) TYPE C,
    TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell
    END OF IMARA.
    Then in the get data section, you have to put if-else class and upate that column as follows
    WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
    The use that light column in the catalog section
    Regards,
    Venkat

  • How to refresh the ALV Tree

    Hi,
    I have an ALV Tree report developed using the OOPS. In my ALV Tree output, I have some buttons which will update the database after clicking. The data is correctly updating in the database. But, it is not getting updated in the ALV Tree display. That means, it is not REFRESHing the ALV Tree display. We have to again execute the program in order to see the updated output.
    Could anyone please suggest me how to Refresh the ALV Tree display..?
    We can't use the method 'REFRESH_TABLE_DISPLAY' as it is a PRIVATE method is the class CL_GUI_ALV_TREE.
    Please share your valuable thoughts.
    Thanks & Regards,
    Paddu.

    Hi paddu.
    please check out the link mentioned below,this will help u.
    How to Refresh data on ALV tree
    Regards
    Theres

  • How to provide Hotspot in ALV tree????

    Hi experts,
    I have provided a double click event in ALV tree display. As of now I am able to open the transactions when I click on some the fields in output. But now I want to have a hotspot on those fields. See plz help me with this.
    This is my catalog:
    ** get fieldcatalog
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name = 'ZPP_STR_BAR'
           CHANGING
                ct_fieldcat      = t_fieldcat.
    LOOP AT t_fieldcat INTO ls_fieldcat.
        CASE ls_fieldcat-fieldname.
          WHEN 'AUFNR'.
            ls_fieldcat-no_out = 'X'.
            ls_fieldcat-key    = 'X'.
            ls_fieldcat-scrtext_s = text-t21.
            ls_fieldcat-tooltip   = text-t01.
          WHEN 'TXT'.
            ls_fieldcat-outputlen = 40.
    **      ls_fieldcat-do_sum = 'X'.
            ls_fieldcat-scrtext_s = text-t22.
            ls_fieldcat-tooltip   = text-t02.
          WHEN 'CHARG'.
            ls_fieldcat-outputlen = 16.
        ENDCASE.
        MODIFY t_fieldcat FROM ls_fieldcat.
    ENDLOOP.
    Is there any field in field catalog which i need to set?
    or is there any event to provide hotspot?
    <REMOVED BY MODERATOR>
    Thanks in advance,
    Sachin
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 2:31 PM

    hi,
      You Can give hotspot using the Fieldcatalog.
    hotspot_fieldname type slis_fieldname, " fieldname flag hotspot
    key_hotspot(1) type c,        " keys as hotspot " K_KEYHOT
    Hope this helps u,
    Reagrds,
    Arunsri.

  • ALV tree editable

    Hi all,
      I have a requirement to display the Data in ALV tree format with some fields as editable.I have to display data in 3 levels,which are of differents structures.
    To achieve editable in ALV tree display,I have used ALV GRID along with Tree display but here in GRID the 3 levels data is of same structure,but my requirement is of different structures.
    Inputs regarding this will be highly appreciated.
    Thanks,
    Sravanthi .V

    Hi Simone,
      Thanks for your quick reply,I have used this Class also but iam not able to get the Fields editable  even though it has the method for EDITABLE feature.
    Thanks,
    Sravanthi.V

  • ALV tree -average

    Hi ,
    i am doing a alv tree display. in which i want to display the average amount .but i find only do_sum. is there any possiblity to do average.
    thanks,
    madhu

    In the 'end_of_list' event of the ALV you can calculate the avarage and display.
    Ex:
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE' 
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    *&      Form  end_of_list_html
          output at the end of the list - not in printed output       *
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
       calculate the avarage and display.
    ENDFORM. "end_of_list_html.

  • Editing of a  Column of ALV Tree(OOPS) node

    is it possible to edit a column of node of ALV tree.
    i am using ALV class "CL_GUI_ALV_TREE".
    After searching existing threads, for the same issue..i found the following.
    1) Editable Tree ALV
      ( displays pop up window where user can change values and then transfer these changes back to ALV tree)
    2) Editable Field in ALV TREE Display Using OOPs
         (this approach is not working for ALV Tree)
    But i want to edit directly coulmn of a node of ALV tree.
    is it possible in  OOPS ALV Tree?
    if it possible, can any one provide the sample code,

    As you already noticed, this is not possible, but you may edit your fields outside the tree and bring your changes back to tree. I struggled with the same once but eventually used described alternative. If you use saplink you may check upgrade [chain and rename|http://code.google.com/p/saplink-chain-and-rename/downloads/list] where this approach is released. The code is free so you will be able to study and copy whatever you need from it.
    Editing in a pop up is also an alternative here.
    Regards
    Marcin

  • How to avoid blank column display in output in ALV TREE

    how to avoid blank column display in output while decreasing the length of other columns in ALV Tree.
    Example: please refer to BCALV_TREE_01 and see the output, then decrease the length of all columns . Then you can see a blank column appearing in screen at last, i.e in container. so how to avoid that.
    Thanks for reply.
    Edited by: morpeous on Jul 1, 2009 1:53 PM

    Hi,
    Check BCALV_TREE_02 on how to hide columns.
    Thanks & Regards,
    Anand Patil

  • Display Traffic Lights in ALV TREE

    Hi,
    I have to display traffic light in ALV tree but i am not able to find out what parameter i should pass like in ALV grid where we can set is_layout (BCALV_GRID_04).
    Thanks in advance.
    Regards,
    Harsh

    Hi,
    Please take a look at my code below. Hope it suits your requirement.
    P.S. Please award points if it helps...
    *& Report ZMM_R_PO_TO_IPURCH_XI
    *& PROGRAM TYPE  : Report
    *& RICEF ID      :
    *& TITLE         : ZMM_R_PO_TO_IPURCH_XI
    *& SAP Module    : MM
    *& CREATION DATE : 02/06/2008
    *& AUTHOR        : Aris Hidalgo
    *& DESIGNER      : Aris Hidalgo
    *& DESCRIPTION   :
    *$**********************************************************************
    *$     CHANGE HISTORY
    *$----------------------------------------------------------------------
    *$   DATE        | T-Num      | Description                  | Reference
    **               |            |                              |
    *$**********************************************************************
    REPORT  zmm_r_po_to_ipurch_xi
            NO STANDARD PAGE HEADING
            MESSAGE-ID zmm.
    * Data Dictionary Table/s                      *
    TABLES: edidc.
    * SELECTION-SCREEN                             *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_credat FOR edidc-credat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: rb_sum RADIOBUTTON GROUP grp1,
                rb_det RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN END OF BLOCK b2.
    */ CLASS DEFINITION/S /*
    *       CLASS lcl_data_def DEFINITION
    CLASS lcl_data_def DEFINITION ABSTRACT.
      PUBLIC SECTION.
        TYPES: BEGIN OF t_edidc,
                docnum TYPE edidc-docnum,
                docrel TYPE edidc-docrel,
                status TYPE edidc-status,
                doctyp TYPE edidc-doctyp,
                direct TYPE edidc-direct,
                rcvpor TYPE edidc-rcvpor,
                rcvprt TYPE edidc-rcvprt,
                rcvprn TYPE edidc-rcvprn,
                rcvsad TYPE edidc-rcvsad,
                sndpor TYPE edidc-sndpor,
                sndprt TYPE edidc-sndprt,
                sndprn TYPE edidc-sndprn,
                sndsad TYPE edidc-sndsad,
                credat TYPE edidc-credat,
                cretim TYPE edidc-cretim,
                mestyp TYPE edidc-mestyp,
                idoctp TYPE edidc-idoctp,
               END OF t_edidc.
        TYPES: BEGIN OF t_output,
                exception TYPE char1,
                ebeln     TYPE ekko-ebeln,
                lifnr     TYPE lfa1-lifnr,
                name1     TYPE lfa1-name1,
                credat    TYPE edidc-credat,
                cretim    TYPE edidc-cretim,
               END OF t_output.
        TYPES: BEGIN OF t_ekko,
                ebeln TYPE ekko-ebeln,
                lifnr TYPE ekko-lifnr,
               END OF t_ekko.
        TYPES: BEGIN OF t_lfa1,
                lifnr TYPE lfa1-lifnr,
                name1 TYPE lfa1-name1,
               END OF t_lfa1.
        DATA: gt_edidc  TYPE STANDARD TABLE OF t_edidc,
              gt_output TYPE STANDARD TABLE OF t_output,
              wa_output LIKE LINE OF gt_output,
              gt_ekko   TYPE HASHED TABLE OF t_ekko
                        WITH UNIQUE KEY ebeln,
              gt_lfa1   TYPE HASHED TABLE OF t_lfa1
                        WITH UNIQUE KEY lifnr.
    ENDCLASS.                    "lcl_data_def DEFINITION
    CLASS lcl_alv_routines  DEFINITION DEFERRED.
    CLASS lcl_handle_events DEFINITION DEFERRED.
    *       CLASS lcl_get_data DEFINITION
    CLASS lcl_get_data DEFINITION INHERITING FROM lcl_data_def.
      PUBLIC SECTION.
        METHODS: get_idocs,
                 read_idocs,
                 process_data
                   IMPORTING
                     im_docnum TYPE edidc-docnum.
      PRIVATE SECTION.
        CONSTANTS: lc_mestyp     TYPE edidc-mestyp VALUE 'ZMARKETSITE_PURCHASE_ORDER',
                   lc_idoctp     TYPE edidc-idoctp VALUE 'ZMARKETSITE_PURCHASE_ORDER01',
                   lc_segnam     TYPE edid4-segnam VALUE 'ZMARKETSITE_ORDER_HEADER1'.
        CONSTANTS: lc_red        TYPE i VALUE 1,
                   lc_yellow     TYPE i VALUE 2,
                   lc_green      TYPE i VALUE 3.
        DATA: lv_stat_message    TYPE bdidocattr-message,
              o_lcl_alv_routines TYPE REF TO lcl_alv_routines.
        DATA: ls_idoc_control    TYPE edidc,
              lv_tot_data_recs   TYPE sy-dbcnt,                 "#EC NEEDED
              lv_tot_status_recs TYPE sy-dbcnt.                 "#EC NEEDED
        DATA: lt_edids TYPE STANDARD TABLE OF edids,
              lt_edidd TYPE STANDARD TABLE OF edidd.
    ENDCLASS.                    "lcl_get_data DEFINITION
    *       CLASS lcl_alv_routines DEFINITION
    CLASS lcl_alv_routines DEFINITION INHERITING FROM lcl_get_data.
      PUBLIC SECTION.
        DATA: lcl_table            TYPE REF TO cl_salv_table,
              lcl_container        TYPE REF TO cl_gui_custom_container,
              lcl_handle_events    TYPE REF TO lcl_handle_events,
              lcl_columns          TYPE REF TO cl_salv_columns_table,
              lcl_column           TYPE REF TO cl_salv_column_table,
              lcl_events2          TYPE REF TO cl_salv_events_table,
              lcl_display_settings TYPE REF TO cl_salv_display_settings,
              lcl_functions        TYPE REF TO cl_salv_functions_list,
              lcl_display          TYPE REF TO cl_salv_display_settings,
              lcl_aggregations     TYPE REF TO cl_salv_aggregations,
              lcl_sorts            TYPE REF TO cl_salv_sorts,
              lcl_content          TYPE REF TO cl_salv_form_element,
              lcl_header           TYPE REF TO cl_salv_form_header_info,
              ls_color             TYPE lvc_s_colo.
        DATA: lcl_grid            TYPE REF TO cl_salv_form_layout_grid,
              lcl_grid_1          TYPE REF TO cl_salv_form_layout_grid,
              lcl_grid_2          TYPE REF TO cl_salv_form_layout_grid,
              lcl_label           TYPE REF TO cl_salv_form_label,"#EC NEEDED
              lcl_text            TYPE REF TO cl_salv_form_text,
              gt_t247             TYPE STANDARD TABLE OF t247,
              wa_t247             LIKE LINE OF gt_t247,
              lv_text             TYPE string.
        METHODS: display_data
                   IMPORTING
                     im_output LIKE gt_output,
                 display_top_of_page.
      PRIVATE SECTION.
        DATA: lv_string TYPE string,
              lv_date1  TYPE c LENGTH 10,
              lv_time   TYPE c LENGTH 10,
              lv_title  TYPE string.
    ENDCLASS.                    "lcl_alv_routines DEFINITION
    *       CLASS lcl_handle_events DEFINITION
    CLASS lcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          on_link_click FOR EVENT link_click OF cl_salv_events_table
            IMPORTING row column.
    ENDCLASS.                    "lcl_handle_events DEFINITION
    */ IMPLEMENTATION/S /*
    *       CLASS lcl_get_data IMPLEMENTATION
    CLASS lcl_get_data IMPLEMENTATION.
    * METHOD get_idocs
      METHOD get_idocs.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
    *       PERCENTAGE       = 0
            text             = text-p01.
        SELECT docnum docrel status doctyp
               direct rcvpor rcvprt rcvprn
               rcvsad sndpor sndprt sndprn
               sndsad credat cretim mestyp
               idoctp
          FROM edidc
          INTO TABLE gt_edidc
         WHERE mestyp = lc_mestyp
           AND idoctp = lc_idoctp
           AND credat IN s_credat.
        IF gt_edidc[] IS NOT INITIAL.
    *     Get IDOC details
          CALL METHOD me->read_idocs.
        ENDIF.
      ENDMETHOD.                    "get_idocs
    * METHOD read_idocs
      METHOD read_idocs.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
    *       PERCENTAGE       = 0
            text             = text-p02.
        FIELD-SYMBOLS: <fs_edidc>  LIKE LINE OF gt_edidc,
                       <fs_output> LIKE LINE OF gt_output,
                       <fs_ekko>   LIKE LINE OF gt_ekko,
                       <fs_lfa1>   LIKE LINE OF gt_lfa1.
        LOOP AT gt_edidc ASSIGNING <fs_edidc>.
          CLEAR ls_idoc_control.
          REFRESH: lt_edids, lt_edidd.
    *     Get status text of IDOC
          CALL FUNCTION 'IDOC_GET_MESSAGE_ATTRIBUTE'
            EXPORTING
              idoc_number  = <fs_edidc>-docnum
            IMPORTING
              idoc_message = lv_stat_message.
    *     Get IDOC details
          CALL FUNCTION 'IDOC_READ_COMPLETELY'
            EXPORTING
              document_number          = <fs_edidc>-docnum
            IMPORTING
              idoc_control             = ls_idoc_control
              number_of_data_records   = lv_tot_data_recs
              number_of_status_records = lv_tot_status_recs
            TABLES
              int_edids                = lt_edids
              int_edidd                = lt_edidd
            EXCEPTIONS
              document_not_exist       = 1
              document_number_invalid  = 2
              OTHERS                   = 3.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *     Pass data to output table
          CALL METHOD me->process_data
            EXPORTING
              im_docnum = <fs_edidc>-docnum.
        ENDLOOP.
        DELETE gt_output WHERE ebeln IS INITIAL.
        IF gt_output[] IS NOT INITIAL.
    *     Get vendor for fetched POs
          SELECT ebeln lifnr
            FROM ekko
            INTO TABLE gt_ekko
             FOR ALL ENTRIES IN gt_output
           WHERE ebeln = gt_output-ebeln.
          IF gt_ekko[] IS NOT INITIAL.
    *       Get name of vendors
            SELECT lifnr name1
              FROM lfa1
              INTO TABLE gt_lfa1
               FOR ALL ENTRIES IN gt_ekko
             WHERE lifnr = gt_ekko-lifnr.
          ENDIF.
    *     Pass vendor details to output table
          LOOP AT gt_output ASSIGNING <fs_output>.
            READ TABLE gt_ekko ASSIGNING <fs_ekko>
                               WITH TABLE KEY ebeln = <fs_output>-ebeln.
            IF sy-subrc = 0.
              READ TABLE gt_lfa1 ASSIGNING <fs_lfa1>
                                 WITH TABLE KEY lifnr = <fs_ekko>-lifnr.
              IF sy-subrc = 0.
                <fs_output>-lifnr = <fs_lfa1>-lifnr.
                <fs_output>-name1 = <fs_lfa1>-name1.
              ENDIF.
            ENDIF.
          ENDLOOP.
          CREATE OBJECT o_lcl_alv_routines.
          CALL METHOD o_lcl_alv_routines->display_data
            EXPORTING
              im_output = gt_output[].
        ENDIF.
      ENDMETHOD.                    "read_idocs
    * METHOD process_data
      METHOD process_data.
        FIELD-SYMBOLS: <fs_edidd> LIKE LINE OF lt_edidd.
        IF lv_stat_message CP 'ok' OR
           lv_stat_message CP 'positive'.
          wa_output-exception = lc_green.
        ELSEIF lv_stat_message CP 'error' OR
               lv_stat_message CP 'negative'.
          wa_output-exception = lc_red.
        ELSE.
          wa_output-exception = lc_yellow.
        ENDIF.
        READ TABLE lt_edidd ASSIGNING <fs_edidd>
                            WITH KEY docnum = im_docnum
                                     segnam = lc_segnam.
        IF sy-subrc = 0.
          wa_output-ebeln = <fs_edidd>-sdata+0(10).
        ENDIF.
        wa_output-credat = ls_idoc_control-credat.
        wa_output-cretim = ls_idoc_control-cretim.
        APPEND wa_output TO gt_output.
        CLEAR wa_output.
      ENDMETHOD.                    "process_data
    ENDCLASS.                    "lcl_get_data IMPLEMENTATION
    *       CLASS lcl_alv_routines IMPLEMENTATION
    CLASS lcl_alv_routines IMPLEMENTATION.
    * METHOD display_data
      METHOD display_data.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = 0
            text       = text-p03.
        gt_output[] = im_output[].
        TRY.
            cl_salv_table=>factory(
              EXPORTING
                list_display = ''
              IMPORTING
                r_salv_table = lcl_table
              CHANGING
                t_table      = gt_output ).
          CATCH cx_salv_msg.                                "#EC NO_HANDLER
        ENDTRY.
        lcl_functions = lcl_table->get_functions( ).
    *   Set all standard ALV functions
        lcl_functions->set_all( abap_true ).
        lcl_columns = lcl_table->get_columns( ).
        lcl_columns->set_optimize( '' ).
    *   Set display to striped pattern
        lcl_display = lcl_table->get_display_settings( ).
        lcl_display->set_striped_pattern( cl_salv_display_settings=>true ).
    */Sort columns
        TRY.
            lcl_sorts = lcl_table->get_sorts( ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        lcl_sorts->set_group_active( ).
        TRY.
            lcl_sorts->add_sort(
              columnname = 'EBELN'
              subtotal   = '' ).
          CATCH cx_salv_not_found cx_salv_existing cx_salv_data_error."#EC NO_HANDLER
        ENDTRY.
    */Set column names
        TRY.
            lcl_columns->set_exception_column( 'EXCEPTION' ).
          CATCH cx_salv_data_error.                         "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'EXCEPTION' ).
            lcl_column->set_short_text( text-h01 ).
            lcl_column->set_medium_text( text-h01 ).
            lcl_column->set_long_text( text-h01 ).
            lcl_column->set_output_length( '6' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'EBELN' ).
            lcl_column->set_short_text( text-h02 ).
            lcl_column->set_medium_text( text-h02 ).
            lcl_column->set_long_text( text-h02 ).
            lcl_column->set_output_length( '9' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'LIFNR' ).
    *        lcl_column->set_short_text( text-h03 ).
            lcl_column->set_medium_text( text-h03 ).
            lcl_column->set_long_text( text-h03 ).
            lcl_column->set_output_length( '11' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'NAME1' ).
    *        lcl_column->set_short_text( text-h04 ).
    *        lcl_column->set_medium_text( text-h04 ).
            lcl_column->set_long_text( text-h04 ).
            lcl_column->set_output_length( '30' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'CREDAT' ).
    *        lcl_column->set_short_text( text-h05 ).
    *        lcl_column->set_medium_text( text-h05 ).
            lcl_column->set_long_text( text-h05 ).
            lcl_column->set_output_length( '13' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'CRETIM' ).
    *        lcl_column->set_short_text( text-h06 ).
    *        lcl_column->set_medium_text( text-h06 ).
            lcl_column->set_long_text( text-h06 ).
            lcl_column->set_output_length( '13' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
    */Set aggregations
    *    TRY.
    *        lcl_aggregations = lcl_table->get_aggregations( ).
    *      CATCH cx_salv_not_found.                          "#EC NO_HANDLER
    *    ENDTRY.
    *    TRY.
    *        lcl_aggregations->add_aggregation( '' ).
    *      CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing."#EC NO_HANDLER
    *    ENDTRY.
    */Hide columns
    *    TRY.
    *        lcl_column ?= lcl_columns->get_column( 'DESCRIPT' ).
    *        lcl_column->set_visible( if_salv_c_bool_sap=>false ).
    *      CATCH cx_salv_not_found.                          "#EC NO_HANDLER
    *    ENDTRY.
    */Display top of page
        CALL METHOD me->display_top_of_page.
        lcl_table->set_top_of_list( lcl_content ).
    */Handle ALV events
        lcl_events2 = lcl_table->get_event( ).
        CREATE OBJECT lcl_handle_events.
        SET HANDLER lcl_handle_events->on_link_click FOR lcl_events2.
        lcl_display_settings = lcl_table->get_display_settings( ).
        lcl_table->display( ).
      ENDMETHOD.                    "display_data
    * METHOD display_top_of_page
      METHOD display_top_of_page.
        CREATE OBJECT lcl_grid.
        lv_title = text-t01.
        lcl_grid->create_header_information(
                    row     = 1
                    column  = 1
                    text    = lv_title
                    tooltip = lv_title ).
        lcl_grid->add_row( ).
        lcl_grid_1 = lcl_grid->create_grid(
                       row    = 3
                       column = 1 ).
        CLEAR lv_string.
        CONCATENATE: sy-datum+4(2) '/' sy-datum+6(2) '/' sy-datum+0(4)
               INTO lv_date1.
        CONCATENATE: text-t02 lv_date1
               INTO lv_string
          SEPARATED BY space.
        lcl_label = lcl_grid_1->create_label(
                      row     = 1
                      column  = 1
                      text    = lv_string
                      tooltip = lv_string ).
        CLEAR lv_string.
        CONCATENATE: sy-uzeit+0(2) ':' sy-uzeit+2(2) ':' sy-uzeit+4(2)
               INTO lv_time.
        CONCATENATE: text-t03 lv_time
               INTO lv_string
          SEPARATED BY space.
        lcl_label = lcl_grid_1->create_label(
                      row     = 2
                      column  = 1
                      text    = lv_string
                      tooltip = lv_string ).
        lcl_content = lcl_grid.
      ENDMETHOD.                    "display_top_of_page
    ENDCLASS.                    "lcl_alv_routines IMPLEMENTATION
    *       CLASS lcl_handle_events IMPLEMENTATION
    CLASS lcl_handle_events IMPLEMENTATION.
    * METHOD on_link_click
      METHOD on_link_click.
      ENDMETHOD.                    "on_link_click
    ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
    * START-OF-SELECTION                           *
    START-OF-SELECTION.
      DATA: o_lcl_get_data TYPE REF TO lcl_get_data.
      CREATE OBJECT o_lcl_get_data.
      CALL METHOD o_lcl_get_data->get_idocs.

Maybe you are looking for

  • PowerBook G4 wont read ex, HD, Ipod, Printer, Shufflel - ahhhh, help?

    PowerBook G4 wont read external HD, Ipod, Printer, Shufflel - ahhhh, help? Im not the whizziest on computers, other than lve tried a few things and nothing seems to work - lm open to any suggestions. Each external device makes sounds, which sounds li

  • Does iweb 06 reduce image size, or only compress it?

    my concern is the final file size of my site, and the time it takes for people to upload pages with my artwork photos. when I drag an image from photoshop onto my iweb site, it automatically shrinks the image, and then i expand it to fit my formatted

  • BAPI For listing alternative  routing with sequence details.

    Dear all, I want to use BAPI For listing alternative  routing with sequence details. Pl' tell BAPI function Module for routing . Thanks.

  • Extract GUID to a file

    I have a working ps1 file to extract Name,SamAccountName,Description,EmailAddress to a file. I need to add the GUID identity to this extract.  This is my working extraction ps1 (sanitized): Import-Module ActiveDirectory Get-ADUser -Filter * -SearchBa

  • Strongly recommend update more Language packs!!!

    Nokia officia! Here your customers need you pay attention on this. We really need you to update more Language packs in Ovi store. It help Nokia customers more convenience for read and type on text & mail. As a smart phone like "N8" only can read in f