Data storage in a context node and in a context attribute.

Hi All,
I want to know how exactly the data is stored in context node (internal table) and in context attribute (single value) in memory during the runtime.
Regards,
Yugesh A

Hi Andrea,
Sorry I got it wrong , for lr_comp you will have to take reference from controller IMPL class.
DATA:
          lr_entity TYPE REF TO cl_crm_bol_entity,
        lr_comp TYPE REF TO ( component controller IMPL class),
         lv_ref_guid     TYPE        crmt_object_guid,
         lr_collection TYPE REF TO cl_crm_bol_bo_col,
         lr_bdc type ref to  if_crm_ui_data_context,
         comp_controller type cl_bsp_wd_component_controller.
lr_comp  ?= me->comp_controller.
IF lr_comp IS BOUND.
    TRY.
lr_entity ?= lr_comp->ZTYPED_CONTEXT->ZBTCUSTOMERH->collection_wrapper->get_current( ).
     lv_ref_guid = lr_entity->get_property_as_string( iv_attr_name = 'REF_GUID' ).
      CATCH cx_sy_ref_is_initial.
      ENDTRY.
ENDIF.
Hope it helps.
Regards,
Manjeet Singh.

Similar Messages

  • Retrieve data from other context node within the same context

    Hi Experts,
    I want to redefine method BUILD_TABLE for a table context node and I need to access data from another context node within the same context. I have looked through the methods of class CL_BSP_WD_CONTEXT_NODE_TV but could not find a mean of retrieving the other context nodes.
    Any ideas?
    Thanks a lot. Your help is appreciated.
    Cheers,
    Jens

    Hi Jens,
    Check this [wiki|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=201066680] it should be helpful.
    Regards,
    Shobhit

  • Dynamic creation of context nodes and ui elements

    Hi,
    I have created context nodes dynamically. And i also want to create UI elements dynamically wherein i want to bind the attribute from the context node to it. For example i want to create a drop down by index and bind one of the attributes in the context nodes that i have earlier created dynamically to it.  I do not know how to get the path to the attribute as i get IF_WD_CONTEXTNODE_INFO when i say get_child_node(). And the IF_WD_CONTEXTNODE_INFO does not have any method where in i can get IF_WD_CONTEXT_NODE from where i can get the path by get_meta_path( )
    Here is the code. The problem is to get the path which is the i/p to cl_wd_dropdown_by_idx=>new_dropdown_by_idx( ) method.
    DATA:
            lo_root_ui_elmnt              TYPE REF TO cl_wd_uielement_container,
            lo_drpdwn_by_idx              TYPE REF TO cl_wd_dropdown_by_idx,
            lo_txt_vw                     TYPE REF TO cl_wd_text_view,
            lo_qstn_node                  TYPE REF TO if_wd_context_node,
            lo_optn_node_info             TYPE REF TO if_wd_context_node_info,
            lv_optn_data_source_name      TYPE string,
            lt_child_nodes                TYPE wdr_context_child_map,
            lo_qstn_el                    TYPE REF TO if_wd_context_element,
            lo_optn_el                    TYPE REF TO if_wd_context_element,
            lv_text                       TYPE string,
            lo_qstn_node_info             TYPE REF TO if_wd_context_node_info.
      FIELD-SYMBOLS:
    *                 <ls_qstn>    LIKE LINE OF wd_this->mt_questions.
                    <ls_child_node>         LIKE LINE OF lt_child_nodes.
      lo_root_ui_elmnt ?= io_view->get_root_element( ).
      lt_child_nodes = wd_context->get_child_nodes( ).
    LOOP AT lt_child_nodes ASSIGNING <ls_child_node>.
       lo_qstn_node = <ls_child_node>-node.
        lo_qstn_el = lo_qstn_node->get_element( index = 1 ).
        lo_qstn_el->get_attribute(
              EXPORTING
                name = 'QUESTION_TEXT'
               IMPORTING
                 value = lv_text ).
        lo_txt_vw =   cl_wd_text_view=>new_text_view( view = io_view ).
        lo_txt_vw->set_text( value = lv_text  ).
        lo_qstn_node_info = lo_qstn_node->get_node_info( ).
        lo_optn_node_info = lo_qstn_node_info->get_child_node( 'OPTIONS' ).
    *    lv_optn_data_source_name = lo_optn_node_info->get_meta_path( withoutcontroller = abap_true ).
    *    CONCATENATE lv_optn_data_source_name '.' 'OPTION_TEXT' INTO lv_optn_data_source_name.
        lo_drpdwn_by_idx = cl_wd_dropdown_by_idx=>new_dropdown_by_idx(
                              bind_texts = lv_optn_data_source_name
                              view       = io_view ).
        lo_root_ui_elmnt->add_child( lo_txt_vw ).
        lo_root_ui_elmnt->add_child( lo_drpdwn_by_idx ).
      ENDLOOP.
    Regards,
    Madhura Lobo
    Edited by: Suhas Saha on Aug 2, 2011 11:04 AM

    Hi Madhura,
    Please check this thread and find Baskaran answer...
    create new child-node in supply-function
    Re: Creating Dynamic Node and Table
    Cheers,
    Kris.

  • Map context node  web dynpro to context DATA of  interface controller ALV

    Hi Experts,
    I have started creating simple ALV by following the example in the below mentioned link.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d
    I have completed 95% development but stuck with last bit of
    Set data to ALV for display (via reverse context mapping).
    When Click on the Controller Usage button. The component controller of your Web Dynpro component DOES NOT appears on the right side of the screen.
    Therefore I can not  Map context node NODE_FLIGHTTAB of your Web Dynpro component to context DATA of the interface controller of the ALV component.
    Could you please shed me light on this.
    Your time and help much appreciated.
    Best Regards
    CB

    Hi Chandra,
    You need to add component controller first. Just go to the property tab of interface controller of the alv component and click on create button and then add the component controller. After that you'll be able to see the node in the context tab.
    Regards
    Arjun

  • Dynamic Table control with context nodes and attributes?

    Hi all
    I have node and attributes in context. i want to create table dynamically using this node and attributes, can anyone give code how to do this???
    Thanks
    Madhan.

    Hi
    Go through this [link|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80a3de18-ee00-2d10-bfb3-946d7e00fd91?quicklink=index&overridelayout=true].
    Regards
    Arun.P

  • Difference between node and element in context.

    Hi
    I have below context elements.
    Root Context
    Node Test
    Value T1
    Now there are 2 ways I can access to value attribute t1.
    1.
    wdContext.currentTestElement().getT1()
    2.
    wdContext.nodeTest().currentTestElement().getT1();
    What is difference.

    Thanks for comments,
    But after working on it now as I find is :
    If your elements are subject to exist n times at runtime, in that case currentcontextelement automatically gives you access to active context node. Wereas,  nodexxx() gives access to the node element as a group, after which you can access to any elemt inside that node group. e.g.
    wdContext.nodeTest().getElementAt(n)
    Thanks

  • There is more data storage on the hard drive and I can not find it (should be deleted)

    Hi I need some help, i recently bought a Macbook Pro, so good with that but when storing my files I realized I had sent more files, I deleted my files and it took me hours! and when checking the status of storage I realized I had more 20GB hard drive and I can not find that data stored anywhere! and i made the securely empty.
    P.S. I had a small problem when cleaned the trash, I stopped for lack of time but when i stop it, I realized I had nothing inside then... (should leave something at least, because it was an incomplete process.)
    (here says that i have 40.54 GB from other stuff, and i'm just using like 13Gb of my data) its in spanish by the way... sorry for that.
    Thanks for your patience!

    Other (Otros) is everything but Applications according to your chart. That includes operating system and files.

  • How to search data from a context node.

    Hi Friends,
    Thanks for ur help for previous problem . I am facing some other problem i.e how to
    search data from a context node.
    i have a context node :-
    Car(main node) which consist of details, owners, engine and Brand  as its sub node.
    the value attibutes of difft nodes are:-
    Car-  category
    Details-  Mileage, Price, registration_no, miles_used
    owner -  name, phnno,addrs
    Brand -  main_brand, co_brand
    Engine- Bhp,Rpm
    Now i have to apply a search criteria on the basis of price, miles_used .
    pls help to implement that .
    Thanks & regards
    Pravin jha

    Hi PRAVIN,
                       What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:
    Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.
    Now you can create a table of this node "Car" and can easily search on the basis of any criteria.
    I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.
    Cheers!!!
    Umang

  • How to get Context Node data in respective HTM page

    Hello Experts,
    My Scenario is as follws: Two views are there one is table view[contain customer data] and another form view[where i require the data]. my requirement is, table view is having customer information with their city names. i need the city name in my form view's .htm
    Both views are having same context node which are bounded via custom controller.
    Could you help me out to solve this
    With Regards
    SRiNi

    Hi,
    this should be very simple as the context nodes are defined as page attributes on your .htm page.
    Example:
    Your Context node is named /TEST/.
    In your .htm page you can access it by:
    <%
    data:
      lr_property type ref to if_bol_bo_property_access.
      lr_property = /test/->collection_wrapper->get_current( ).
    %>
    EDIT:
    In case there is no page attribute, you can use the SET_MODELS method in the view implementation class to set a variable. Be sure to create the variable you want to set on the .htm page in the page attributes first.
    cheers Carsten
    Edited by: Carsten Kasper on Oct 21, 2008 2:44 PM

  • How to read the context node of used component?

    Hi,
    I have component called : SRQM_INCIDENT_H. This component has used component - BTSTATUS.
    Now, I need to read the context node of the BTSTATUS/UserStatus in GET Methods of Context node in SRQM_INCIDENT_H.
    Can you plese help me out.
    Thanks,
    Sandeep

    The component usages can be accessed from the component controller
    You should however assure that the context node is present in comp controlelr of the used component.View context nodes cannot be accessed.
    if not ,then you need to goto the component BTSTATUS ,add the context node  explicitly to comp controller,and do correct bindings to the view context node.
    Once you add the context node to the com controller,yo also need to expose it.
    go to runtime repository->component_interface->interface_controller->context->right click and select ADD CONTEXT NODE, and add you newly creatde context ndoe of comp contorller here.
    Now you cann access it using the code below in your comp SRQM_INCIDENT_H
    data:lr_comp_controller type ref to <ur comp controller class>lr_comp_controller ?= me->comp_controller.
        lr_comp_usage ?= lr_comp_controller->get_component_usage( iv_usage_name = '<name of the comp usage as in runtime repository' ).
        CHECK lr_comp_usage IS NOT INITIAL.
        lr_cnode ?= lr_comp_usage->get_context_node( iv_cnode_name = '<the required context node name>' ).
    Suvidha

  • Dynamic reverse context node mapping at runtime

    Hi!
    I have an application which uses another embedded component containing a ALV table which shows the data of a transparent table.
    Everything works fine if i'm working with a static table with static attributes and map the context node of the application to the node in the embedded component. The context node in the embedded component is reversed mapped and gets its data from the application's context node.
    Now i want to do it dynamically. Inside the application the user should choose the name of a table and I'm using RTTI functions to get it's technical informations. At runtime i'm adding dynamically attributes (i.e. fieldname, type, length) to a static context node called 'DATA'.
    The ALV component of the embedded component is mapped to an interface context node named 'DATA' which uses reverse mapping to receive data from the applications context node 'DATA'.
    What I need to know is how to create the mapping between application context node and interface context node of the embedded component at runtime after i have created the attributes of the node dynamically. Is that basically possible?
    I've already tried to map the both nodes statically to see if the dynamically created attributes are mapped automatically then. The mapping seems to be fine at node level, but doesn't work for the later dynamically added attributes.
    Could someone point me to informations if dynamic mapping context nodes is basically possible and how to do it?
    Regards
    Ralf-J.

    Hi Lars!
    Thanks for the link! The problem isn't to fill the context node dynamically. That's already working using RTTI etc.
    It seems to me that the interface context node of the ALV in the embedded component doesn't recognize the dynamically added attributes. As i wrote the binding on node level (DATA->DATA), which i'm doing at design time, is working as expected, but the added attributes are only shown in the context node of the using component but not in the embedded.
    I'm still thinking there must be a way to do a binding at runtime. On the other hand the comment of Glenn in the thread you've pointed me to, seems to suggest that the ALV itself might have problems with dynamically appended attributes.
    Regards
    Ralf-J.

  • Element addition to context node at runtime.

    Hi all,
    I have a class array object in which all data comes at runtime.
    I created a node in context.
    i have to add the element to node. i ahve used that node as a datasource to table UI.
    EmpWrapper e[] = null;
    e = tmp1.Get(wdContext.currentContextElement().getDIVISION());
    // i am getting all data in e[]
            if (e.length != 0)
            for (int i=0;i<= e.length;i++){
    //how to add the e data to node EMP in context                       

    Hi Shefali,
    Here is the link to create dynamic context nodes and its attributes.
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b3f6e990-0201-0010-c087-c865f2c738b3
    Regards,
    Abhimanyu L

  • How can I bind a dynamic attribute of a context node to ALV?

    Hi all,
    I'm trying to show data with Webdynpor ALV, but i met a question which blocked me. The situation is that there is a static context node and it's mapped to WD ALV, while programming I create a dynamic attribute to the context node. The dynamic column can be shown on the UI, but there is no any data in it. How can i deal with it?
    Thanks a lot!
    Edited by: Julia Zhu on Dec 3, 2009 7:48 AM

    Hi Julia,
    Welcome to SDN.
    Post it in the ABAP webdynpro forum to get quick replies. Web Dynpro ABAP
    Also search in sdn as there are chances that somebody has already posted the queries related to same issue.
    Regards,
    Swarna Munukoti.

  • Getting a list of Context nodes

    Hi all,
    Just trying to figure this out.
    Assume that, I've 5 context nodes added to a context. I would like to retrieve the names of those context nodes in an event handler method.
    Can somebody help me with sample code to accomplish this?
    Thank you,
    Ezhno.

    Hi Maren Ezhno,
    You will get all context nodes by using m_models and typed_context there are 2 ways..
    first way..
    declare the context node type.. here i am using context_node_asp.
    and result variable..
    that result you need to store in one table type..
    DATA:
          lr_cn_asp TYPE REF TO cl_bsp_wd_context_node_asp,
          rv_result TYPE string.
    FIELD-SYMBOLS: <node> TYPE lbsp_model_item.
    LOOP AT me->m_models ASSIGNING <node>.
             lr_cn_asp ?= <node>-instance.
             rv_result = <node>-model_id.
             TRANSLATE rv_result TO UPPER CASE.
         ENDTRY.
       ENDLOOP.
    In rv_result you will get context node name...
    Second way.
    declare like this.. if you'r working in same view.
    Data : lr_context type ref to cl_bsp_wd_context.
    lr_context ?= me->typed_context.
    in lr_context you will get all context nodes which are there context class..
    you can come to know to see this pic..
    Thanks & Regards,
    Srinivask

  • 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

Maybe you are looking for