WDA: TreeByNestingTableColumn and ALV in webdynpro for ABAP

Hi,
1) I am trying to implement a tree with nested structure and multiple columns. I am using RecursionNode in the context and UI element TreeByNestingTableColumn. I am not able to figure out how to make a distinction between the key and parent key. In TreeByKeyTableColumn, we use key and parent key to differentiate. Is there any link which explains how to implement TreeByNestingTableColumn in Webdynpro for ABAP? (I got a link for webdynpro for java though).
2) Can ALV be used to implement a tree structure instead of using Table with TreeByNestingTableColumn or TreeByKeyTableColumn? Then I would be readily able to use ALV features like sort etc. If it can be used is there any link which explains how to do it in Webdynpro for ABAP?

Hi Srinivasa,
I can answer the first point. If you use a recursive node and TreeByNestingTableColumn, there is no need to have a rowKey and parentRowKey, since the recursion with the context already defines the hierarchy. As far as I know someone posted a blog that explains how to use the TreeByNestingTableColumn in Web Dynpro Java. I don't have the link available, but this blog would be good place to start. The implementation in WDA and WDJ is pretty much the same here.
Kind regards,
Thomas

Similar Messages

  • How to make cell editable alv in WebDynpro for ABAP?

    I make Column editable ALV.(See under source code)
    But I can't make Cell editable ALV.
    How to make Cell editable ALV in WebDynpro for ABAP?
    and..how to get changed data?
    DATA: l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    * { EDITABLE
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_input_field     TYPE REF TO cl_salv_wd_uie_input_field,
            lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'TOTAL_COUNT'.
      lr_column->set_cell_editor( lr_input_field ).
      DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= l_value.
      lr_table_settings->set_read_only( abap_false ).

    the code seems to be correct....but where are you writing it?
    put the code in the wddoinit method and it should work.
    have a look at this article..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • Eventing in Portal page between Team Viewer and Custom Webdynpro for ABAP

    We are trying to implement a new Portal page that contains a Team Viewer Iview and a custom Webdynpro for ABAP iview.
    The idea is that the when a manager select one of his direct report in the Team Viewer, the custom Webdynpro for ABAP would pick up the selection_changed event and retrieve the data for the selected employee.
    We followed the instruction provided by SAP in note 1112733 and it worked in our development environment. When we moved the iviews to our testing environment it stopped working.
    I also used the Diagnostic Iviews provided by SAP and I get the same result: Works in Dev, does not work in QA or in Prod.
    We also followed the troubleshooting steps of note 945516 and it still did not help us. We can not find a difference in our system set up.
    We are therefore looking for pointers as to what could be our problem.
    Thanks!
    Edited by: Benoit Fortin on Feb 20, 2009 2:28 PM

    Problem was solved internally:
    The reasons the eventing worked in Dev and not in QA or Prod, was that we had a different level of patch for ESS/MSS between instances, which I was not aware of.
    Dev was on ESS/MSS version 600 SP14 and QA and Prod was on a different level. Once we implemented ESS/MSS SP 14 accross the board, everything was good.
    Edited by: Benoit Fortin on Nov 13, 2009 11:57 AM

  • WebDynpro for ABAP Vs Java

    Hi all,
    I have recently  started learning Web Dynpro for ABAP.
    I have worked in WebDynpro for Java.
    1)I wanted to understand pros and cons of WebDynpro for   ABAP and Java.
    2)What are the functionality that are available in Web Dynpro for Java but not in Web Dynpro for ABAP.
    3)What should be preferred when considering performance issues - WD for ABAP of Java?
    Any Web Log or Link in this context will be helpful.
    Thanks a lot,
    Rashmi

    Hi,
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    see the links below, Understand them and start developing.
    chk out the links below:
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Have a look at these links for OO ABAP.
    http://www.sapgenie.com/abap/OO/
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    SDN Series:
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Basic concepts of OOPS
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    http://www.henrikfrank.dk/abapuk.html
    http://www.erpgenie.com/abap/OO/
    OOPS in ABAP
    oops consept in abap
    ABAP with OOPS
    http://www.abap4.it/download/ALV.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    http://www.erpgenie.com/abap/controls/alvgrid.htm
    OOPS with ABAP
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    http://www.sapgenie.com/abap/OO/
    Regards
    Srinivas.K
    Message was edited by:
            Armin Reichert

  • Webdynpro for ABAP - Textdirection top - bottom ???

    Hi all,
    is there any ui-element which enables textdirection top -> bottom or supprts HTML tags to realize this simple requirement ????
    Thx !!!

    I understand this, but if you implement right->Left and Left->Right you should also think about top->bottom & bottom->top, also there is a FormatedTexView with some HTML support but this has no style and can't be embedded as a Celleditor into the ALV... And also the fixed colors for ALV Cells i don't understand why there should be a limitation of colors for cells in CL_WD_TABLE_COLUMN=>E_CELL_DESIGN
    I really like and enjoy the WebDynpro for ABAP concept but sometimes i feel really sad for such limits like i mentioned because that is basic layout stuff.....

  • Is DD/MM/YYYY supported in webdynpro for abap application

    Hi All,
    We are using 2 different time statements one developed in webdynpro for java and other in webdynpro for abap.date format in java is DD/MM/YYYY but in webdynpro for abap is DD.MM.YYYY.
    is DD/MM/YYYY supported in webdynpro for ABAP application or even if user enters DD.MM.YYYY can we convert that to DD/MM/YYYY so that we will maintain uniformity in both the applications
    Thanks
    Bala Duvvuri

    Hi Bala,
    We can convert the date before saving ,even if the user enters the date as dd.mm.yyyy  as mentioned below.
    DATA: lv_indicator type XUDATFM .
    CALL FUNCTION 'ISH_GET_USER_DATE'
      EXPORTING
        USER_NAME         = SY-UNAME
      IMPORTING
        DATE_FORMAT       = lv_indicator .
    CASE lv_indicator.
        WHEN '1'.                                        " DD.MM.YYYY
          CONCATENATE p_date6(2) '.' p_date4(2) '.'
                      p_date(4)
             INTO p_result.
        WHEN '2'.                                        " MM/DD/YYYY.
          CONCATENATE p_date4(2) '/' p_date6(2) '/'
                      p_date(4)
             INTO p_result.
        WHEN '3'.                                        " MM-DD-YYYY.
          CONCATENATE p_date4(2) '-' p_date6(2) '-'
                      p_date(4)
             INTO p_result.
        WHEN '4'.                                        " YYYY.MM.DD
          CONCATENATE p_date(4) '.'  p_date+4(2) '.'
                      p_date+6(2)
             INTO p_result.
        WHEN '5'.                                        "YYYY/MM/DD
          CONCATENATE p_date(4) '/'   p_date+4(2) '/'
                      p_date+6(2)
             INTO p_result.
        WHEN '6'.                                        "YYYY-MM-DD
          CONCATENATE p_date(4) '-'  p_date+4(2) '-'
                      p_date+6(2)
             INTO p_result.
      ENDCASE.
    Regards,
    Lakshmi.

  • DIfference Between OOPS ALV and WEBDYNPRO FOR ABAP ALV?

    Hi to All,
    i want some information that What is main difference when we develop ALV Report in OOPS and WEBDYNPRO For ABAP.which is good n in what way it is good?
    In the Same way I m also want know that WHICH IS BETTER AMONG WEBDYNPRO FOR JAVA/ABAP.In which way?
    Regards,
    Ravi K

    Thanku for ur valuble Information.
    could u give me information regarding OOPS ALV and WEBDYNPRO FOR ABAP ALV?which is better?is there differences?
    Edited by: ravi k on Mar 26, 2008 12:23 PM

  • Issue regarding cell action in webdynpro for abap alv

    hello gurus,
           i have one requirement in webdynpro for abap alv.i have one alv table in that i have one coloun employee name.
    for that i have provided F4 help and that is editable field.if i select value from F4 help it is getting value correctly and it is showing properly at the same time it is allowing values entered manually insted of from F4 help.but as per my requiremnet it should not allow any manually entered values.how can i get this functinality. i am not aware indepth od WDA.
    could you go through my isssue and could you revert me some solution.
    thanks in advance.

    Hi,
       I dont think this is possible because when you can change the value using F4 then it would obviously be
       possible to enter manually.
       You can try using a drop down instead because in drop down you cannot enter values manually,
       But this would be good if the values that can be shown in drop down are very low, if the values are more
       then again user will face problems selecting values.
       Else you can try out what srinivas suggested, But dont know whether we can have two cell editors at a time
       inside a single cell of ALV. Please post the answer if you have found any other way to do it.

  • In webdynpro for ABAP  alv table issue

    hello gurus,
                      i am new for webdynpro for ABAP.i strucked at one point at designing time.anybody  could you suggest me on this.
    thanks in advance.
    let me explain my scenario first.
    in my webdynpro for ABAP developement i have one alv table having ten fields.i am featching the data for eight fields from one Ztabale and updating , for rest of two fields we need to fill after displaying output using the respective F4 help. Right now these two fields are in input editable mode.now i am getting the values successfully from F4 help and at the same time it is allowing MANUAL ENTRIES also but as per my requirement it  should not allow  any manual entries . for this i have made these two fields are in readonly mode as like as rest of fields to avoid the MANUAL ENTRIES  but at this time i didnot get any F4 helpfor those two fields.
    so how can i achive my goal in this thing could any one suggest me.
    my final conclusion is we need to get only F4 help values into those two fields . it should not allow any manual values at any point of time.
    best regards,
    babu

    ya hi  harshit,
          my self also used same code in my action part . here i have one table with four fields  carrid , connid , fldate , price.
    for carrid i have created freely programmed search help.but if it is in display mode there is no F4 help in enable mode.
    in context for attribute carrid
    DATA lo_nd_flight TYPE REF TO if_wd_context_node.
      DATA lo_el_flight TYPE REF TO if_wd_context_element.
      DATA ls_flight TYPE wd_this->element_flight.
      DATA lt_flight TYPE wd_this->elements_flight.
    navigate from <CONTEXT> to <FLIGHT> via lead selection
      lo_nd_flight = wd_context->get_child_node( name = wd_this->wdctx_flight ).
      select connid fldate price from sflight into CORRESPONDING FIELDS OF TABLE
        lt_flight UP TO 20 ROWS.
    @TODO handle non existant child
    IF lo_nd_flight IS INITIAL.
    ENDIF.
    get element via lead selection
    lo_el_flight = lo_nd_flight->get_element( ).
    alternative access  via index
    lo_el_flight = lo_nd_flight->get_element( index = 1 ).
    @TODO handle not set lead selection
    IF lo_el_flight IS INITIAL.
    ENDIF.
    get all declared attributes
    lo_el_flight->get_static_attributes(
       IMPORTING
         static_attributes = ls_flight ).
    CALL METHOD lo_nd_flight->bind_table
      EXPORTING
        new_items            = lt_flight
       set_initial_elements = ABAP_TRUE
       index                =
    DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage.
    DATA: lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
        instantiate ALV component usage if necessary
      lo_cmp_usage = wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
        pass reference to data node to instance of ALV usage
      lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
      lo_interfacecontroller->set_data( r_node_data = lo_nd_flight ).
    Configure ALV
      DATA lr_config TYPE REF TO cl_salv_wd_config_table.
      lr_config = lo_interfacecontroller->get_model( ).
    **declerations
      DATA: lt_columns TYPE salv_wd_t_column_ref,
            ls_columns TYPE salv_wd_s_column_ref,
            lr_input TYPE REF TO cl_salv_wd_uie_input_field,
            name TYPE string,
            lt_node_info TYPE wdr_context_attr_info_map,
            ls_node_info TYPE wdr_context_attribute_info,
            lv_tabix TYPE sy-tabix,
            lr_info TYPE REF TO if_wd_context_node_info.
      TYPES: BEGIN OF ty_name,
              name TYPE string,
             END OF ty_name.
      DATA: lt_name TYPE TABLE OF ty_name,
            ls_name TYPE ty_name.
    **for getting node info
    *Get the context node information
      lr_info = lo_nd_flight->get_node_info( ).
      lt_node_info = lr_info->get_attributes( ).
      LOOP AT lt_node_info INTO ls_node_info.
        CASE ls_node_info-name.
          WHEN 'CARRID'.
            ls_name-name = ls_node_info-name.
            APPEND ls_name TO lt_name.
         WHEN 'REGIONALOFFICER'.
           ls_name-name = ls_node_info-name.
           APPEND ls_name TO lt_name.
         WHEN 'INSPECTORNAME'.
           ls_name-name = ls_node_info-name.
           APPEND ls_name TO lt_name.
        ENDCASE.
      ENDLOOP.
    *Logic for  Table Horizontal Scrolling
      lr_config->if_salv_wd_table_settings~set_visible_row_count( 13 ).
      "  lr_config->if_salv_wd_table_settings~set_width( '1085' ).
      lr_config->if_salv_wd_table_settings~set_width( '100%' ).
      lr_config->if_salv_wd_table_settings~set_scrollable_col_count( 8 ).
      "  lr_config->if_salv_wd_table_settings~set_fixed_table_layout( abap_true ).
      lr_config->if_salv_wd_table_settings~set_first_visible_scroll_col( 'CARRID' ).
      lr_config->if_salv_wd_table_settings~set_cell_action_event_enabled( abap_true ).
    Set the table editable .
      DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= lr_config.
      lr_table_settings->set_read_only( abap_false ).
      lr_table_settings->set_read_only( abap_true ).
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lt_string TYPE STANDARD TABLE OF string,
            ld_string TYPE string,
            ld_int TYPE i,
            lv_index TYPE i.
    Make few columns editable and attach inputfield, if permitted.
        DATA lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.
        CLEAR lt_string.
        APPEND 'CARRID' TO lt_string.
        LOOP AT lt_string INTO ld_string.
          lr_column_settings ?= lr_config.
          lr_column = lr_column_settings->get_column( ld_string ).
          CREATE OBJECT lr_input_field
            EXPORTING
              value_fieldname = ld_string.
          lr_input_field->set_read_only( abap_true ).
          lr_column->set_cell_editor( lr_input_field ).
        ENDLOOP.
        CLEAR lt_string.

  • Webdynpro for abap and single sign on

    I have developed application using webdynpro for abap and it is working fine. The problem is we can not get sso working . i.e. even though we configure SSO but still getting the screen asking to login into
    sap web application server again
    This is the 1st wda we have developed and not sure whether we can apply SSO with wda as it is find with webdynpro for Java. The basis team has gone thru all the configurations and could not understand why it did not work.
    Thank you in advance.

    Thank you for your quick response.
    1. Is the portal certificate added to Backend ? - yes
    2. Is the Backend and Portal in Same Domain ? - yes
    3. Are you accessing the Portal using FQDN ? - No, we use web dispatcher to redirect. But the same result if we access Portal using FQDN.

  • Diff between BSP and WEBDYNPRO FOR ABAP?

    Hi All,
    can anyone let me know the Difference between BSP's and WEBDYNPRO FOR ABAP.
    Regards,
    Ravi

    Hi Ravi,
    In truth, Web Dynpro contains many of the enhancements than BSPs....like built-in value-help and select options...... they
    will become standard in Web Dynpro. But these can also be added to BSPs also.
    There are several architectural differences between BSP and WDA. WDA has some advanced features but more restrictive framework compared to BSP.
    WDA is stateful only. While BSP supports both stateful and stateless programming models.
    WDA doesn't aloow us to use our own custom HTML, JavaScript or other controls. To provide compatibility the rendering logic is completely hidden from the developer.
    On the other hand, BSP has no such restrictions and allows an extreme level of custom rendering. This makes BSP a perfect platform for applications that require pixel-perfect layout or specialized UI elements.

  • Webdynpro for ABAP - Popup apearing for userid and pwd

    Hi Experts,
    We have implemented ESS and gone live. Now we have created one custom application in webdynpro for ABAP and attached with portal.
    Initially there was a problem, the application was not getting executed because of system configuration, then I have configured the host name, port number correctly. Then the iView is getting loaded in the portal.
    The problem is, when I am trying to access the iView, the popup apearing for the user id and password. This is happening only the webdynpro abap application, this is not happening for all sap standard iViews.
    Could anyone help me with this issue?
    Thanks
    Jay

    Hi Jayanthi,
    as you had mentioned this is not happening for sap standard iViews(do you mean simple transaction iViews for which you have used a system alias, which was the same you had used for ABAP web dynpro iview)?
    Of courese ESS iViews works with their own JCOs which is no way helpful or connected with wd ABAP.
    So I believe if your SAP id and Portal id are different(or if they are same but SAP Logon ticket is not configured properly) then only it woudl ask for the authentication again- for Wd ABAP to work fine, only the connector property  and WAS to tbe configured in the system object(aka system alias) used for ABAP iview. Now once you enter the login credentials, it is working fine right, then could you please test the user mapping under the user you are logged in, select the alias that you had used while creating the abap wd iView and provide userid/password here, then run the wd ABAP application, it definitely would work.
    N.B: if you had provided the credentials once, then it woud be stored in the browser cache, so if you perform the user mapping in user admin, log off from portal, close all your browser windows, then clear cache,(cookies etc). then login to portal, run the wdABAP application, I am sure this would work(it worked for me!!!).
    Thanks,
    Jakes.

  • Any difference between webdynpro for java and webdynpro for abap ?

    Hi all:
       I would like to build one small system in EP.
       I can choose to use webdynpro for java and webdynpro for abap.
       I would like to ask any major difference between webdynpro for abap and webdynpro for java ?
       Is fpm supported in webdynpro for abap ?

    Hi,
    see this thread,
    ABAP Vs JAVA WebDynpro
    Regads,
    J.Joe

  • Webdynpro for ABAP and Portal Integration

    Hi Experts,
    we created a WebDynpro  for ABAP application for portal. The application will modify/update few fields in backend sap HR table PA0006 (infotype 6) . The end user (portal user) should be able to update his data in backend with the iview created on this application.
    I have below two questions in my mind.
    1. Do we need portal eventing for this? It's a single iview in portal which will fetch and update his data through this WebDynpro  for ABAP application.
    2. It is for 10 countries of almost 1000 users (with same userid in portal and backend). How can I make sure that the enduser updates and fetch his records only. The SSO is already set up between Portal and Sap ECC system. Do I need to again pass the enduser portal id to the sap in coding to fetch and update the data or sso will take care of itself.
    Thanks
    Ajay

    1. Do we need portal eventing for this? It's a single iview in portal which will fetch and update his data through this WebDynpro for ABAP application.
    Answer: If you use, for exemple ITS to access this Webdympro, you will not need any action on portal for sure. Actually you will just need actions on portal, if you want to make some customization on portal side. If you want just show the Webdympro how it is, your action are all on backend..
    2. It is for 10 countries of almost 1000 users (with same userid in portal and backend). How can I make sure that the enduser updates and fetch his records only. The SSO is already set up between Portal and Sap ECC system. Do I need to again pass the enduser portal id to the sap in coding to fetch and update the data or sso will take care of itself.
    If you access via ITS, te custome will acess the backend with the user you have set on the SSO or user-mapping. The portal there is nothing to do in this regards, you must just take care of this on backend.
    Please evaluating the answer you are contributing for the SDN keep growing.
    Edited by: Fabio Sarmento on Sep 19, 2011 2:41 PM

  • Webdynpro for ABAP  and Workflow

    Hi All,
    I have few applications developed in WebDynpro for ABAP. Now I have the following  requirement in one of my application. I am creating some new entries in the custom table based on the user inputs and actions. Before creating a new entry some one needs to approve that. Once the approval is done I have to  create a new entry.
    I came to know that this can be achieved using workflow. I have no much idea on workflow. Could someone suggest me how I can achieve that please?
    Thank You,
    Suresh.

    Hello,
    Use transaction : SWFVISU  and maintain the task and the corresponding webdynpro application (parameters if any).
    Register UWL with workitem handler and configure UWL.For details,
    http://help.sap.com/saphelp_nw04/helpdata/en/45/a7863f445f4617e10000000a114084/frameset.htm
    Each task is a activity in simple terms.For details, please refer help.sap.com inorder to create a workflow.
    Hope this helps.
    Best Regards,
    Saujanya

Maybe you are looking for