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

Similar Messages

  • 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

  • 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

  • How can i read Attributes from a Node

    Hi,
    I want to write parser to read my configuration file.
    here is my XML file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!-- DOCTYPE Xportal SYSTEM ".\dtd\relation_config.DTD" -->
    <root>
    <value>25</value>
    <group type="Content Relation" color="255, 255, 255" active="1">
         <relationtype> DBNode - Document </relationtype>
    </group>
    <group type="Organisation Relation" color="255, 255, 255" active="1">
         <relationtype> Catalog - Document </relationtype>
         <relationtype> Documentversion - Documentvariant</relationtype>
    </group>
    <group type="Rights Relation" color="255, 255, 255" active="1">
         <relationtype> Catalog - Usergroup</relationtype>
         <relationtype> User - Usergroup </relationtype>
         <relationtype> User - Catalog </relationtype>
         <relationtype> Usergroup - Document </relationtype>
    </group>
    <group type="Desktop Organisation Relation" color="255, 255, 255" active="1">
         <relationtype> MatrixFolder - Document </relationtype>
    </group>
    <group type="System Organisation Relation" color="255, 255, 255" active="1">
         <relationtype> User - Session </relationtype>
    </group>
    <group type="Links Relation" color="255, 255, 255" active="1">
         <relationtype> DBNode - Linkimpl. </relationtype>
         <relationtype> Document - HyperlinkImpl. </relationtype>
         <relationtype> Document - Linkendimpl. </relationtype>
         <relationtype> Variante - Linkendimpl. </relationtype>
         <relationtype> Version - LinkendImpl. </relationtype>
         <relationtype> (ParentDB) - LinkendImpl. </relationtype>
    </group>
    <group type="Matrix Relation" color="255, 255, 255" active="1">
         <relationtype> Bla </relationtype>
         <relationtype> Blalbla </relationtype>
    </group>
    </root>
    and here my program:
    public class RelConfigReader {
    // c'tor
    public RelConfigReader() {}
    public void readConfig() {
    try {
    // Erstellen von DocumentBuilder
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    Document doc = docBuilder.parse(new File("relation_config.xml"));
    // normalize text representation
    doc.getDocumentElement().normalize();
    System.out.println("Root element of document is: " + doc.getDocumentElement().getNodeName());
    // Auslesen der Anzahl der Gruppen
    NodeList listOfGroups = doc.getElementsByTagName("group");
    int totalGroups = listOfGroups.getLength();
    System.out.println("Number of Groups : " + totalGroups);
    for (int s = 0; s < totalGroups; s++) {
    Node groupNode = listOfGroups.item(s);
    if (groupNode.getNodeType() == Node.ELEMENT_NODE) {
    System.out.println("Group " + s + ":");
    Element groupElement = (Element) groupNode;
    // Auslesen von Relation Typen
    NodeList relationTypList = groupElement.getElementsByTagName("relationtype");
    for (int i = 0; i < relationTypList.getLength(); i++) {
    Element relElement = (Element) relationTypList.item(i);
    NodeList textRelList = relElement.getChildNodes();
    System.out.println("Relationtype : " + ( (Node) textRelList.item(0)).getNodeValue().trim());
    catch (SAXParseException err) {
    System.out.println("** Parsing error" + ", line " + err.getLineNumber() + ", uri " + err.getSystemId());
    System.out.println(" " + err.getMessage());
    catch (SAXException e) {
    Exception x = e.getException();
    ( (x == null) ? e : x).printStackTrace();
    catch (Throwable t) {
    t.printStackTrace();
    now to my question. I have the <group> node with type, color and active as attribute of this node. Now i want to read this attributes but I don't know how I can do this. Please help me. Thx for any solution.

    I have the solution! Thx

  • BRF Expression - Implementation class OCA001 - No Context Component Exist

    Dear All,
    I am trying to create an expression in BRF.
    Application class is ISHERCM_PP and Implementation class OCA001 (Access to simple context). As expected after selecting this implementation class Result Type field is not editable. I selected Context 0MODBOOK_CONTEXT, after pressing enter it gives an error message that "First Enter a Result Type". After this I tried to select Context Component, but in F4 there is no values found.
    First time I am creating an expression for implementation class OCA001, please suggest, what I am missing.
    Thanks in Advance
    Sudhir Gupta

    Sudhir,
    Can you explain what you want to do in terms of the business process?
    When the event is triggered there is no information yet available about the where-used lists
    that are created asynchronously after the module bookings are saved. If the module context contained in this structure does not suffice to program a BRF action or expression, the where-used lists can be read from the database additionally*
    *Table Type for Program Type (in this and the last field of the structure the where-used lists are
    contained in their state before the activity that triggered the event was executed. The current state
    must be read from the database if necessary.
    br,
    Rob

  • ICWC: table shows all attributes of context nodes instead of the configured

    Hi,
    after adding an attribute by the assistant (from a BOL-relation of the root object) and setting it to the configuration, the table shows ALL attributes (~20) of the context node. With F2 in the browser I can see, that the right configuration was found (with 5 attributes). Clicking the customizing  icon of the table, the popup is showing the configured attributes. Doing a "Set to default" has no result.
    Removing the added attribute: no change.
    Removing all attributes: no change
    Deleting the configuration and create a new one with the same name: no change
    Please help!!!
    Thanks,
    TW

    Hi everyone,
    the previously described problem could be solved by removing the enhancement of the View and creating a new configuration. The creation of only a new configuration has not solved the problem. However, removing a view enhancement can not be the solution for such a problem!
    Now again we have the problem after adding an attribute at the context node used for the table, the configuration seems to be damaged and the filtering of the attributes does not work. Thus, all available attributes are used. Debugging in the htm-tag has shown that the XML for the configuration is correct and read in the view. Further debugging has not shown any exceptions or any hints on the weird behavior.
    Had anyone of you the same or a similar experience and solved this in another way than removing the enhancement of the view?
    With best regards,
    Kai Lienemann

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

  • Want to import Class Attributes from ERP to PI

    Hi all,
    I'm publishing Asset Information from SAP to PI to an external system.
    The information includes EQUNR,SERNR, TIDNR and Partner information.
    In PI I manually defined a DataType in PI of Asset and then created a service definition.
    I then generated a proxy in ERP to publish the Asset.
    I have generated a class in SE24 ZCL_EQUI and created a publish method which calls the client Proxy and it works fine.
    Here is my question
    Can you import the data definitions(attributes) of the class into PI (similar to how you can import RFC and idocs)?
    The reason I ask is rather than manually definining the message Type in PI it would be much more convenient to import it from the class ZCL_EQUI.
    This way the data would have the same types and I could update PI from SAP.
    I know this may seem a little backwards but it would be useful in this case(think of it as similar to importing an idoc definition).
    One approach I could take is to create a Service Definition for the constructor method (which takes in the Equipment Number and returns all the information). I could then publish that to ESR and import the WSDL into PI and then use the data definitions for the publishing of the equipment. ( a little longwinded but it should work).
    However it looks like for creating the service defintion I'd have to create a function module (RFC enabled) which calls the class.
    I can't see an easy way to create the service definition straight from the class.
    So in summary I suppose I have a couple of questions
    1) Is there a way in PI to import data structures from ERP?
    2) Is there a way in PI to import attributes from classes?
    3) Is there a way to create a service defintion straight from a class (or do you always have to wrap it in a function module)?
    4) Is there a way to generate a WSDL from a class?
    If you have any links or documentation I should read, please let me know.
    Thanks in advance for any help.
    Regards,
    John

    Hi John,
    the answer to all your questions is: No.
    The idea of PI ESR is having a development point for all interfaces. So if you need a data type in ERP, you should rather define the data type in ESR and generate a structure type in ERP with SPROXY.

  • How to create a attribute to context node with the structure that is in DDIC

    Hi,
    I have created a 3 value attributes while creating a view.
    now i have changed the name of the one of the field in my own database table.
    now the problem is, when i open the webui and try to insert a row. i am getting error like "there is no field with that name(previous name) in collection".
    that is not showing the new name that i have changed. so i deleted the attribute from my view and tried to add the attribute again. and while adding a single attribute it is not taking the ddic structure. and one more problem is, when i open the ui it is showing an error like "  the attribute BaseEntityName is not defined or is still initial  "
    someone help me how to add the one more attribute from the same structure & how to provide BaseEntityName.
    Regards,
    Harry

    Hi Harry,
    If my understanding is correct you have added a attribute with name "ZX" and now you have changed the name of the field to "ZZX" and when you try to add the attribute it gives an error.
    In this case, if you are trying to add a attribute with the same name as you have used before. it will not allow so better to use a new name.
    If the attribute is there and if you are not able to get or set the value of it, Please change the attribute name in the getter and setter methods in the set and get property method call, because by default SAP generates a hard coded text for your attribute name in the methods and if you change the name of the field this will not change.
    Thanks,
    Ashok N.

  • 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

  • Accessing impl class attribute

    Hi Experts,
    if i declare one variable in controller class of a view and how can access the variable in contex naode .

    Hi srinivas.yangal,
    You can access the View implementation Class Attributes in Context.
    1] Go to Context Node Implementation Class
    2] Create a attribute GV_VIEW_CONTROLLER in Impl class of Context Node.
    DATA : GV_VIEW_CONTROLLER TYPE REF TO CL_BSP_WD_VIEW_CONTROLLER .
    3] Go to INIT method of Context Node.
    4] Assign instance LV_VIEW_CONTROLLER to GV_VIEW_CONTROLLER of Context Node Impl. Class.
    GV_VIEW_CONTROLLER = LV_VIEW_CONTROLLER.
    Then you can access your Instance attributes defined in View Impl. class inside the context node through GV_VIEW_CONTROLLER attribute as follows.
    ABC = GV_VIEW_CONTROLLER->XYZ.
    Reward points if useful.
    Kind Regards,
    Dhananjay.
    Edited by: Dhananjay SAP CRM on Nov 24, 2011 12:56 PM

  • Selecing old attribute value in an implementation class

    Dear All,
    Am using ADF 11.1.1.3 and am trying to write some validation on an entity's implementation class ( in doDml method ) and i need to compare one attribute old value with the current value ...
    how can i do that ?

    The EntityImpl class has a method      getPostedAttribute(int index) which gets the value originally read for this attribute from the database.
    Timo

  • Removing attributes from node

    Hi,
    Im creating a node and its attributes dynamically and binding it to a table to show a table dynamically. The problem is that when i load a new item, i have to rebuild the node and table because it might have different columns. The node allways has 3 fixed columns (id, name, description) so first i have to remove all of the attributes except the id, name and description. Same for the table columns. Can anyone tell me how to remove attributes from a node or how to differently solve my problem? All i see is how to remove an element but is a data right, not the model?
    Much thanks,
    Hugo Hendriks

    Hi,
    I had a similar situation, where 2 table columns were always present, and the name and type of other columns were only available runtime.
    I simply deleted all data (invalidate()) and recreated the context from scratch after each model execution that impacts the table structure.
    Otherwise, use the API to find the right methods for deleting Nodes and Elements.
    https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/index.html
    Good luck,
    Roelof

  • Read Navigational Attribute from Mulitprovider

    Hi Gurus,
    I need to read a navigational attribute from the Multiprovider in the user exit.  Could you please tell me in detail with coding how to do this ?

    Hi,
    Navigation attributes data exists in master data and not in multiprovider. If you want to use navigation attribute value in EXIT then check which is the base Infoobject and read the Infoobject table, from there you can read the value of required attribute.
    Regards,
    Durgesh.

  • 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

Maybe you are looking for

  • Vi path in "open VI reference" function

    how do I specify a vi in a vi library when using the "open VI reference" function. thank you very much

  • Report Output in PDF using htmldb_example.xslt yields blank page; commas

    I am able to generate a PDF file from a given region using FOP (Formatting Objects Processor). The file that is produced in the Adobe reader produces a nice report with a header and footer region. However, there is always a blank page (containing the

  • XML/XSL parser/processor problem

    Can anyone telle why mij code doesn't work DECLARE XMLdoc CLOB; XSLdoc sys.xslprocessor.stylesheet; HTMLdoc CLOB; HTMLparser sys.xmlparser.parser; XSLprocessor sys.xslprocessor.processor; DOMdoc sys.xmldom.DOMdocument; queryCtx DBMS_XMLquery.ctxType;

  • My MBP from feb 2012 is very slow and crashes a lot?

    I have a mbp from 2012 with crashes a lot, even when i am doing absoluutly noting. opening a tab in safari or doing other simple tasks. My mb just crashed again, my question is if anyone has an idea what the panic reports meens? Interval Since Last P

  • Transferring window xp from one drive to another

    Hi, I have just installed a new drive and loaded it with Leopard and Window XP. I would like to know how to transfer the Windows XP extras that I have on my old internal drive to the new Windows XP that is on my new internal drive. I have left my old