ALV Tree in WebDynpro ABAP

Hi,
In my present project we have requirement for developing ALV tree output using ALV configuration model in WD4A. Please provide sample code or tutorial related to ALV Tree development in WebDynpro ABAP.
Best regards,
Alleiah

There is no hierarchy of nodes when building an ALV or Table Tree in WDA.  You still provide a flat structure of a single node.  What you do is specify certain columns to be hierarchy columns.  The framework then builds a sorting/grouping around these columns and turns them into the "pesudo nodes" of the tree. 
This can be done via configuration or via coding:
http://www.flickr.com/photos/tjung/2802287945/
For instanace, taking the same flat SFLIGHT structure I can just define certain columns and create two different hierarchies:
http://www.flickr.com/photos/tjung/2802287971/
http://www.flickr.com/photos/tjung/2802287989

Similar Messages

  • How can I change column name in ALV table in WebDynpro ABAP?

    Hi Everyone,
    I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
    Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
    Please let me know how can I change the name of the column.
    Regards

    Hi,
    This may help you to define your own column text in the ALV Table of webdynpro.
    see the below code.
    Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
    "change the label of the report.
    DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
    CALL METHOD l_value->if_salv_wd_column_settings~get_column
    EXPORTING
    id = 'STATUS_ICON'
    RECEIVING
    value = lr_weeknum.
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    regarads,
    balu

  • Hierarchical ALV Report in webdynpro abap

    Hi Experts,
    I'm facing the trouble with requirement as below. Please help me to resolve this issue.
    Output as:
    Material Number                         Description               Created Date
    - 10001(Header data)                      abc                         09-09-2013  
              1001 (item level data)            abc                         10-09-2013
              1002                                   xyz                          11-09-2013
              1003                                   xyz                          11-09-2013    
    - 10002(Header data)                      abc                         09-09-2013  
              2001 (item level data)            abc                         10-09-2013
              2002                                   xyz                          11-09-2013
              2003                                   xyz                          11-09-2013    
    - 10003(Header data)                      abc                         09-09-2013  
              3001 (item level data)            abc                         10-09-2013
              3002                                   xyz                          11-09-2013
              3003                                   xyz                          11-09-2013    
    .... and so on...
    - when I expand on header Materail number, it has to be display with item level data with   in alv report in webdynpro abap.
    Looking forward your valuable comments.
    Regards,
    Venkat

    Hi Venkat,
    We can achieve the  HIERARCHY through the following code.In this case I have used  CARRID as the drill down column.
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_flight_tree( ).
    if lo_cmp_usage->has_active_component( ) is initial.
       lo_cmp_usage->create_component( ).
    endif.
    DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
    lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_flight_tree( ).
       DATA lv_value TYPE ref to cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
    lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_DISPLAY_TYPE(  IF_SALV_WD_C_TABLE_SETTINGS=>DISPLAY_TYPE_HIERARCHY ).
    "Enable HIERARCHY structure
    data lr_col type ref to CL_SALV_WD_COLUMN.
    lr_col = lv_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'CARRID' )." Enable HIERARCHY for the col. specified
    lr_col->IF_SALV_WD_COLUMN_HIERARCHY~SET_HIERARCHY_COLUMN( ABAP_TRUE ).
    Regards,
    Harsha

  • ALV tree without using abap objects---------urgent

    hi
    can anybody send  me code for making alv tree without using ABAP objects.
    thanks in advance
    Aditya

    HI
    goto this link
    you will get all ALV TREE programs
    follow that code you can understand very easily
    http://www.sapdev.co.uk/reporting/alv/alvtree.htm
    <b>Reward if usefull</b>

  • Editing rows and columns in alv reports in webdynpro abap

    how edit row and columns in webdynpro abap ?
    can i add colors to salv repotrs for below and above range of values  how ?
    if possible send source code for it.............

    hi
    check out this link for editing the columns of ALV
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b
    check out for this thread as well for coloring ALV
    Coloring of selected table cells: Ideas wanted
    regards,
    amit

  • Expand tree in WebDynpro ABAP application

    Hi,
    Currently I am working on a WDA application which contains a UI ELEMENT TREE. The tree is generated dynamically at runtime.
    I was guided by the example of SAP "WDT_TREE". After generating the tree looks like this:
    TREE
       | __ NODE1
               | __ LEAF1
               | __ LEAF2
               | __ NODE2
                    | __ LEAF3
               | __ Node3
                    | __ LEAF4
                    | __ LEAF5
                    | __ LEAF6
    Now I have bound the "expanded" property of the node to a context element and execute the following action in the WDDOINIT:
    * Fill tables with the structure of the tree
      fill_foldertable( ).
      fill_filetable( ).
      lr_current_node    = wd_context->get_child_node( 'FOLDER' ).
      lr_current_element = lr_current_node->create_element( ).
      lr_current_node->bind_element( lr_current_element ).
      lr_current_node->set_lead_selection( lr_current_element ).
      lr_current_element->set_attribute( name = 'TEXT' value = 'Products' ).
    lr_current_element->set_attribute( name = 'IS_EXPANDED' value = 'X' ).
    * Create the root node
      create_node(
        EXPORTING
          cur_element = lr_current_element
          parent_key  = 'Categories' ).
    Now the tree is expanded, but i can't see EAF1 and LEAF2. I get them only by clicking again on node1.
    Any ideas?
    Regards.

    Hi All,
    I found the solution for my question.  Expand tree in Webdynpro application
    Soultion
    In the context node i.e used as a source for tree, you create a attribute
    Attribute Name: IS_BOOLEAN
    Attribute type : WDY_BOOLEAN
    Default Value : X
    And in Context node Un check the Initialization lead selection.
    Now bind the Expand property of TreeNodeType with 'IS_EXPAND' which you have created just now.
    This way the whole tree will be expanded.
    Regards,
    Pavan Maddali

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • How place an company logo in alv repots in webdynpro abap

    in webdynpro how to place a image in alv reports at particular corner .

    Hi,
    Check out this link -
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/86/641b88c9034eebacb26ba7fbb17981/frameset.htm
    Get the ALV header using the model(cl_salv_wd_config_table) object.
    using this header object use the method to set the image SET_IMAGE_SOURCE.
    Regards,
    Lekha.

  • ALV Component in Webdynpro ABAP

    Hi,
    When ALV is in edit mode, there are four default actions (buttons) in the toolbar of ALV - 'Check', 'Append row', 'Insert row' and 'Delete row'. I just want to know that when 'Append row' is clicked, Which event is triggered.
    I need this to set some default values in the cells of newly inserted row.
    Regards,
    Gaurav

    try this question in Webdynpro forum, you may get a quicker response.
    Regards
    Raja

  • ALV Tree Output

    Hi,
    In my present project we have requirement for developing ALV tree output using ALV configuration model in WD4A. Please provide sample code or tutorial related to ALV Tree development in WebDynpro ABAP.
    Best regards,
    Alleiah

    Hi Alleiah Marabathini ,
    The following r excellent websites containing ONLY PDF docs on ALV Tree in WebDynpro ABAP:
    Simple Example for Using ALV in Web Dynpro for ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d
    Programming the ALV Configuration Model in Web Dynpro for ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9
    Editing ALV in Web Dynpro for ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
    Using Events with ALV Tables in Web Dynpro for ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8
    Using ALV with a Dynamic Context Node in Web Dynpro for ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783
    cheers!
    gyanaraj

  • Webdynpro ABAP ALV tutorial - simple update or use changelog ?

    I was working through the alv tutorials for webdynpro abap, and while trying to complete the
    "Editing ALV in Web Dynpro for ABAP", I got to page 8 of the pdf document where it explains how to do the ONDATACHECK event handler, and it comments out the portion for updating/saving the data (as noted below), and does not explain anything further about the save.
    * save data to database
    {* update... => only simlate, to not change the flight data model
    * content!
    Now, I am new to webdynpro abap, and don't know if I am supposed to utlize the changelog for this, or if a simple update will work.
    Any Ideas ?

    Thank you for your answer - I am guessing from your response that a method would need to be built - similar to one which I found in the SWDP_DEMO_TUTORIALS for a webdynpro called WDT_TABLE (see below) - where a check of the table changes would need to be made before an update to the table - rather than a simple one line update statement placed at that point in the code.
    METHOD save_changes.
      DATA: table_node           TYPE REF TO if_wd_context_node,
            read_sbook           TYPE
    if_componentcontroller=>elements_sbook_node,
            aux_read_sbook       TYPE
    if_componentcontroller=>elements_sbook_node,
            wa_read_sbook        TYPE LINE OF
    if_componentcontroller=>elements_sbook_node,
            context              TYPE REF TO if_wd_context,
            change_line          TYPE LINE OF wdr_context_change_list,
            changes              TYPE wdr_context_change_list,
            aux_changes          TYPE wdr_context_change,
            lv_change_tab_size   TYPE sy-tfill,
            aux_string           TYPE string,
            lv_node_size         TYPE sy-tfill,
            aux_div              TYPE int4,
            aux_index            TYPE i,
            l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager,
            text                 TYPE string,
            it_int TYPE STANDARD TABLE OF i WITH KEY table_line.
    * check whether context has changed
      context = wd_context->get_context( ).
      changes = context->get_context_change_log( ).
      LOOP AT changes INTO aux_changes.
        IF aux_changes-change_kind = 'A' AND aux_changes-node_name = 'SBOOK_NODE'.
          INSERT aux_changes INTO TABLE wd_this->sbook_delta.
        ENDIF.
      ENDLOOP.
    * get the complete context in 'read_sbook' table
      table_node = wd_context->get_child_node( name = 'MY_BOOKING_NODE' ).
      table_node = table_node->get_child_node( name = 'SBOOK_NODE' ).
      table_node->get_static_attributes_table( IMPORTING table = read_sbook
    * get the size of table and changes
      DESCRIBE TABLE read_sbook LINES lv_node_size.
      LOOP AT wd_this->sbook_delta INTO change_line.
        APPEND change_line-element_index TO it_int.
      ENDLOOP.
      SORT it_int.
      DELETE ADJACENT DUPLICATES FROM it_int.
      DESCRIBE TABLE it_int LINES lv_change_tab_size.
    * get message manager
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
    * decide which way to update databse
      IF lv_change_tab_size <> 0.
        aux_div = lv_node_size / lv_change_tab_size.
        IF aux_div <= 3.
    * write complete table to database
          lv_change_tab_size = lv_node_size.
          CL_WDT_FLIGHT_MODEL=>write_sbook_complete( read_sbook ).
        ELSE.
    * write only the changed records to database
          LOOP AT it_int INTO aux_index.
            READ TABLE read_sbook INDEX aux_index INTO wa_read_sbook.
            APPEND wa_read_sbook TO aux_read_sbook.
          ENDLOOP.
          CL_WDT_FLIGHT_MODEL=>write_sbook_records_changed( aux_read_sbook )
        ENDIF.
        REFRESH wd_this->sbook_delta.
        REFRESH it_int.
        wd_this->sbook_changed = abap_false.
    * report message
        aux_string = lv_change_tab_size .
        IF lv_change_tab_size = 1.
          CONCATENATE aux_string 'record written to database' INTO text.
        ELSE.
          CONCATENATE aux_string 'records written to database' INTO text.
        ENDIF.
        CALL METHOD l_message_manager->report_success
          EXPORTING
            message_text = text.
      ELSE.
    *  report message
        CALL METHOD l_message_manager->report_success
          EXPORTING
            message_text = 'there are no changes to be written to database'.
      ENDIF.
    ENDMETHOD.

  • Regarding Tree structure display in Webdynpro ABAP

    Hi Experts,
    I am very new to webdynpro ABAP , I was asked to implement some functionalities of RWBE transaction in webdynpro , in RWBE transaction list can be displayed as Tree structure , in webdynpro how i can implement this ? using ALV UI element is it possible . Please help .
    Regards,
    Ratheesh BS

    Hi ,
    I need an output like the below
    <material number                 a1           a2        a3
              < plant                       b1          b2        b3
                 . org                        c1          c2        c3
    <material number                 A1          A2       A3
    is it possible to show the output as in this format using ALV ?.
    I have tried with the help provided by SDN , but not succeed .
    also i need to capture double click event and show the currosponding result in a seperate view.
    here material number is the parent node , plant and org were child nodes
    Regards,
    Ratheesh BS
    Edited by: Ratheesh Bhaskaran on Oct 7, 2008 4:22 PM
    Edited by: Ratheesh Bhaskaran on Oct 7, 2008 4:26 PM
    Edited by: Ratheesh Bhaskaran on Oct 7, 2008 4:29 PM

  • How to disable Print button on WebDynpro ABAP ALV

    In WebDynpro ABAP, a standard menu appears around the ALV,  that has a PRINT button and an EXPORT button.
    Is there anyway to disable those buttons????
    Thanks
    John

    Hi John,
    Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
    Also refer : Removing "print version" button in alv
    How to hide Print and Filter option from dynamic ALV

  • Error in Webdynpro ABAP Table Tree

    Hi,
    I am using Table UI element in Webdynpro ABAP. I am showing data in tree format using element Treebykeytablecolumn.
    I have full tree structure loaded in begining of the code so don't need to load child on expansion of key. Since I have data already loaded, am setting attribute CHILDREN_LOADED as true.
    First row comes in table perfectly, but on expansion its giving error "The Entered Value Is Not on the List of Valid Values." Please  let me know your valuable input on this.
    Thanks and Regards,
    Praveen.

    Hi Shaira,
    I have removed all values from table and left only row key and Parent key then also I am getting the same issue. Could you please let me know what kind of data mismatch can be. Please let me know some example, if you have faced this issue.
    Thanks and Regards,
    Praveen.
    Edited by: Praveen Kumar on May 19, 2011 7:17 AM

  • Webdynpro ABAP -- ALV  Layout setting

    Dear all,
    In my development with ALV in Webdynpro ABAP, I want to save the ALV layout via Setting. but it seems that the layout only can be saved as user-specific, is it any possible to use it as the gobal one?
    Please kindly provide me some hints. Thanks in Advance.
    Best Regards,

    Hi,
    Yes you can make it global in administrative level.
    1.In SE80 ,Double click on the name of  your Web Dynpro Application .
    2.Select Web Dynpro Application  Menu .
    3.Select Test->-> Execute in Administrative Mode from the menu.
    Your application opens in administrative mode .
    Go to the ALV settings make the changes and save it as some variant.
    This layout will be default and global to all the users.
    Regards
    John Paul

Maybe you are looking for

  • Issue in running JavaFX application in web browser

    Our team currently was developing a desktop application which now needs to be run in a web browser. Deployment is successful, but while running it in IE 8, the background color of the IE outside the stage (from the desktop application) is coming in g

  • Viewing the Source on external monitor

    Hello I and using Premiere Pro 6 on a Mac Pro with a Decklink Extreme HD card. I can view the Program on the external monitor through my Decklink card without a problem but when I switch to Source monitor I can't. I regularly did this in Final Cut Pr

  • WXGA laptop resolution problems

    Ok everybody, here is my problem, in detail... I am unsure if this is a config problem or a driver problem, but on the offchance that it is fixable, I will post here. My laptop has a WXGA 17" widescreen, Geforce FX Go5200, and a native (windows) reso

  • How to format floats (or doubles ) but not converting to String?

    Hi everybody, my question is simple: I have a number,lets say 51,4567321 and i want to format it ,as a float or double ,as 51,45. One way is to do: float x=((hits * (float) 100) / this.getAccesses()); DecimalFormat perCentFormatter = new DecimalForma

  • How do I change to a different browser?

    I am working on an eMac with Panther 10.3.9. I have trouble with some internet sites and Safari quitting unexpectedly, how do I go about changing from Java to another browser. I am hoping to install Tiger 10.4 soon so would it better to wait until th