Reading Attributes from same context node of different attributes

Hi,
I  want read Attributes from same context nodes of diifrent attributes.
I have attribute A and B of same node, want to get read value from  atrribute A into B.
Regards,
Brahmaji

solved
DATA: lv_current TYPE REF TO if_bol_bo_property_access.
   DATA: lv_value type String.
   IF iterator IS BOUND.
    lv_current = iterator->get_current( ).
  ELSE.
    lv_current = collection_wrapper->get_current( ).
  ENDIF.
  CALL METHOD current->get_property_as_string
        EXPORTING
          iv_attr_name = 'ZZAFLD00004Y'
        RECEIVING
          rv_result    = lv_value .

Similar Messages

  • How to read the value from one context node in other in the same view.

    Hi,
    I am working on enhanced component ICCMP_BP_CP/BuPaContactPersonCreate ,  i need to read the partner_guid from Customer context node in  contactpersonaddress context node.
    Could you please guid me how to achieve this? if possible, please explain me with some sample code.
    i am trying this code in GET_FAXFAX method of contactpersonaddress-faxfax, but it is throwing me the type cast exception.
    data: lr_entity type ref to cl_crm_bol_entity.
    data: lv_test type string.
    lr_entity ?= collection_wrapper->get_current( ).
    lr_entity = lr_entity->get_related_entity( 'BuilContactPersonAddressRel' ).
    Thanks in advance.
    Regards,
    Kamesh Bathla
    Edited by: Kamesh Bathla on Jun 25, 2009 7:46 PM

    problem solved by writing the code in context node class CREATE_CONTPERSADDRESSVALNODE method
      coll_wrapper = customer->get_collection_wrapper( ).
      TRY.
          entity ?= coll_wrapper->get_current( ).
        CATCH cx_sy_move_cast_error.
      ENDTRY.
      IF entity IS BOUND.
    CONTPERSADDRESSVALNODE->on_new_focus( focus_bo = entity ).
        DATA: lr_collection TYPE REF TO cl_crm_bol_entity,
              lv_fax TYPE string,
              lv_fax_ext TYPE string,
              lv_tel TYPE string,
              lv_tel_ext TYPE string,
              entity_addr TYPE REF TO if_bol_bo_property_access, "#EC *
              coll_wrapper1 TYPE REF TO cl_bsp_wd_collection_wrapper.
         lr_parrent type
        lr_collection = entity->get_related_entity( 'BuilStandardAddressRel' )."'BuilContactPersonAddressRel' ).
        IF lr_collection IS BOUND.
          coll_wrapper1 = contpersaddressvalnode->get_collection_wrapper( ).
          TRY.
              entity_addr ?= coll_wrapper1->get_current( ).
            CATCH cx_sy_move_cast_error.
          ENDTRY.
    getting fax number
          CALL METHOD lr_collection->if_bol_bo_property_access~get_property_as_value
            EXPORTING
              iv_attr_name = 'FAXFAX'
            IMPORTING
              ev_result    = lv_fax.
    ***setting fax number
          CALL METHOD entity_addr->set_property
            EXPORTING
              iv_attr_name = 'FAXFAX'
              iv_value     = lv_fax.

  • Access attribute of a context node in another context node of the same view

    Hi all,
    I want to acess value of an attribute PERNR of context node CUSTOMERS in another context node AUTHENTICATION of the same view. A sample syntax would be helpful .
    Thanks,

    You didn't specify your version of Oracle so here are two options. If 10.2 or greater, use XMLTable, else use the ExtractValue option.
    -- The WITH simply simulates your existing table that I do not have.
    WITH fake_tab AS
    (SELECT XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
    <Settings>
      <Setting Name="A1" Value="N"/>
      <Setting Name="A2" Value="N"/>
      <Setting Name="A3" Value="SOMEVALUE"/>
      <Setting Name="A4" Value="N"/>
      <Setting Name="A5" Value="Y"/>
      <Setting Name="A6" Value="N"/>
    </Settings>
    ') tab_col
      FROM dual)
    -- For 10.2 and higher use this SELECT
    SELECT a5
      FROM fake_tab,
           XMLTABLE('/Settings'
                    PASSING fake_tab.tab_col
                    COLUMNS
                    a5   VARCHAR2(10)  PATH 'Setting[@Name="A5"]/@Value');
    -- For 10.1 and before
    SELECT ExtractValue(tab_col, '/Settings/Setting[@Name="A5"]/@Value')
      FROM fake_tab;

  • Cannot read attribute of another context node in a context node

    Hello Sap gurus,
    such a long time that I do not post any issue. Now unfortunately time has come down.
    My functional requirement is that whenever the status of an opportunity is changed from "Won" to "Booked", then I have to retrieve the Status reason previously marked for the status "Won" and paste into the attribute Status_Reason (CON_KEY) for status "Won".
    In order to do that I need to read the context node BTADMINH or ZBTCUSTOMERH from the context node BTSUBJECT, in the method GET of attribute CON_KEY.
    I have implemented the following code in the method GET_CONC_KEY of the context node BTSUBJECT.
      DATA:
              lr_entity TYPE REF TO cl_crm_bol_entity,
            lr_comp TYPE REF TO ZL_BT111H_O_DETAILS_IMPL,
             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.
        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.
    Whenever I try to read the context node BTADMINH or ZBTCUSTOMERH from BTSUBJECT  I got always the same dump:
    OBJECTS_OBJREF_NOT_ASSIGNED ZL_BT111H_O_DETAILS_CN06======CP CRM
    Somethins is defitenely wrong and I am at the moment stuck with this code.
    Please any help is really welcome.
    Thanks in advance,
    Andrea

    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.

  • 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

  • How to get value from one context node to otehr contect conde in diff views

    Hello Guru's
    We have a rek which is of getting the value from one context node to other context node,
    for example there is Total value in BT111H_OPPT/ITEMLIST (One context node) we need to have the same Total value in the in BT111H_OPPT/DETAILS (other context node) automatically
    Inputs are highly appricated.......

    Hello,
    Thanks for your Reply
    But my rek is i want to get value from different views
    eg BT111H_oppt/itemslist(contex node - BTADMINI) field net value to BT111h_opp/Details(Context node - BTopporth)
    for this which method should i use to chive this.
    Thanks..

  • Removing the dynamic attributes from view context

    Hi,
    I have added an attribute dynamically using the following line of code in wdDoModifyView():
    wdThis.wdGetContext().getContext().getRootNodeInfo ().addAttribute(<attributename>, <datatype>);
    Now I want to remove the dynamically created attribute from the context.
    Pls suggest me in this regard.
    Regards,
    Ramesh.

    Hi Ramesh,
    You can use the following code to remove the attribute dynamically:
    Iterator itr = wdContext.node<NodeName>().getNodeInfo().iterateAttributes();
    <i>// If the node where you are making these attributes is a context node then just do:</i>
    // <b>wdContext.getNodeInfo().iterateAttributes()</b>, <i>for iterator</i>
    while(itr.hasNext()){
         IWDAttributeInfo attrInfo = (IWDAttributeInfo)itr.next();
         attrInfo.remove();
    This will solve your problem.
    Regards
    Pravesh
    PS: Please consider rewarding points if helpful and solved.

  • 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.

  • 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

  • Issue on deployment: Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''

    Hi,
    I have the following issue when deploying:
    Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''
    The solution is a farm solution (was never sandbox) and it deploys fine.
    It was updated several times with success. We did not see this issue until recently when we had some other issue (unrelated) and looked at the logs. The solution is updated without problem and updates are available for the user. But we can see this error
    in the logs at the update time. 
    Any idea what might cause this?
    Pop Anisia

    Hi,
    This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...
    You can try to redeploy the solution.
    retracted the solution,removed all the previous ref, removed dll from GAC and folder from 14\features and reset the iis, deploying it again.
    Here are some similar issue post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/72ac9a02-3a51-48b8-9e36-3b24a2d4da74/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-alertbdcwsp?forum=sharepointgeneralprevious
    https://social.technet.microsoft.com/Forums/office/en-US/331af288-5ba6-48a7-9e9d-ac4e4bc8f8fa/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-xxxwsp-assembly-?forum=sharepointdevelopmentprevious
    In additional, you can check the ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS) to get the detailed information.
    I hope this helpful.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to call a method in IMPL class from one context node

    Hi, I´ve been only study the posibility to access a method in the IMPL class  from one context node class...CN## without using events, is there a way to call it ??? I don´t have it as requierement just learning thanks !.

    Hi,
    Try this by following this you can get the custom controller instacne in the view context nodes, for your requirement you can keep the view implementation class instance instead of cuco..
    To get the custom controller instance in Context node getter/setter method:
    1. Declare Cuco instance reference variable in ctxt class..
    2. Set this cuco ref. in the Create context node method of ctxt class:
    try.
    gr_cucoadminh ?= owner->get_custom_controller( 'ICCMP_BTSHEAD/cucoadminh' ). "#EC NOTEXT
    catch cx_root.
    endtry.
    you can avoid this step as this is not needed in case of view isntance
    3. Assign this instance to the respective context node Create method using:
    BTStatusH->gr_cuco ?= gr_cucoadminh.  " here assign the view implementation ref. " me" instead of gr_cucoadminh
    Here gr_cuco is the ref. variable of custom controller in the respective context node for eg. BtstatusH
    Sample implementation of this can be found in
    ICCMP_BTSHEAD/BTSHeader ->context node BTACTIVITYH-> attr ->GR_CUCO(instance of cuco)
    Cheers,
    Sumit Mittal

  • How to read the attribute in another context node from setter method

    Hi,
    As part of the  requirement
    i need to read the STRUCT.E_MAIL ( attribute ) present  in  INDEPENDANTEMAIL context node  from  the SET_S_SRUCT method of the context node  HEADER.
    I tried th following but it didnt work out....
    Get the Custom Controller Path
    *lr_cuco ?= controller->get_custom_controller( controller_id = 'BP_HEAD/IndComm').
    *IF lr_cuco IS BOUND.
    Get the Entity
    *lr_entity ?= lr_cuco->typed_context->independantemail->collection_wrapper->get_current( ).
    *ENDIF.
    *CHECK lr_entity IS BOUND.
    Get the Trade Event Type.
    *lv_email  = lr_entity->get_property_as_string( 'E_MAIL' ).
    also i tried ...
    data:
    *lv_value type string,
    *lr_property type ref to if_bol_bo_property_access.
    *lr_property = collection_wrapper->get_current( ).
    *lv_value = lr_property->GET_PROPERTY_AS_STRING( importing iv_attr_name = 'E_MAIL'
                                                returining  ev_result    = lv_email ).
    but it didnt workout ......
    Any suggestions   ...................
    Regards,
    Sijo...

    Hi,
    Both Context node are available in view then refer this link.
    Reading Attributes from different context nodes in the same view
    Relationship name for context node INDEPENDENTMAIL is 'BuilIndependantEmailRel'
    Regards
    Gaurav

  • Adding dynamic attributes to static context node

    Hi All,
    I have defined a context node LINES with several attributes. This is done staticly during developmenttime.
    During run-time node LINES is extended with several attributes dynamicly. See below:
    10     HEADER_GUID               ->
    11     DETAIL_GUID               ->
    12     EXTERNAL_ID               ->
    13     OBJECT_TYPE               ->
    14     IN_OUT_PLAN               ->
    15     TRAFFIC_LIGHT_1               ->
    16     TRAFFIC_LIGHT_2               ->
    17     TRAFFIC_LIGHT_3               ->
    18     TRAFFIC_LIGHT_4               ->
    19     _LOCATION          \TYPE=STRING     ->
    20     _ZZTOPGROUPING     \TYPE=STRING     ->
    21     _STATUS          \TYPE=STRING     ->
    22     _100000200          \TYPE=STRING     ->
    19..22 are added dynamicly.
    I have an internal table that matches de new context. This <fs_tb_tree_new> I want to bind like:
    *&- bind table
      lr_node->bind_table( new_items =  <fs_tb_tree_new>
                           set_initial_elements = abap_true ).
    In <fs_tb_tree_new> the dynamicly added attrbutes contains values e.g. (the static attributes also have values via <fs_tb_tree_new>):
                         _LOCATION   _ZZTOPGROUPING  _STATUS              _100000200                   
    5     Africa     0002     Reporting Entity     0.000
    6     Russia, CIS     0003     Identify                          0.000
    An ALV presents the values of the attribute. But.... only the values of the static part are presented, not the dynamic attributes added during runtime.
    Please advise what I forget or do wrong .
    Thanks in advance.
    John

    I solved the issue:
    If you use a combination of static attributes added with dynanic attributes (during runtime) for dynamic ALV, I advise to create a new node and bind the values to this new created node:
    Cheers, John
    wd_this->extend_context( EXPORTING im_struc_descr =  lr_cl_abap_structdescr
                               IMPORTING ex_node = lr_node_alv ).
    Method:
    *&- Create new dynamic context LINES_DYN
    Node for alv-table
      lr_node_info = wd_context->get_node_info( ).
      CALL METHOD lr_node_info->add_new_child_node
        EXPORTING
          name                  = 'LINES_NEW'
          static_element_rtti   = im_struc_descr
          is_static             = abap_true
          is_multiple           = abap_true
          is_multiple_selection = abap_false
        RECEIVING
          child_node_info       = lr_subnode_info.
    lr_node = lr_subnode_info->get_parent( ).
      lr_node = wd_context->get_child_node( 'LINES_NEW' ).
      ex_node = lr_node.
    *&- bind table for alv
      lr_node_alv->bind_table( new_items =  <fs_tb_tree_new>
                               set_initial_elements = abap_true ).

  • Problem in accessing attribute of a context node

    Hi All,
    I have a context node called REFE and an attribute named REF to the node REFE. I am trying to get access to the attribute REF, so that i can dynamically set properties. But i am getting NULL Object error. I am successfully getting access to node REFE.
    Here is the code.
    lo_nd_refe = wd_context->get_child_node( name = wd_this->wdctx_refe ).
    lo_el_refe = lo_nd_refe->get_element(  ).
    lo_el_refe->set_attribute(
          EXPORTING
            name =  `REF`
            value = 'http://sapsndbp.sbic.co.za:8011/sap/bc/webdynpro/sap/zzdm_audit_report' ).
    Regards,
    RAvi

    Hi,
    What is the cardinality of the node.
    If it is 1:1 then you can get teh reference of the context element directly.
    If it 0:N or 1:N then you need to pass the index of the context element you are trying to get.
    Use the method get_element of the context node and pass the index value.
    Always check the element is initial or not before you process further for better coding.
    Regards,
    Lekha.

  • Set value of zzidarea from another context node

    Hi is it possible to set the value of the zzidarea field of the context node header from the method  get_employeename of the context node employeename?
    Thanks!!

    Hi,
            Your question should be framed better. I suppose that you are trying to set the value of a header attribute from one of the child relations. Assuming that the relations are buffered, it is possible to reach the header entity by using the get_parent or get_root and using relations again. However it is not a good practice trying to set values in a getter method. You should find another proper approach to your problem.
    Regards,
    Arun Prakash

Maybe you are looking for

  • Played podcasts not marked played ofter syncing

    My played podcasts are being marked unplayed on my Iphone and not removed from Itunes when I resync. I have my Itunes set to remove all unplayed from Iphone, and Itunes to only keep unplayed podcasts. This worked prior to the most recent update. I ha

  • Outlook crashes when sending an Email

    Hi, I am use Microsoft outlook live for my university email and every time I try to open the send a message window Safari crashes. The message window does not fully load before it crashes. Does any one know what I can do to fix this problem. Here is

  • Telepresence CTS-1000 optional presentation display cable type

    I am installing the CTS-1000 with the optional 22'' external LCD display. The cabling guides have the picture showing that the there is an HDMI connection on the codec showing the Auxiliary Video Out, but with the NEC Display there is not a HDMI conn

  • Reorder Point Planning VB where GI against reservation not happening

    HI Every one, Manual re order materials which has got created Manual Re order Level 50 Safety Stock 30 Stock exists 54 Reservation created when only 4 stock was there after that received 50 quantity.Now Creating Goods issue against that reservation B

  • Sometimes my iPhone 5 freezes up

    Sometimes my iPhone 5 freezes. I can't use the icons.re-booting fixes it. What can be the issue?