Read attribute of implementation class from context node

hi experts,
I need to access the implementation class from the context node,in component seged_tg/eltargetgroupitem. Node is targetgroupitem.
Also if I can either access the component controller from the context node,I need to know how to instantiate the class.
please help.
regards
Anu

hi ,
I discovered that we cannot access the child nodes from parent class,so instead I am using custom controllers

Similar Messages

  • Accessing private attribute of a class from its Friend Class

    Hi Experts ,
    Please help me to understand how can i access private attribute of one class from its friend class.
    I am coding in Method (DO_SAVE) of class /BOBF/CL_TRA_TRANSACTION_MGR.
    I need to access private variable ( MO_BOPF) of class /BOBF/CL_TRA_SERVICE_MGR ( Friend of /BOBF/CL_TRA_TRANSACTION_MGR ).
    Regards,
    Reny Richard

    Hi Reny,
    You should be able to access by creating object of friend class.
    Sample:
    data lo_frnd     TYPE REF TO  /BOBF/CL_TRA_SERVICE_MGR.
    data lo_compl  type REF TO /BOBF/IF_TRA_TRANS_MGR_COMPL.
       create OBJECT lo_frnd
         exporting
                   iv_bo_key = '111'
                   IO_COMPL_TRANSACTION_MANAGER = lo_compl.
    "access the private object of friend class
       clear lo_frnd->MO_BOPF.
    Note: need to provide iv_bo_key & IO_COMPL_TRANSACTION_MANAGER while creating object.
    Hope this helps you.
    Regards,
    Rama

  • How to access private attribute of a class from its Friend Class

    Hi Experts ,
    I am coding in Method (DO_SAVE) of class /BOBF/CL_TRA_TRANSACTION_MGR.
    I need to access private variable ( MO_BOPF) of class /BOBF/CL_TRA_SERVICE_MGR ( Friend of /BOBF/CL_TRA_TRANSACTION_MGR ).
    Please help me to understand how can i access private attribute of one class from its friend class.
    Regards- Abhishek

    Hi Reny,
    You should be able to access by creating object of friend class.
    Sample:
    data lo_frnd     TYPE REF TO  /BOBF/CL_TRA_SERVICE_MGR.
    data lo_compl  type REF TO /BOBF/IF_TRA_TRANS_MGR_COMPL.
       create OBJECT lo_frnd
         exporting
                   iv_bo_key = '111'
                   IO_COMPL_TRANSACTION_MANAGER = lo_compl.
    "access the private object of friend class
       clear lo_frnd->MO_BOPF.
    Note: need to provide iv_bo_key & IO_COMPL_TRANSACTION_MANAGER while creating object.
    Hope this helps you.
    Regards,
    Rama

  • Read Implementation class attribute from context node

    Hello all,
    I have a global atttribute in my Implementation class. How can I access this attribute from the getter setter method of an attribute in my Context node?
    Regards,
    Debolina

    hi ,
    I discovered that we cannot access the child nodes from parent class,so instead I am using custom controllers

  • Hiding Context Element without removing them from Context Node

    Hi,
    my application uses an ALV table. I'm implementing Complex Filter that are used to hide some rows that match certain conditions, like the regular filter in ALV does. At the end, I want to save all rows, even the hidden ones. It would be simpler for me to keep all elements in my context, but just to set an attribute to hide the element. Is there a way to do it or I have to remove the element from context and put it aside in a temporary buffer?
    Thanks
    Davy

    Hi ,
    Get the column reference of the alv and loop the alv columns ...get the column which you want to hide and use the method
    CALL METHOD lr_column->set_visible
            EXPORTING
              value = cl_wd_uielement=>e_visible-none.
    Regards,
    Shailaja Ainala.

  • How to read BP header data in standardaddress context node

    Hi,
    we have the next requirement in CRM 7.0 WebUI:
    In view BP_ADDR/StandardAddress the field STRUCT.TELEPHONETEL should only be an input field if the authorization group of the business partner has a certain value. So I tried to solve this in the I-getter method for this STRUCT.TELEPHONETEL field by reading the authorization group and change the rv_disabled value.
    How should I read the authorization group? This is field STRUCT.AUTHORIZATIONGROUP and belongs to the HEADER node.
    Can you please supply me an example code for this?  
    Thanks in advance!!
    Kind regards,
    Roy Willems

    Hi,
    In the get_i method use the below code to get BuilHeader entity.
    Data: lv_entity type ref to cl_crm_bol_entity.
    lv_entity ?= collection_wrapper->current( ).
    lv_entity ?= lv_entity->get_parent( ).
    if lv_entity is not bound.
       lv_authgrp =   lv_entity->get_property_as_string( iv_attr_name = 'AUTHORIZATIONGROUP' ).
    endif.
    Regards,
    Arun
    Edited by: Arun Kumar on Aug 9, 2010 12:58 PM

  • To fetch internal table from context node

    hi,
    how do i fetch an internal table of a respective node?
    Regards,
    Ronita.

    hi ronita....
          you can use the method  get_static_attributes_table in the interface if_wd_context_node.
    ---regards,
       alex b justin

  • Reading global attributes from implementation class

    Hi,
    How to access
                    global attributes of implementation class
                             from getter method of context node class.
    Thanks in advance,
    Srinivas.

    Hi Srinivasa,
    Access the view controller using attribute
    owner
    , Then you can access the global attributes.
    Regards,
    Masood Imrani S.

  • How to read the value of a field belonging to a different context node in GET_I method during runtime

    I want the read the value of a field,'LCSTATUS' belonging to context node 'BTADMINH' in the GET_I method of the field, 'ZZFLD000008' belonging to context node,'ZBTACTIVITYH'.
    In the context node class of context node 'ZBTACTIVITYH',I have created an instance attribute,GR_OWNER type ref to context class.
    I get the following error in the line - lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ).
    'An exception (CX_CRM_CIC_PARAMETER_ERROR) occurred Message no. TPDA430'
    I have used the below code.
    method GET_I_ZZFLD000008.
         DATA: current TYPE REF TO if_bol_bo_property_access,
               lv_act_status TYPE string.
         DATA:lr_entity TYPE REF TO cl_crm_bol_entity,
               lr_current TYPE REF TO if_bol_bo_property_access,
              lr_parent TYPE REF TO cl_crm_bol_entity.
         rv_disabled = 'TRUE'.
         if iterator is bound.
           current = iterator->get_current( ).
         else.
           current = collection_wrapper->get_current( ).
         endif.
    CHECK gr_owner IS BOUND.
    lr_entity ?= gr_owner->btadminh->collection_wrapper->get_current( ).
    CHECK  lr_entity  IS BOUND.
    lv_act_status = Lr_entity->if_bol_bo_property_access~GET_PROPERTY_AS_STRING( 'LCSTATUS' ). "error states that lcstatus can't be used here.
       TRY.
             IF current->is_property_readonly(
                           'ZZFLD000008' ) = abap_false. "#EC NOTEXT
               rv_disabled = 'FALSE'.
             ENDIF.
         CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
               cx_crm_genil_model_error.
           RETURN.
       ENDTRY.
    endmethod.

    Hi,
    LCSTATUS is not an attribute of the BTADMINH structure. It is read using the relation to the status object
    BTADMINH-> BTHeaderStatusSet-> BTStatusHCurrent-> ACT_STATUS.
    Try reading the ACT_STATUS of object BTStatus as given below.
            data: coll   type ref to if_bol_entity_col.
           data: entity type ref to cl_crm_bol_entity,
                         lv_act_status TYPE string.
           entity ?= current.                                                               "BTADMINH entity.
           coll = entity->get_related_entities(
                    iv_relation_name = 'BTHeaderStatusSet' ).    "#EC NOTEXT
           current = coll->get_current( ).
            entity ?= current.
           coll = entity->get_related_entities(
                    iv_relation_name = 'BTStatusHCurrent' ).     "#EC NOTEXT
           current = coll->get_current( ).
            try.
           lv_act_status = current->if_bol_bo_property_access~GET_PROPERTY_AS_STRING(  'ACT_STATUS' ).
             catch cx_crm_cic_parameter_error.
           endtry.
    Regards JP

  • Need status from other Context-Node

    Hello,
    I need the status "STRUCT.ACT_STATUS" from context-node "BTSTATUS" to fill the value help of a new field "STRUCT.ZZORDERADM_H0121" in context-node "BTADMINH" in method "GET_V_ZZORDERADM_H0121". I don't know how to do this.
    Component: BT111H_OPPT
    View: BT111H_OPPT/Details
    Any ideas?
    Thank you,
    Ole.

    Hi,
    see the example code here:
    data: lr_adminh type ref to cl_crm_bol_entity,
          lr_currentstatus type ref to cl_crm_bol_entity,
          lr_btstatush type ref to cl_crm_bol_entity,
          lv_status type string.
         try.
            lr_adminh ?= collection_wrapper->get_current( ).
            lr_btstatush ?= lr_adminh->get_related_entity( 'BTHeaderStatusSet' ).
            lr_currentstatus ?= lr_btstatush->get_related_entity( 'BTStatusHCurrent' ).
            if lr_currentstatus is bound.
              lv_status = lr_currentstatus->get_property_as_string( 'ACT_STATUS' ).
            endif.
         catch cx_sy_ref_is_initial cx_sy_move_cast_error cx_crm_genil_model_error.
          endtry.
    regards
    Ismail

  • Export  WebDynpro context node  to CSV format?

    I have successfully implemented exporting the context node to xml format then open through the Excel following the tutorial : Exporting Context Data into Excel Using the Web Dynpro Binary Cache.
    But now, I need to implement another version that export to CSV format, then open through Excel.
    I remembered I read a blog and some forum posts that mentioned about this solution, but I just could not locate where they are now through SDN search now.
    I will appreciate if someone can point me to those links again.
    Thanks.
    Kent

    Hi Kent,
    I am also developing the application wherein Table data needs to be exported to Excel.
    I am trying to download the WDExcelExport.zip from the foll. link
    https://wwwn.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/bad3e990-0201-0010-3985-fa0936d901b4 [original link is broken]
    But I am getting the error
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    The exception was logged. Inform your system administrator..
    See the details for the exception ID in the log file
    Can you please send me the Sample Application WDExcelExport.zip. My mail id is  [email protected]
    Regards
    Nikhil Bansal

  • Table View with Multiple Context Nodes

    I want to create a table-view consisting of an object composition, e.g. multiple business objects. The chtml:configCellerator -tag supports just one context node which corresponds to just one business object.
    How do you create a table composed by different objects, i.e. BTAdminH and BTAdminI ?
    Edited by: romanglass on May 18, 2010 4:07 PM

    Hi,
    I would suggest to create a new component and not to disturb the standard ones. Because the super class of the header context node (BTAdminH in your case) must be inherited from CL_BSP_WD_CONTEXT_NODE_DTV - Deep table view.
    The dependent nodes must be passed to return parameter rt_result of method GET_SUB_CNODE_DEFINITIONS.
    This cant be done via wizard. I just tried to replicate your scenario. Below are the steps,
    1. create a view with context node BTADMINH as tableview. Then change the super class of the context node to   CL_BSP_WD_CONTEXT_NODE_DTV.
    2. Add another context node BTADMINI and mark it as dependent to BTADMINH.
    3. Now change the super class of context node BTADMINI to CL_BSP_WD_CONTEXT_NODE_TV  (Table View).
    4. Redefine method GET_SUB_CNODE_DEFINITIONS in context node BTADMINH.
    In the view layout you should use cellerator and pass an iterator with interface IF_THTMLB_CELLERATOR_ITERATOR. The interface has a method RENDER_DEPENDANT_OBJECTS which returns the table of dependant objects.
    Regards,
    Arun
    Edited by: Arun Kumar on May 19, 2010 1:01 PM

  • Best way to make my WDA read only when user selects from FPM toolbar

    Using FPM, we've inserted a custom web dynpro application to maintain our gate dates in PPM 5.0.
    When the user presses the Read Only button on the FPM toolbar, what's the best way to turn our fields off? Just create a new attribute in our Component Controller context node and bind it to all the screen fields?

    Hallo Robert,
    I think it is the best and easy way to realize this.

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

Maybe you are looking for