ALV using cl_gui_alv_tree

Hi All,
Iam new to the concept of ALV classes. The requriement is to display the BOM details in a multilevel hierarchial tree structure  ( there is no limit for the drill down levels). Is it possible to display using the class CL_GUI_ALV_TREE. Is there any sample standard program available. Please suggest.
Thanks in Advance.

hi,
GOTO SE80--> Write package name "SLIS"
in this package you find all the program related to ur topic.
hope its helps
Regards
Ritesh J

Similar Messages

  • Display long text field in multiple rows using CL_GUI_ALV_TREE

    Hi,
    I am working on ALV using CL_GUI_ALV_TREE. My last column in this ALV is a long text field which is a text editor field in a standard transactiion. As this text can have more than 250 characters value also, I want to display this field in more than one line , restricting each line to 75 characters. Is it possible to display a field content in more than one line? Please help.
    Thanks.

    HI,
    I dont think it is possible., but instead what i can suggest is  under last node which u want to split automatically, create 3 text edit fields and split ur text manually through program.

  • Editable field in alv tree output using cl_gui_alv_tree

    Hi,
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree.
    regards,
    Naresh

    sadly, this is not possible. An ALV Tree cannot by editable.
    Regards

  • Editable field with F4 help in alv tree output using cl_gui_alv_tree

    HI
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree
    Regards
    Naresh

    Hi Naresh,
    Pass the field catalog with the additional parameter (ls_fcat-edit = 'X'.).
    for F4 help if the data element have the search help it automatically will come. other wise include the additional parameter in the field catalog (ls_fcat-F4AVAILABL = 'X')
    Reward if found helpful.
    Regards,
    Boobalan Suburaj

  • How to print a footer using CL_GUI_ALV_TREE class

    Dear Abapers.
    I'm using SET_TABLE_FOR_FIRST_DISPLAY method from CL_GUI_ALV_TREE class to display a report in an ALV Tree and I need to display the footer.
    Using the PRINT_END_OF_PAGE event from class CL_GUI_ALV_GRID we can display the header, but I need to use CL_GUI_ALV_TREE and there is no method for END_OF_PAGE.
    Can you please help me?
    Many thanks.
    Estela

    Dear Abapers.
    I'm using SET_TABLE_FOR_FIRST_DISPLAY method from CL_GUI_ALV_TREE class to display a report in an ALV Tree and I need to display the footer.
    Using the PRINT_END_OF_PAGE event from class CL_GUI_ALV_GRID we can display the header, but I need to use CL_GUI_ALV_TREE and there is no method for END_OF_PAGE.
    Can you please help me?
    Many thanks.
    Estela

  • UNLOCKING single row in ALV using Funtions

    hai,
    Actually i am displaying a table in ALV USING FUNCTIONS and i am locking key values.
    Now my reqment is , if i press (NEW, COPY )button then i have to add one new row and that row should be Unlocked to insert values.
    Is it possible USING FUNCTIONS(I have a solution using CLASSES)

    Hi ramesh,
    it is possible with the LVC FM.i gave the sample yesterday did you check that..
    if not check it to day..
    REPORT ZTESTALV.
    TYPE-POOLS: SLIS.
    *- Fieldcatalog
    DATA: IT_FIELDCAT  TYPE LVC_T_FCAT,
          IT_FIELDCAT1  TYPE SLIS_T_FIELDCAT_ALV..
    *- For Events
    DATA:IT_EVENTS TYPE SLIS_T_EVENT.
    DATA:  X_FIELDCAT  TYPE LVC_S_FCAT,
            X_FIELDCAT1  TYPE SLIS_FIELDCAT_ALV.
    DATA:X_LAYOUT TYPE LVC_S_LAYO.
    "{ FOR DISABLE
    DATA: LS_EDIT TYPE LVC_S_STYL,
          LT_EDIT TYPE LVC_T_STYL.
    "} FOR DISABLE
    DATA: BEGIN OF IT_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
         END OF IT_VBAP.
    DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
    SELECT VBELN
           POSNR
           UP TO 10 ROWS
          INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
          FROM VBAP.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'VBELN'.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '10'.
    x_fieldcat-ref_field = 'VBELN'.
    x_fieldcat-ref_table = 'VBAK'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'POSNR'.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '5'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    "{FOR DISABLE HERE 6ROW IS DISABLED
    SY-TABIX = 6.
    LS_EDIT-FIELDNAME = 'VBELN'.
    LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    LS_EDIT-STYLE2 = SPACE.
    LS_EDIT-STYLE3 = SPACE.
    LS_EDIT-STYLE4 = SPACE.
    LS_EDIT-MAXLEN = 10.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    LS_EDIT-FIELDNAME = 'POSNR'.
    LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    LS_EDIT-STYLE2 = SPACE.
    LS_EDIT-STYLE3 = SPACE.
    LS_EDIT-STYLE4 = SPACE.
    LS_EDIT-MAXLEN = 6.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
    MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB  TRANSPORTING
                                      HANDLE_STYLE .
    X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
    "} UP TO HERE
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        I_CALLBACK_PROGRAM = SY-REPID
        IS_LAYOUT_LVC      = X_LAYOUT
        IT_FIELDCAT_LVC    = IT_FIELDCAT
      TABLES
        T_OUTTAB           = IT_VBAP[]
      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.
    Regards
    vijay

  • How to get Subtotal text in ALV using OOPS

    hi,
    Can any one pls help me out getting  <b>subtotals text</b> in ALV using OOPS concepts....Pls provide me if any of u have  sample code for that......
    my code:
    data:gr_grid_d0100 type ref to cl_gui_alv_grid.
    data : gr_events_d0100   type ref to lcl_events_d0100.
    classes**********
    class lcl_events_d0100 definition.
      public section.
        methods:
    subtotal_text for event subtotal_text
                        of cl_gui_alv_grid
                        importing es_subtottxt_info
                        ep_subtot_line
                        e_event_data.
    endclass.
    class lcl_events_d0100 implementation.
    method subtotal_text.
        perform d0100_event_subtotal_text using       es_subtottxt_info
    ep_subtot_line
    e_event_data.
      endmethod.                    "subtotal_text
    endclass.
    data : gr_event_handler type ref to lcl_events_d0100.
    SET HANDLER gr_event_handler->subtotal_text FOR wcl_alv_grid_request
    FORM d0100_event_subtotal_text USING
          es_subtottxt_info TYPE LVC_S_STXT
          ep_subtot_line TYPE REF TO data
          e_event_data TYPE REF TO cl_alv_event_data.
      DATA: l_text TYPE string.
      l_text = es_subtottxt_info.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      ASSIGN e_event_data->m_data->* TO <fs>.
                            <fs> = text-007.

    hi vijay
    check this code
    if you want to use field symbols.
    data: total type ref to data,
    subtotal1 type ref to data.
    field-symbols <total> like gt_sflight.
    field-symbols <subtotal1> like gt_sflight.
    call method grid1->get_subtotals
    importing
    ep_collect00 = total
    ep_collect01 = subtotal1.
    assign total->* to <total>.
    assign subtotal1->* to <subtotal1>.
    or u can use
    U have to do the subtotal column wise.In the field catalog specify the following in addition to the corresponding field name(i.e. Column)
    DATA ls_fcat TYPE lvc_s_fcat.
    ls_fcat-do_sum = 'X'.
    Hope this helps u out.
    Thanks & Regards,
    naveen

  • How to add a new button in an ALV using factory method

    im using factory method to creat an ALV
    The reason why I'm doing this is because I want the ALV and the selection screen in the same screen like exemplified here http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html
    CALL METHOD cl_salv_table=>factory
                EXPORTING
                  list_display   = if_salv_c_bool_sap=>false
                  r_container    = lo_cont
                  container_name = 'DOCK_CONT'
                IMPORTING
                  r_salv_table   = lo_alv
                CHANGING
                  t_table        = me->t_data.
    The above code already uses every parameter that method as to offer.
    Is it possible to add extra buttons to an ALV using that method?

    Hi Ann,
    The reason you are not able to see any of the new columns as a option to select in your web service block is because when you have published that block, they were not present. Add these two new objects in your block and publish it again. You will be prompted for duplication content. Select the highlighted block for duplicate and now you can see the new added objects in the filter option. Update and this will overwrite your published block. Please note, web services do appear to behave weirdly when used with dashboards so I request you to please try it in a separate test report first.
    Hope that helps.
    Regards,
    Tanisha

  • END-OF-PAGE in ALV using OOPS

    Hello ,
    Can anyone let me know how to trigger the END-of-page event in ALV using OOPs.
    Thanks in advance.
    Regards
    Jai

    Hello Pratuysh,
    Thanks for the answer
    I know that report,but that doesn't help me.
    Any other way
    Thanks
    Jai

  • How to populate field catalogue fields in ALV using  dynamic internal table

    Hi All,
    Please let me know how to populate field catalogue fields in ALV using  dynamic internal table.
    I have created <dyn_table> using code below.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                     EXPORTING
                       it_fieldcatalog = g_t_ifc
                        it_fieldcatalog = g_t_fieldcat
                     IMPORTING
                        ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Now this  <dyn_table>  has fields like idoc no.,creation date ,
    segment field 1, segment field 2 etc..Now idoc no.,creation date  are static fields from table EDIDC. And segment field 1, segment field 2 etc are dynamic fields from table EDSAPPL.
    In my  ALV report I am getting the final layout properly but I am unable to move values to corresponding fields in the final layout shown.Please let me know how to populate these fields from different tables.
    I tried this way but its not working.
    SORT g_t_edid4 BY docnum.
      LOOP AT g_t_edidc INTO g_r_edidc.
        READ TABLE g_t_edid4 into g_r_edid4
                         WITH KEY docnum = g_r_edidc-docnum
                                        BINARY SEARCH.
        IF sy-subrc = 0.
          <dyn_wa> =  g_r_edid4-sdata.
         MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
       CLEAR g_r_edid4.
        ENDIF.
    MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.

    You have to assign each field to field symbol and then assign the value to that field symbol and asssign that field symbol to workarea field symbol.
    LOOP AT g_t_edidc INTO g_r_edidc.
    READ TABLE g_t_edid4 into g_r_edid4
    WITH KEY docnum = g_r_edidc-docnum
    BINARY SEARCH.
    IF sy-subrc = 0.
    ASSIGN COMPONENT 'SDATA' OF STRUCTURE <DYN_WA> TO <DYN_FLD>.
    <DYN_FLD> = g_r_edid4-sdata.
    " <dyn_wa> = g_r_edid4-sdata.
    " Assign each fields like this.
    " MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
    CLEAR g_r_edid4.
    ENDIF.
    " MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
    APPEND <dyn_wa> TO <dyn_table>.
    Regards,
    Naimesh Patel

  • How to select records in ALV using FM

    Hi guys,
    How to select records in ALV using FM. Not the OO method. Thx in advance!
    Kun

    hI
    by using REUSE_ALV_FIELDCATALOUG_MERGE. Iys fill field catalouge table as per internal table description. Then use REUSE_ALV_GRID_DISPLAY for display ALV REPORT.
    **Please reward suitable points***
    With Regards
    Navin Khedikar

  • Header in ALV using Oops

    I need to display Table header in ALV using Oops.
    I need to data from 8 fields which I get in the run time of the program.
    I am new to Oops ALV, I have done a similar thing in normal ALV but not in oops.
    Detailed info required, Custom container settings as well.
    Thanks in Advance

    see this weblog TOP_OF_PAGE in ALV  Using CL_GUI_ALV_GRID

  • Events in ALV Using OO ...

    I wrote an ALV using OO . My problem is that i can't control the events for Hotspot , Double Click etc .
    Look my code please to find the problem.
    *& Report  YDP_ALV_USING_OO
    REPORT  YDP_ALV_USING_OO.
    INCLUDE <CL_ALV_CONTROL>.
          CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    *DOUBLE-CLICK CONTROL
        HANDLE_DOUBLE_CLICK
        FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
        IMPORTING E_ROW E_COLUMN ES_ROW_NO,
    *Hotspot click control
        HANDLE_HOTSPOT_CLICK
        FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
        IMPORTING E_ROW_ID
                  E_COLUMN_ID
                  ES_ROW_NO ,
    *To implement user commands
        HANDLE_USER_COMMAND
        FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
        IMPORTING E_UCOMM .
    ENDCLASS.                    "lcl_event_handler DEFINITION
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *Handle Double Click
      METHOD HANDLE_DOUBLE_CLICK .
        PERFORM HANDLE_DOUBLE_CLICK USING E_ROW
                                          E_COLUMN
                                          ES_ROW_NO.
      ENDMETHOD .                    "handle_double_click
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        PERFORM HANDLE_HOTSPOT_CLICK USING E_ROW_ID
                                           E_COLUMN_ID
                                           ES_ROW_NO .
      ENDMETHOD .                    "handle_hotspot_click
    *--Handle User Command
      METHOD HANDLE_USER_COMMAND .
        PERFORM HANDLE_USER_COMMAND USING E_UCOMM .
      ENDMETHOD.                    "handle_user_command
    ENDCLASS .                    "lcl_event_handler IMPLEMENTATION
    *&      Form  handle_hotspot_click
          text
         -->I_ROW_ID     text
         -->I_COLUMN_ID  text
         -->IS_ROW_NO    text
    FORM HANDLE_HOTSPOT_CLICK USING I_ROW_ID TYPE LVC_S_ROW
        I_COLUMN_ID TYPE LVC_S_COL
        IS_ROW_NO TYPE LVC_S_ROID.
      READ TABLE ITAB INDEX IS_ROW_NO-ROW_ID .
      IF SY-SUBRC = 0 AND I_COLUMN_ID-FIELDNAME = 'REWARD' .
        BREAK DFREARAS.
      ENDIF .
    ENDFORM .                    "handle_hotspot_click
    *&      Form  handle_double_click
          text
         -->I_ROW      text
         -->I_COLUMN   text
         -->IS_ROW_NO  text
    FORM HANDLE_DOUBLE_CLICK USING I_ROW TYPE LVC_S_ROW
    I_COLUMN TYPE LVC_S_COL
    IS_ROW_NO TYPE LVC_S_ROID.
       BREAK DFREARAS.
      READ TABLE ITAB INDEX IS_ROW_NO-ROW_ID .
      IF SY-SUBRC = 0 AND I_COLUMN-FIELDNAME = 'COMPL_NO' .
        BREAK DFREARAS.
      ENDIF .
    ENDFORM .                    "handle_double_click
    Please help ...

    THANKS EVERYONE ....
    I FOUND IT ...

  • TWO ALV USING SPLITTER CONTAINER

    HI ALL.
    I WANT TO DISPLAY TWO DIFFERENT ALV USING SPLITTER.
    ON DOUBLE CLICKING THE FIRST ALV THE SECOND ALV GET CALLED RESPECTIVE OF THE FIELDS I CHOOSE ON CLICKING
    THE FIRST LIST IS IN LEFT SPLITTER . AND THE SECOND LIST IS  IN RIGHT SPLITTER .
    Moderator message: many examples are available, please search before asking, do not post in all upper case in these forums.
    Edited by: Thomas Zloch on Dec 2, 2010 1:08 PM

    Hi,
    CREATE OBJECT g_custom_container
        EXPORTING
          container_name = 'CONTAINER'.
    CREATE OBJECT g_custom_container1
        EXPORTING
          container_name = 'CONTAINER1'.
    CREATE OBJECT g_splitter
                      EXPORTING parent = G_CUSTOM_container
                                rows    = 1
                                columns = 2.
    CALL METHOD g_splitter->get_container
                          EXPORTING row      = 1
                                    column   = 1
                          RECEIVING container = g_container_1.
        CALL METHOD g_splitter->get_container
                      EXPORTING row      = 1
                                column   = 2
                      RECEIVING container = g_container_2.
    CREATE OBJECT g_splitter1
                      EXPORTING parent = G_CUSTOM_container
                                rows    = 1
                                columns = 2.
    CALL METHOD g_splitter->get_container
                          EXPORTING row      = 1
                                    column   = 1
                          RECEIVING container = g_container_1.
        CALL METHOD g_splitter->get_container
                      EXPORTING row      = 1
                                column   = 2
                      RECEIVING container = g_container_2.
    CALL METHOD g_splitter->get_container
                      EXPORTING row      = 1
                                column   = 2
                      RECEIVING container = g_container_2.
    call method g_splitter1----
    >set_table_for_first_display.
    call method g_splitter2----
    >set_table_for_first_display.
    regards,
    muralii

  • Please send me some sample codes of ALVS  using function modules only

    Hi,
    i am new to alvs
    Please send me some sample codes of alvs using function modules only.
    My mail id is [email protected]
    Thanks & regards,
    hari priya

    hI
    http://www.sapdev.co.uk/reporting/reportinghome.htm SPECIAL FOR ALL ALV PROGRAMS WITH EXAMPLE CODES
    Check the below links :
    http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sap-basis-abap.com/sapab034.htm
    http://www.erpgenie.com/abap/example_code.htm
    These all are very simple ALV programs ,good luck
    <b>Reward if usefull</b>

Maybe you are looking for

  • DYNPRO_SEND_IN_BACKGROUND when submitting a background job, when creating a

    Hi. We create sales orders via EDI.   When certain sales orders are created, we execute user exists on the Sales Order save.  During the User Exit, we submit/create (job_open_adk function, the submit command, and the job_close_adk function) a backgro

  • Quark (5.x)'s "Each page as PS or PDF..."

    Hi, This "built-in" script seems to be completely broken. Does anybody know how to salvage it? I've been working on it for 2 days, and can't get it to create any postscript files. To even get it to run, I have to remove the "Activate" line and every

  • Deploy Error when using Stateful Session Bean inside Webdynpro

    Hi, I'm trying to create a webdynpro project that uses a stateful session bean I have created DC's for a EJB Module project, Enterprise Application and Webdynpro component. Created the bean, built it, added it's package to the public part, added the

  • How do you make an appendix in iAuthor

    How do you make an appendix in iAuthor?

  • Mail as output for Delivery

    Hi     I want to send the delivery output as mail attachment. How can i acheive it?What are the configuration sterps to be done from SD point of veiw and other activities to acheive it? please suggest me. Thanks Arpitha