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

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

  • Reading the Context Node in the same Component

    Dear Gurus,
    I have made enhancement to standard view and functionality is working fine.
    Now i need to read the different context node (Different view) from the same component.
    I try to do the way Webdynrpo read the context node  but here there is Wizard and i stucked :-(.
    Can you plz suggest or post small code to read context node.
    Regards.
    ****Poorna****

    Hi,
    If those two views are assinged to one viewset in runtime repositoty, you can read the secod view by following code:
    lv_viewname = me->get_viewarea_content( 'Upper' ).      " here(me =view1)                               
      IF lv_viewname IS NOT INITIAL.
        lr_viewctrl = me->get_subcontroller_by_viewname( lv_viewname ).
        IF lr_viewctrl IS BOUND.
    from here you can read the context nodes.
    Regards,
    S Reddy

  • How to populate the context nodes based on an event

    Hi All,
    I am having a basic problem. I have created a new Webdynpro Abap application. Here, in the main view, i have define a text view as well as a table. I have created context nodes A and B in component controller. The attributes under A are A1 and the attributes of B are B1,B2, and B3. I have also created an action button C in the same view. These have been mapped to the context nodes in the main view. A1 is mapped to the text view and B1, B2 and B3 are mapped to the table.
    My requirement is as follows. When user Clicks on execute, i want to use the value A1 from the text view in a function module and return the values to B1, B2 and B3. B1, B2 and B3 are multiple values mind you.
    I have successfully executed the function module within the WDONACTIONC method. How to i accomplish this Basic Task. Please Help
    Best Regards
    Mazin

    Hi Mazin,
    Step 3 is as follows...
    Say you have a context node, you have to bind this node with table UI element, now this node must contain some context attribute which you have to bind with your columns of table. now say name of context node is cn_table. now what you have to do is get data from FM in the internal table..........
    now move data by using move corresponding or by looping depending on requirement to an internal table which has fields with the same name as that of name of your attributes... this is imp to display the data...... now you can bind this internal table with context node using code below.......
    data lo_nd_cn_table type ref to if_wd_context_node.
      data lo_el_cn_table type ref to if_wd_context_element.
      data ls_cn_table type wd_this->element_cn_table.
      data it_table type wd_this->elements_cn_table.
      data wa_table type wd_this->element_cn_table.
      data it type standard table of t005t.
      data wa type t005t.
    **   navigate from <CONTEXT> to <CN_TABLE> via lead selection
    select * from t005t into TABLE it.
      loop at it into wa.
        wa_table-ca_one = wa-land1.
        wa_table-ca_two = wa-landx.
        wa_table-ca_three = wa-natio.
        wa_table-ca_enable = abap_true.
       append wa_table to it_table.
        endloop.
    lo_nd_cn_table = wd_context->get_child_node( name =
    wd_this->wdctx_cn_table ).
    *   get element via lead selection
        lo_el_cn_table = lo_nd_cn_table->get_element(  ).
    lo_nd_cn_table->bind_table( it_table ).
    ca-one, ca_two, ca_three and ca_enable are name of my context attribute......
    regards
    Pranav
    Edited by: Pranav Nagpal on Dec 22, 2008 10:08 AM

  • Web Dynpro & Adobe Interactive Forms - how to update the context node

    Hi Experts,
    I got a WD Component with some context nodes that are mapped to some views and are filled in this views. These context nodes are the dataSource for the Interactive Forms. These forms are embedded in a view by UIElement Interactive Forms.
    My problem is, everytime when I change the structure of the context nodes (i.e. there's an additional attribute necessary), I have to design new forms to get the context nodes linked to the form. My existing forms cannot handle updated context nodes.
    The change in the context node is displayed on web dynpro side, in the dataSource view in UIElement property. But in TA sfp there is the old context node structure displayed without any change (i.e. in number of attributes).
    My forms' layout type is ZCI Layout the interface is based on XML.
    How can I easily update the forms' context node structure without creating new forms every time?
    Thanks in advance,
    Tan

    ok, got it.
    by double clicking on templateSource in UIElement properties the interface can be updated.
    Regards from Murphy's Law.
    Tan

  • XMLTable.. how to reading the parent node..

    <CONTEXT>
    <UID>
    <id>23</id>
    <STARTTIME>01/01/2010</STARTTIME>
    <STOPTIME>01/31/2010 23:59:59</STOPTIME>
    <ACCOUNTID>
    <acctid>Ac1</acctid>
    <METERID>
    <namek>METER1</namek>
    <DETERMINANTVALUES>
    <value>
    <name>RECORDED_KWH</name>
    <reading_charges>13955.58</reading_charges>
    <cost>2.81</cost>
    </value>
    <value>
    <name>STRND_KW_CHARGES</name>
    <reading_charges>89.84</reading_charges>
    <cost>2.01</cost>
    </value>
    <value>
    <name>DEL_CHARGES</name>
    <reading_charges>891.84</reading_charges>
    <cost>5.29</cost>
    </value>
    </DETERMINANTVALUES>
    </METERID>
    <METERID>
    <namek>METER2</namek>
    <DETERMINANTVALUES>
    <value>
    <name>RECORDED_KWH</name>
    <reading_charges>139553.58</reading_charges>
    <cost>2.81</cost>
    </value>
    <value>
    <name>STRND_KW_CHARGES</name>
    <reading_charges>893.84</reading_charges>
    <cost>2.01</cost>
    </value>
    <value>
    <name>DEL_CHARGES</name>
    <reading_charges>8913.84</reading_charges>
    <cost>5.29</cost>
    </value>
                        </DETERMINANTVALUES>
                   </METERID>
                   </ACCOUNTID>
         </UID>
    </CONTEXT>
    This XML data is read and put into an XMLType variable. We want each meters different values to be different rows:
    select t.*
    from
    XMLTABLE('for $i in /CONTEXT/UID/ACCOUNTID/METERID/DETERMINANTVALUES/value return $i'
    passing var1
    COLUMNS
    detval1 varchar2(100) PATH 'reading_charges',
    meterid varchar2(100) PATH '../../name'
    ) t;
    but the meterid fetches null value .. how can we fetch
    uid1, accountid1, reading_charge1, cost1
    uid1, accountid1, reading_charge2, cost2
    uid1, accountid1, reading_charge3, cost3
    Edited by: user3178919 on Feb 10, 2010 7:49 AM

    Heres the formatted XML:
    <CONTEXT>
         <UID>
              <id>23</id>
              <STARTTIME>01/01/2010</STARTTIME>
              <STOPTIME>01/31/2010 23:59:59</STOPTIME>
              <ACCOUNTID>
                   <acctid>Ac1</acctid>
                   <METERID>
                        <namek>METER1</namek>
                        <DETERMINANTVALUES>
                             <value>
                                  <name>RECORDED_KWH</name>
                                  <reading_charges>13955.58</reading_charges>
                                  <cost>2.81</cost>
                             </value>
                             <value>
                                  <name>STRND_KW_CHARGES</name>
                                  <reading_charges>89.84</reading_charges>
                                  <cost>2.01</cost>
                             </value>
                             <value>
                                  <name>DEL_CHARGES</name>
                                  <reading_charges>891.84</reading_charges>
                                  <cost>5.29</cost>
                             </value>
                        </DETERMINANTVALUES>
                   </METERID>
                   <METERID>
                        <namek>METER2</namek>
                        <DETERMINANTVALUES>
                             <value>
                                  <name>RECORDED_KWH</name>
                                  <reading_charges>139553.58</reading_charges>
                                  <cost>2.81</cost>
                             </value>
                             <value>
                                  <name>STRND_KW_CHARGES</name>
                                  <reading_charges>893.84</reading_charges>
                                  <cost>2.01</cost>
                             </value>
                             <value>
                                  <name>DEL_CHARGES</name>
                                  <reading_charges>8913.84</reading_charges>
                                  <cost>5.29</cost>
                             </value>
                        </DETERMINANTVALUES>
                   </METERID>
              </ACCOUNTID>
         </UID>
    </CONTEXT>
    Expected output:
    UID-ID, ACCOUNTID-acctid, METERID-NAME, DETERMINANT-value-reading-charges
    23 Ac1 METER1 13955.58
    23 Ac1 METER1 89.84
    23 Ac1 METER1 891.84
    because if we do as shown below the meterid value comes as NULL (not able to go the parent node and get the values)
    select t.*
    from
    XMLTABLE('for $i in /CONTEXT/UID/ACCOUNTID/METERID/DETERMINANTVALUES/value return $i'
    passing var1
    COLUMNS
    detval1 varchar2(100) PATH 'reading_charges',
    meterid varchar2(100) PATH '../../name'
    ) t;
    IF we do 'for $i in /CONTEXT
    return $i//UID/ACCOUNTID/METERID/DETERMINANTVALUES/value'
    - will we be able to get the paret node value
    Can this be achieved using multiple XMLTable only can be achieved using single XMLTable?

  • How to Edit the xml node value using flex from the front end UI

    Hi All,
    I am having a use case with flex 4.6
    1> To read the external xml file
    2> Display the tree structure in the front end UI
    3> Edit the node values of the xml file from the front end UI and save it back
    How to go about the above use case, any blogs or links on the above case will be help
    Thanks,
    Alok

    Check this is example:
    http://blog.flexexamples.com/2009/07/23/deleting-nodes-from-an-xml-object-in-flex/

  • How to read the indicator for arbitrary use (RKEPA - T550A)

    Hi Everyone,
    I would like to use (retrive data from) the "Indicator for arbitrary use" field (RKEPA) of the Daily Work Schedules screen (table T550A) in Time Evaluation. I checked the documentation for HRS?S, HRS1T and VARST but didn't find anything.
    Could someone help me ?
    Thanks in advance,
    Zakaria.

    I think you will have to write your own operation, Zakaria.
    Actually it's quite normal to write general parametric operations for retrieval of additional fields that SAP does not provide for.
    Good luck!
    Rodrigo

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • How to read the details in the context node of the custom controller

    Hi friends,
        My requirement is i enhanced the component ICCMP_BP_DETAILS , now on EH_ONSAVE i want to read the details of the Context node in the Custom COntroller .
    In custom controller from ICCMP_BP_DETAIL/CuCoBPDuplicate  From this in context node CUSTOMER is there in that attributes first name last name is there i want to read those details
    so can u pls provide the logic for this how can i get the values.
      am very new to the BSP programming
    Regards
    Yogesh

    Hi Suchitha,
    when i am following the above code the lr_entity is not Bound, so can u pls suggest is there any thing is missing
    i used the below mention code but lr_entity is not bound
    DATA: lr_cuco type ref to CL_ICCMP_BP_CUCOBPDUPLICA_IMPL.
                lr_entity type ref to cl_crm_bol_entity.
    lr_cuco ?= me->get_custom_controller( 'ICCMP_BP_DETAIL/CuCoBPDuplicate') .
    CHECK lr_cuco IS BOUND.
    lr_entity ?= lr_cuco->typed_context->customer->collection_wrapper->get_current( ) .
    CHECK lr_entity IS BOUND .
    lr_entityIF_BOL_BO_PROPERTY_ACCESSGET_PROPERTY_AS_VALUE( iv_attibute =  'FIRST_NAME' ev_attribute = lv_firstname ) .
    Please correct the code if any thing is missing
    Regards,
    Yogesh

  • 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

  • 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

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

Maybe you are looking for

  • Extending oracle sourcing

    Hello, I am extending oracle sourcing. I copied all class and xml files under myclasses and tried to test in local Jdev. But the error always show like following: Could everybody help me out? Thanks a million. oracle.apps.fnd.framework.OAException: o

  • Third party G/L account

    What should be default g/l account to be assigned for a third party purchase order with acct assmt & item cat as third party. PO is created wrt third party sales order.

  • How do I disable auto-renewal for an annual subscription?

    I would like to stop the auto renewal for an annual subscription and can find no way to do so.  If I cancel the subscription, I get charged.  If the subscription renews, I need to cancel it and will still get charged.  I'd like to have the subscripti

  • Withhold tax error

    Hi experts, When I am creating the remittance challans (  T Code J1INCHLN ) following error i got  Business Place for document  could not be determined Message no. 8I707 But I created business place and assign to Company code Could you pl give me ful

  • OUTPUTFIELD_TOO_SHORT in SAPF100

    Hi, We tried to execute the program SAPF100 and we obtain a short dump with the next message: A raise statement in the program "saplicon" raised the exception condition OUTPUTFIELD_TOO_SHORT. Since the exception was not intecepted by a superior progr