How to read context node/attribute data of diff UI component of same screen

Hi,
I am new to CRM and as well as BSP, Now the requirement is, at the time of Lead creation, when the end user enters customer code and sales area i need to fetch and display the customer group 1 value( VIP,KAM etc) based on the customer's sales area, ( these are sales area specific values).
but the problem is Customer code is in diff UI component and sales area data is in diff UI component .
1) customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.
2) sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.
3) I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.    
To display the value in the context node BTLEADH, i need to know the sales area data which is entered in BTORGSET.
Kindly let me know how to read the data which is in diff UI component of the same Lead creation screen.
i written following code in context node BTLEADH, atttribute New Zfield, in get method, but not able solve, please guide me.
  DATA: LR_ENT TYPE REF TO CL_CRM_BOL_ENTITY,
             LR_COL TYPE REF TO IF_BOL_ENTITY_COL.
  LR_ENT ?= ME->TYPED_CONTEXT->BuilHeader->COLLECTION_WRAPPER->GET_CURRENT( ).
  LR_COL = LR_ENT->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BuilSalesArrangementRel' ).
  LR_ENT ?= LR_COL->GET_FIRST( ).
  IF LR_ENT IS BOUND.
    LR_ENT->GET_PROPERTY_AS_VALUE( EXPORTING IV_ATTR_NAME = 'DIVISION'  IMPORTING EV_RESULT =  LV_DIVISION  ).
  ENDIF.
I'll appreciate if you can provide me some documents to refer.
awaiting for your responses.
Thanks
Bhanu

Hi Gangadhar,
I think i have not clearly explained my requirement, let me put it once again. My requirement is, I have to read two UI component data, validate and display some value in one new zfield which is in one of the UI components.
I need to display customer's sales area specific data like customer group 1 value in that new zfield. for that i need Customer code and as well as sales area data from the screen.
1) customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.
2) sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.
3) I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.
As per my understanding, in the context node BTLEADH, GET_METHOD of atttribute New Zfield, i have to read customer code from UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT and Sales area data from UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET based on the values, validate and display the data.
But as per your recent reply you are asking me to write the code in get_property_attribute---division. so i didnt understand.
Kindly clarify if i am wrong.
awaiting for your response.
Thanks
BHanu

Similar Messages

  • Read Context  Node/Attribute option in webdynpro code wizard not available

    Hi Expets,
    I am new to webdynpro Abap, i have developed a small application to set default values for two fields. i want to use code wizard to implement the code. When i click on code wizard icon  in application tool bar, i have found lot of option like Method call in current controller, method call in used controller, Instantiate used component ... etc. But i didn't find the option Read Context Node/Attribute. Do i need to do any settings to get that. Kindly suggest. Your help will be greatly appreciated.
    Venkat

    Hi,
    Check the NW release,
    I checked with NW 7.02 - 2 tabs were available.
    with NW 7 - only 1 tab was available which you mentioned.
    Additional tab (Context ) might have been added after NW release 7.0.
    Regards
    Manas Dua

  • ABAP: dynamic context node + attribute for DROP_DOWN_BY_KEY

    Hello,
    I need to create a Node with attributes dynamically and than assign it to a DROP_DOW_BY_KEY element in ABAP.
    I create drop down this way:
    drop_down_figure = cl_wd_dropdown_by_key=>new_dropdown_by_key( bind_selected_key = 'REPOSITORY.FIGURES' on_select = 'GET_OPERATOR' ).
      cl_wd_grid_data=>new_grid_data( element = drop_down_figure ).
      ui_container->add_child( drop_down_figure ).
    However, here I bind to REPOSITORY.FIGURES. Instead of doing this I need to bind it to an attribute that I create.
    I can access wd_context but I am not sure how to create a node in wd_context, then attribute for that node that will contain items for drop down.
    bind_selected_key is type of String. If I create a node with attribute how do I cast it to a String so I can pass it to a constructor of a drop down?
    Thank you.

    Hi Georgy,
    There is a 3 - series weblog for this.
    The first one is:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    The following are the the general steps for creating a node and table where table name is input by the user:
    DATA:
      UI Elements
        group_1       TYPE REF TO cl_wd_uielement_container,
        new_tab       TYPE REF TO cl_wd_table,
      Context Nodes
        dyn_node      TYPE REF TO if_wd_context_node,
        tabname_node  TYPE REF TO if_wd_context_node,
      Node Info
        rootnode_info TYPE REF TO if_wd_context_node_info,
      Data Reference (for internal table)
        stru_tab      TYPE REF TO data,
      String (for table name)
        tablename     TYPE string.
      FIELD-SYMBOLS:
        <tab> TYPE table.
    1) * get node info of context root node
      rootnode_info = wd_context->get_node_info( ).
    2) * create sub node named TEST1 of structure (tablename)
      cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
        parent_info = rootnode_info
        node_name = tablename
        structure_name = tablename
        is_multiple = abap_true ).
    3) * get instance of new node
      dyn_node = wd_context->get_child_node( name = tablename ).
    4) ***** create new UI element table *******************************************************
      new_tab = cl_wd_dynamic_tool=>create_table_from_node(
    ui_parent = group_1
    table_id  = 'TESTTAB'
    node      = dyn_node ).
    5) ***** fill context node with data *******************************************************
    create internal table of (tabletype)
      CREATE DATA stru_tab TYPE TABLE OF (tablename).
      ASSIGN stru_tab->* TO <tab>.
    Get table content
      SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.
    Bind internal table to context node.
      dyn_node->bind_table( <tab> ).
    Regards,
    Srini.

  • 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

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How to read and write a data from extrenal file

    Hi..
    How to read and write a data from extrenal file using Pl/sql?
    Is it possible from Dyanamic Sql or any other way?
    Reagards
    Raju

    utl_file
    Re: How to Create text(dat) file.
    Message was edited by:
    jeneesh

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • How can i share purchased apps between 2 diff users on the same mac?

    How can I share purchased apps between 2 diff users on the same mac?

    A purchased app is associated with an Apple ID. A user with a different Apple ID cannot use the app unless they also use the same Apple ID.
    I cannot use my wife's apps nor she mine because each were purchased with different Apple IDs.

  • How can I combine a lot of text and images on the same screen?

    How can I combine a lot of text and images on the same screen?  I can get a couple of words on the screen with a graphic but not 10 lines.  I need 10 lines on the page with the image. 

    Priscilla,
    I routinely combine 10 lines of 36 pt bible or lecture text to a suitable background using Boris Title 3D.
    Many times the text is too long to fit the screen using Boris, so I devide it into 2 or more parts with no transition between sections.
    In my case, the text is on the screen as the speaker quotes them.
    David

  • How to bind UI Element with Context Node Attribute Element

    Hi,
    I'm building my view dynamically in the wdDoModifyView method.
    Is it possible to bind a "TextView" element to a specific element of an attribute node?
    Scenario:
    Node_Employees
    |
    +- Attribute_Code
    |
    +- Attribute_Name
    Node Contents:
    Employees
    |
    +- Code: 1, Name: Employee 1
    |
    +- Code: 2, Name: Employee 2
    |
    +- Code: 3, Name: Employee 3
    I need to do something like binding a TextView UI element to the "Name" attribute of the element #2, what would result to show "Employee 2" on my view.
    How can I do this?
    Thanks in advance,
    Geraldo.

    Hi Saravanan,
    First I populate the context node and it won't change during view's lifecycle.  After that, I build my view and bind the TextView UI elements to the node context attributes elements.
    If the node has 10 elements, I will build 10 TextView UI elements and bind them to each attribute element.
    Regards,
    Geraldo Brígido.

  • How to make entire node attribute elements as read-only ?

    Hi Experts,
    I have an requirement to make all fields of an form view (based on one context node) in UI to be shown in Display mode. Any idea on how to acheive that ?
    I know get_i_xxxx method. But, they should be coded for each attribute seperately. Any method based on node level ?
    Also, any method based on entity ? I see a method 'switch_to_change_mode' of class cl_crm_bol_entity. But, there is no other method to change to display mode.
    Thanks & Regards,
    Gaurav.

    Hi Gaurav,
      In your htm page you can place the below thing.
    displayMode     = "<%= controller->view_group_context->is_view_in_display_mode( controller ) %>" />
    When the user clicks on the Edit button , in the edit event handler set the view to change mode using method SET_VIEW_EDITABLE.
    Hope this helps you.
    Regards,
    Lakshmi.Y

  • 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 find if a particular context node attribute is changed.

    Hi,
    When a screen is opened, the context node attribs has some values.  On some event, i wanted to check if one particular attribute in the context node has changed.  Is it possible to figure this out.
    (ps note that I need not find if any change has happened to the entire table but only one column (attribute) of the node.  Note that the node has cardinality 0...n.  So there are multiple possible values)
    Thanks in advance.
    regards,
    suresh.

    Hi,
    If you use the [Context change log|http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/frameset.htm]
    and loop over the result table, looking for a certain attribute name and node name,
    you'll get all the changes of that attribute, for all elements in that node.
    grtz,
    Koen

  • Read context node table type

    Hi
    I have a requirment to read the context node of type cl_bsp_wd_context_TV.
    How to read using bol programming?
    Any solutions.
    regards
    John

    Hi,
    what are you looking for?
    * your context node
    data lr_node type ref to cl_bsp_wd_context_TV.
    * the list of entities
    lt_entities = lr_node->table.
    * the collection of entities
    lr_coll = lr_node->collection_wrapper.
    Was that your aim?
    There are much more attributes...
    cu,
    TW

  • How to change Context Node/Subnode parameters?

    How can I change node parameters AFTER I have created them? For instance, I have a sub-node of a lead node. I now want to assign a supply method to the subnode however, I can not edit this now. Is this possible? Thanks!

    Never mind....found it....I have to change it at the COMPONENT CONTROLLER context level...NOT at the VIEW context level. Doh!

Maybe you are looking for

  • "Unknown Error" all the time, every time on render of project, any codec

    Trying to render a feature length documentary for a film festival (ie.. I don't have time for this). The project timeline runs 1 hour and 20 minutes. If I try and export or queue the timeline in media encoder to h.264, QuickTime or Select "Match Sequ

  • How to delete sales area of an Account in Web UI?

    Hi All, I want to delete a sales area associated with an account, (i.e Not entire sales area from Organization structure) just delete the link with account. I don't have an option to delete sales area associated with account in CRM Web UI. So we refe

  • Web page images move up or down in pcs

    I have a similar problem. Just finished my new website which looks great in Iweb but when I publish it it looks different in every browser and even worse in PCs. My website is www.davidleon.biz The pictures, html widgets and lines seem to come up or

  • Not getting a clear input from VCR through Dazzle DV-Bridge

    I have a Dazzle Hollywood DV-Bridge device so that I can take VCR tapes and eventually burn them onto a DVD. It takes the audio and video from the VCR and pumps it into my Mac via Firewire. The problem is that no matter what tape I play in the VCR, I

  • Flash Player Crashes on Reconnect - Justin.tv

    Hey flash experts I often goto a website called Justin.tv I noticed a bug in the player code when you reconnect to the flash player that crashes your browser. It occurs when the video stream reconnects to the flash server and then the client connects