Delete context node

Hi all,
how can I delete a dynamically created context node by runtime?
I want to delete the node completly not just invalidate its elements list. Moreover I want to delete a certain node so the method reset() for the context is not useful here.
Thanks in advance for all answers,
Regards,
Torben

Hi Val,
Thanks for the update.
Regarding the reset method: I am trying to use the reset() method before I am recreating my dynamic context but I when I recreate my dynamic context I receive an error: "Cannot add element with duplicate ID "addText0" as if it still exists. Any idea why it's not being destryoed?
Message was edited by:
        Roy Cohen

Similar Messages

  • How to delete the context node in BSP Component?

    Hi,
    I have created a custom context node in one of the components : BP_BPBT.
    Now, I want to delete the context node..
    Could you please tel me, how can I do that?
    Thanks,
    Sandeep

    Hi Sandeep,
      Please check the below link.
    [How to delete Context Node;
    Regards,
    Lakshmi.Y

  • Context node deleted

    Hi Gurus,
    Am new to the Web UI developmoent.
    When i was working on the requirement of getting an existing view from a Zcomponent A to Zcomponent B ,
    the steps which i followed after going through many threads on sdn , was
    u2022Add View to Window: Open the Window node, find your window,
    right click on it and choose Add View.
    u2022Add Component Usage: Open the Component Usages node,
    right click on Component Usage and choose Add Interface View.
    u2022 Added the code in ' WD_USAGE_INITIALIZE ' method.
    No am facing 2 major issues :
    1) when i added the the view in the configuration part, it is throwing an exception which tells -
    Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTORDER' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Initialization of view ZTOP_OPPORT/MyOpptResult of UI Component WCC_SLS_HOME failed
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTORDER' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Cannot display view WCC_SLS_HOME/SalesHome of UI Component WCC_SLS_HOME
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTORDER' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Window MainWindow of UI Component WCC_SLS_HOME cannot be displayed
    An exception has occurred Exception Class  CX_BSP_WD_RUNTIME_ERROR - View ZTOP_OPPORT/MyOpptResult in component WCC_SLS_HOME could not be bound 
    Method:  CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW 
    2) secondly i tried re-creating the existing view which i added in the std Component B window.
    But when i deleted the view n created again it , now i see that the context node of that view in the z component is deleted.
    Deletion of the context node-  is it because i tried deleting the view in the window of the standard component which i added????
    Please let me how do i go about this..

    Hi seema rajjot
    Please check the CTXT class variables , there is a possibility of existing the context node that you created delete that entry manually from there.
    After deleting from there go to CREATE_CONTEXT_NODES method there you will see entry for context node class creation with name CREATE_YOUR CONTEXT NODE NAME, delete that entry manually.
    process to delete the component enhancement.
    Step 1
    First delete the View enahncement, select your view right click on it select delete, while deleting you must be bit catious a pop up will come with standard classes and Z classess there you have to select only Z classes.
    Step 2
    Once View enhancement is deleted delete the Component enahncement.
    if you created any Runtime repository entires or View configuration with your custom fields then first you have to delete those view and runtime repository configuration and then perform the above two steps
    Thanks & Regards
    Raj

  • Delete Dynamic context nodes?

    I have created Context nodes dynamically,, I want to delete few nodes dynamically itself.
    wdContext.getContext().reset(true)   would delete entire dynamically created nodes..... but i want to delete particular nodes...
    can any 1 help me regarding this....
    thanku

    Try
    wdContext.removeElementAt(index)
    or
    wdContext.removeElement(IWDNodeElement)
    Regards, Aldo.

  • How to delete a dynamically created context node ?

    Hi
      I have created a context node dynamically and have added the check boxes to the node.
      But when i am refreshing the page it is giving me the following excepiton:
    com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(DwdReportView.Person): duplicate name for attribute attr1
    I am writing the following code in wdDoExit() method so that the node is invalidated  and all dynamically added nodes and attributes are destroyed from the metadata.
    The code  is :
         wdContext.getContext().reset(false);
    or
         wdContext.getContext().reset();
    or
                         wdContext.nodeName().invalidate();
    I have tried all the above mentioned code  snippets but it is still giving me the same exception.
    Please help me  resolve this issue.
    Thanks in advance.
    Regards
    Shaily

    Shally,
    A better forum to place your question is the forum.
    To your question: the wdDoExit() method is only called once i.e. when the view is destroyed from memory. Just like the wdDoInit() mehtod is called only once at initialisation of the view.
    Try refactoring your code, so that upon initialising of your context, the old version of it is removed.
    Hope this helps.
    Regards,
    Alain

  • Error while generating the context node

    Hi ,
    Requirement is to add the marketing attribute field under the Account details overview Page. As the field was not available in the context node i have added a new context node in the Account details. I used the wizard and added the context node BuilmktattributeRel so as i can add "Attribute set" under the BP overview page."
    Now after adding the context node and while executing i am unable to see the overview view page, i am getting an error :
    1. Component GET_ATTRIBUTE does not exist
    2. Determination of BOL attributes failed
    Also i am unable to regenrate the GET_I_method. If i want to delete the Zcontextnode, i am unable to do so.
    Kindly help me with the technical approach to add the context node in the overview page.
    Thanks in advance,
    Sunil

    One thread would have been sufficient.
    Error while generating the context node

  • Cannot remove context node

    Hi!
    I have 2 views and I navigate forth and back. On the second view I am creating a context node dynamically in method HANDLEFROM_INPUT_VIEW. Everything works fine for the first time. However, if I go back from the second view to the first one and then again navigate to the second view, the system attempts to create the new node with the same name like the existing one and I get a short dump (an exception cx_wd_context=>child_already_exist).
    I tried to delete the existing node by using the below code, which I placed in methods WDDOINIT, HANDLEFROM_INPUT_VIEW (before creating the node), ONACTIONBACK and WDDOINIT, but it didn't help. What can I do?
      DATA: lr_info    TYPE REF TO if_wd_context_node_info.
    * delete existing node (if there is one)
      TRY.
        lr_info = wd_context->get_node_info( ).
        lr_info = lr_info->get_child_node( 'DB_TABLE' ).
        lr_info = lr_info->get_parent( ).
        lr_info->remove_child_node( 'DB_TABLE' ).
      CATCH cx_root.
      ENDTRY.
    Thanks in advance!
    KR,
    Igor

    Hi, Lekha,
    I tried with no success. I debugged it and saw a strange result. Here is the new code:
    TRY.
        lr_node = me->wd_context->get_child_node( 'DB_TABLE' ).
        lr_node->invalidate( ).
        lr_info = me->wd_context->get_node_info( ).
        lr_info = lr_info->get_child_node( 'DB_TABLE' ). "test to see is there such node
        lr_info = lr_info->get_parent( ).
        lr_info->remove_child_node( 'DB_TABLE' ).
      CATCH cx_root INTO lr_error.
        l_error_text = lr_error->get_text( ).
      ENDTRY.
    lr_info object seems consistent in debugger, lr_info->get_child_node( 'DB_TABLE' ). returns a valid object, but later the statement lr_info->remove_child_node( 'DB_TABLE' ). fires exception which says: Static Node ZTEST_COMPONENT#OUTPUT_VIEW.CONTEXT Cannot Be Deleted. But I am trying to remove 'DB_TABLE'. Why am I getting message as if I was trying to delete the entire context?
    KR,
    Igor

  • ICWC: table shows all attributes of context nodes instead of the configured

    Hi,
    after adding an attribute by the assistant (from a BOL-relation of the root object) and setting it to the configuration, the table shows ALL attributes (~20) of the context node. With F2 in the browser I can see, that the right configuration was found (with 5 attributes). Clicking the customizing  icon of the table, the popup is showing the configured attributes. Doing a "Set to default" has no result.
    Removing the added attribute: no change.
    Removing all attributes: no change
    Deleting the configuration and create a new one with the same name: no change
    Please help!!!
    Thanks,
    TW

    Hi everyone,
    the previously described problem could be solved by removing the enhancement of the View and creating a new configuration. The creation of only a new configuration has not solved the problem. However, removing a view enhancement can not be the solution for such a problem!
    Now again we have the problem after adding an attribute at the context node used for the table, the configuration seems to be damaged and the filtering of the attributes does not work. Thus, all available attributes are used. Debugging in the htm-tag has shown that the XML for the configuration is correct and read in the view. Further debugging has not shown any exceptions or any hints on the weird behavior.
    Had anyone of you the same or a similar experience and solved this in another way than removing the enhancement of the view?
    With best regards,
    Kai Lienemann

  • How to modify the data of Context Node of type table in BSPCOMP WB

    Hi,
    I have context node which is of table type. Now, beofre displaying the table, I have to delete few entries from this context node.
    Could you please help me out, how exactly I can handle this?
    Component: BP_DATA (Enhanced)
    View: MarketingAttributesEOVP
    Context Node: ATTRIBUTES 
    Thanks,
    Sandeep

    Make use of ON_NEW_FOCUS method of the context node to achieve the same. Get the collection first and then iterate it remove the entities which are not needed and then set the rest of the collection. You can also check standard code for reference.
    Rg,
    Harshit Kumar

  • Delete Context Attribute dynamicalluy

    Hi,
    We have a requirement where context attributes have to be created and deleted dynamically based on number of parameters. Dynamic creation part is ok but i don't know how to delete context attributes dynamically. I'm using NWDS04 sp16.
    Any help is appreciated.
    Regards,
    Abhinav

    from https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/IWDNodeInfo.html
    <i>
    Node infos also provide a mean to dynamically add child nodes (there are different methods for unmapped, mapped and recursive nodes) or attributes (unmapped or mapped, several methods to add attributes automatically from external meta data). You cannot remove such nodes or attributes afterwards, you can only reset the whole context to its initial state via IWDContext.reset(boolean).
    </i>

  • How to use attributes from different context nodes in one view?

    I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
    However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
    Is this really the only way? Please advise on possible code and insertion point.

    Any suggestions?

  • Error while genetrating gettter method on Context node attribute

    Hi,
    I am working in SAP CRM 7.0 Ehp1.Now I need to create get_p_a and set_p_a method
    on context node attribute.But while selecting attribute and clicking on right and selecting
    on generate P-Getter,getting an error (error message - View not copied or enhanced with wizard; processing not possible).
    This is a custom context node attribute and need to create gettter,setter method.
    Kindly assist on this or suggest is there any way to create method on required context node attribute.
    Regards
    Viren

    Hi there,
    Creation of Getter  Setter is not possible for the AET Generated Views and Components.
    It seems your view is generated using AET Table enhancement feature of Ehp1 and the context node is thus a based on a Z BOL object created by a feature of AET of Ehp1
    For such context node, generation of getter setters is not  possible with right click.
    If you need any of GET_ , SET_, GET_P_ or GET_V , then you need to copy the GET_P_XYZ etc method you find on context node class.
    Hope this helps
    Thanks & Regards
    Suchita

  • Reading Attributes from different context nodes in the same view

    Hi,
    I have added a new field as part of an enhancement for Trade Promotions. This field is a checkbox and part of the context node TRADE in the view TPMOE/HeaderEOF. This field will be checked or unchecked using a logic in the background.
    The logic will be based on an attribute (Fund Plan ID) which is part of another context node FUNDPLAN in the same view.
    How can I read the attribute of FUNDPLAN context node in TRADE context node?
    A sample code will be quite helpful as I am new to CRM 2007.
    Thanks,
    Abhishek
    Edited by: Abhishek  Periwal on Oct 16, 2008 2:35 PM

    Hi Abhishek,
    If I understand your question correctly, you would like to access the Fund plan ID (in a different context node) in the getter setter methods of the check box attribute which you have added.
    The code snippet mentioend by sudeep works perfectly fine when you are making any checks in the view implementation class. But since you are in the getter setter methods of the context class, this doesnot work as "me" always refers to the class instance in which you are present.
    Now in this case what you need to do is :
    1)  create an attribute <view_controller> in your context class. Here the context is TRADE. The type of this attribute wud be same as the view controller class CL_TPMOE_HEADEREOF0_IMPL
    2) Go to the view controller class and redefine the method
    DO_VIEW_INIT_ON_ACTIVATION. This method is called only once when the view is loaded for the first time.
    3) In this method, put the following code
    me->typed_context->(Trade)->[view_controller] = me.
    by the above code, you are setting the newly created attribute to the view controller instance.
    4) The next step would be, go back to your getter setter methods or what ever it may be, try referring to the Fund plan ID by the code snippet mentioned below
    data: lr_entity type ref to cl_crm_bol_entity.
    lr_entity ?= me->[view_controller]->typed_context->[the context node in which the fund plan id is present]->get_current().
    lv_field_value = lr_entity->get_property_as_String( **pass the field name here ).
    This should definitely resolve the problem.
    Thanks,
    Vinay

  • How to set value from one view to other view's context node attr b4 save

    HI all,
    My requirement is as below:
    There are two views in component BP_CONT.
    BP_CONT/ContactDetails    IMPL class
    BP_CONT/SalesEmployee   SALESEMPLOYEE    STRUCT.SALESEMPLOYEE
    I want to set value from first view to second view's context node's attribute.
    i get Sales Employee BP number in ContactDetails view, from here i want to set that value in to STRUCT.SALESEMPLOYEE
    of second view in the same component.
    please send me code snippet for doing the same.
    Thanks in advance.
    seema

    Hi Seema
    You can access the fields from different views by either using custom controllers or by using component controllers, in your case you can access the Sales employee BP number from the Component controller.
    first access the component controller  as below in BP_CONT/SalesEmployee  (in do_prepare_output method) or in (specific setter method)
    lv_compcontroller type ref to CL_BP_CONT_BSPWDCOMPONENT_IMPL,
    lv_partner type ref to cl_crm_bol_entity,
    lv_role type string,
    lv_partner_no type string.
    lv_employee TYPE REF TO if_bol_bo_property_access,
    lv_compcontroller  = me->COMP_CONTROLLER.
    lv_partner ?= lv_compcontroller  ->typed_context->-partner->collection_wrapper->get_current( ).
    lv_role = lv_partner->get_property( iv_attr_name = 'BP_ROLE' )
    IF LV_ROLE = 'SALESEMPLOYEE'
      lv_partner_no ?= lv_current->get_property( iv_attr_name = 'BP_NUMBER' ).
    endif.
    now set the value
    lv_employee ?= me->typed_context->salesemployee->collection_wrapper->get_current( )
    CHECK lv_employee IS BOUND.
        lv_employee->set_property( iv_attr_name = 'SALESEMPLOYEE' iv_value =  lv_partner_no  )
    Thanks & Regards
    Raj

  • Binding of different context nodes in BSP WD Workbench

    Im creating a new View .
    How can i bind a new attribute node in this view to  context node of <U>component controller</u>( not of custom controller)?
    Edited by: Oleg Agranovich on Oct 27, 2008 3:07 PM

    HI,
    just like you would with a custom controller. It is the same method call in the CREATE_XXX method of the context class.
    Just substitute the iv_controller_type variable with CL_BSP_WD_CONTROLLER=>CO_TYPE_COMPONENT
      owner->do_context_node_binding(
            iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_COMPONENT
            iv_target_node_name = '<<CUCO_NODE>>'
            iv_node_2_bind = <<node>> ).
    cheers Carsten

Maybe you are looking for

  • Trimming HD video files for export from Windows to After Effects on a MAC

    Hi, I have some .MTS files created using 2 HD camcorders: 1) Panasonic HDC-TM700 which shoots full HD @ 1920 x 1080 and 2) JVC Everio GZ-HM550 which shoots the same HD resolution I am working with PP CS5 on Windows 7 I need to trim some small pieces

  • Same User - New ID - How to Mass Copy Queries from one userid to another

    Hello, There is a power user who has old user id LTHOMAS. Global company grew and determined that everyone needed new global id. Now LTHOMAS has another id THOMASLUS (US for United States). Global wants to delete LTHOMAS eventually - license fee issu

  • Charts appear in front of date picker, help messages, developer buttons

    In Apex 4.1, with Internet Explorer, if we have charts on the form, objects like date-pickers, help text, etc. appear behind the chart. They pop up (or drop down) in front of the chart's region, but behind the chart. So if I have a search criteria re

  • Integrate Web Dynpro with Flash Viewer for JasperReports

    Hello, I am trying to integrate the Flash Viewer with Web Dynpro in order to render the jasper reports generated in my web dynpro component. I am using a Flash Island within the view which has the SWF file bound to it. I need to pass the URL of the X

  • WLC 2125 Upgrade

    Hi guys, I have a customer with a WLC 2125, with the version 6.0.199.4 and I will now upgrade to the version 7.0.250.0 but i wondering if it´s possible to make a backup for the old image, (i already download the configuration, but not the image) It´s