Binding model nodes - seeming repetition?

Hello,
When creating a WD app using Adaptive RFC Model (or any model I assume), it is necessary to create a data link between the Model and Component Controller.  Visually, the fields of the nodes of the Model and the fields of the model nodes of the Controller are linked.  Why, then, is it necessary to again bind the model node of the Controller to the model object using the ".bind" method?
Code as shown here is a classic example:
     Bapi_Usr01Dohr_Getemployee_Input bapiInput = new Bapi_Usr01Dohr_Getemployee_Input();
     wdContext.nodeBapi_Usr01Dohr_Getemployee_Input().bind(bapiInput);
     bapiInput.setId("MY_USERID");
     try {
          bapiInput.execute();
     } catch (Exception exc) {
          IWDMessageManager msgManager = wdComponentAPI.getMessageManager();
          msgManager.raiseException(exc.getMessage(), true);
Clearly the visual binding in the diagram view of the component controller and the programmatic binding using the .bind method of the model node are doing different things.  My question is, what is the difference?  Why are both required?

Michael,
There are actually 3 activity types, and sadly one of them has not the best name:
1. Map at run-time / design-time model to context node (make metadata structure, that mimics model structure, possibly with renaming of target attributes / sub-nodes)
2. Map at run-time / design-time (or as you say "link") 2 nodes in different controllers (make metadata structure, that mimics structure of node's metadata in another controller, possibly with renaming of target attributes / sub-nodes)
3. "Bind" at run-time-only data to node, that was previously described as metadata either using IDE at design-time or at run-time.
So, there is no repetition: you create metadata once (ok, more logically "once" then physically), then you may assign different data to resulted node via bind several times.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • How to bindi a UI element to 2 model nodes different in the same view

    I want to know how I can bind a set of inputfields, in a form view, to 2 different model nodes ?
    <u>example:</u>
    Im working with 2 adaptional RFC, both working, in my Custom Context.
    Ztest_Search
    Ztest_Update
    In my ResultView I have 2 Model nodes (one for each RFC) I show a set of inputfields in a form view, binded to the Ztest_Search_output of Ztest_Search. This works.
    now I want to update the changes, but I can't find the ways of binding the same inputfields to my other Model node (Ztest_Update) in the context of ResultView.
    Note: If I create a duplicate set of inputfields , one for Ztest_Search binded to the Ztest_Update_output and the other to the Ztest_Update_Input Works. But I wanna avoid this duplicated set of inputfields.
    Thx

    Rodrigo,
    If I understood correctly, your problem is to get the data from the input fields which are bound to a
    model node, Ztest_Search_output and set it to the model node of another RFC, Ztest_Update.
    This can be done by getting the suitable values from the model attributes of Ztest_Search_output
    and setting it to Ztest_Update.
    <b>/**
    * valueOne, valueTwo are the name of the model   
    * attributes that are bound to the Input fields.
    */</b>
    String firstValue = wdContext.currentZtest_Search_outputElement
         ().get<valueOne>;
    String secondValue = wdContext.currentZtest_Search_outputElement
         ().get<valueTwo>;
    Ztest_Update_Input update = new Ztest_Update_Input();
    wdContext.nodeZtest_Update_Input().bind(update);
    <b>/*
    *<b>Zstructure is the structure of the model node under
    *Ztest_Update_Input to which the values have to be 
    *updated.</b>
    */</b>
    ZStructure structure = new ZStruture();
    structure.setValueOne(valueOne);
    structure.setValueTwo(valueTwo);
    update.addZStructure(structure);
    try
       update.execute();     
    catch (Exception ex)
       wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);                     
    wdContext.nodeZtest_Update_Output().invalidate();
    Bala

  • Error in model node binding

    Hi All,
    I am facing some strange problem of model node binding.I have bound the model node to a model class.I am using Wizard to generate this model node binding.
    To deploy this DC I am using NWDI .But the activation step is failing because of some build errors.moreover these build errors are not appearing at design time!!
    CBS error log is as below :
    [Error]   com.bhc.nextgen.sales.suppcatapp.SuppCatLookupComp --> ContextModelNode Zrfc_Sd_Quote_Supplier_Search_Input [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
    Dose anyone know how to solve this?
    Thanks,
    Kanchan

    Hi
    I'm not sure if I understand you completely but instead of manually creating a model node which you bind to your model you could - in Diagram View - right click on the Data link and drag and drop your model from right to left and it will automatically create the needed model class references etc.
    Br
    Göran

  • Creation of new element in Model Node

    Dear All,
    I am facing one problem, I have two  model node. I want to copy one model node to other model node.while copying its giving error saying the you can bind the element, coz target node doesn't have valid parent.
    Pl don't suggest me work on Value node.
    Can i create a element in model node at run time.
    Thanks & Regards
    Manoj Sahoo

    Hi Manoj,
                   Model node properties :
    1.A context model node makes a model object look like any other context node.  I.E. it gives the model object an API that is very similar to a value node.
    2.  A model node is not considered valid until it is bound to a corresponding model object.  Therefore, a model node always inherits its metadata from the model object to which it is bound.
    3. The element collection in a model node does not hold the actual runtime data!   Instead, it holds a list of references to the relevant model object instances.
    If u check the 2nd property, u will find the cause of ur exception. As u have already told, don't suggest to use value nodes, i don't have any other comment.
    regards
    Sumit

  • Accessing model node with cardianlity 1 to 1 throwing error

    Hello All,
    I'm try ing to set values to a model node in the request for a mass update.
    in teh model nodes, one of the model node is mandatory with 1:1 cardinality.
    i cannot call the currentElement() nor the create and addelement
    both throwint the same error as below.
    I'm using CE 7.2 engine, and its very critical for me to complete this update.
    com.sap.tc.cm.base.exception.BaseModelRuntimeException: No object for mandatory target role 'Position' of model class 'uk.co.apps.bertha.wdj.model.wd.models.managets.PositionWrapper' with cardinality 'ONE' maintained
        at com.sap.tc.cm.base.model.BaseGenericModelClass.getRelatedModelObject(BaseGenericModelClass.java:436)
        at com.sap.tc.webdynpro.model.webservice.gci.WSTypedModelClass.getRelatedModelObject(WSTypedModelClass.java:82)
        at com.sap.tc.webdynpro.progmodel.context.DataNode.doSupplyElements(DataNode.java:162)
        at com.sap.tc.webdynpro.progmodel.context.DataNode.supplyElements(DataNode.java:106)
        at com.sap.tc.webdynpro.progmodel.context.Node.getElementListAsObject(Node.java:244)
    the generated code, i have a list to which i have to bind this node to, there is no code generated as i see it.
    i tried regenerating and it doesnt help.
    the following is the complete stack
    com.sap.tc.cm.base.exception.BaseModelRuntimeException: No object for mandatory target role 'Position' of model class 'uk.co.apps.bertha.wdj.model.wd.models.managets.PositionWrapper' with cardinality 'ONE' maintained
      at com.sap.tc.cm.base.model.BaseGenericModelClass.getRelatedModelObject(BaseGenericModelClass.java:436)
      at com.sap.tc.webdynpro.model.webservice.gci.WSTypedModelClass.getRelatedModelObject(WSTypedModelClass.java:82)
      at com.sap.tc.webdynpro.progmodel.context.DataNode.doSupplyElements(DataNode.java:162)
      at com.sap.tc.webdynpro.progmodel.context.DataNode.supplyElements(DataNode.java:106)
      at com.sap.tc.webdynpro.progmodel.context.Node.getElementListAsObject(Node.java:244)
      at com.sap.tc.webdynpro.progmodel.context.Node.getElements(Node.java:251)
      at com.sap.tc.webdynpro.progmodel.context.Node.getElementAtInternal(Node.java:390)
      at com.sap.tc.webdynpro.progmodel.context.Node.getCurrentElementInternal(Node.java:689)
      at com.sap.tc.webdynpro.progmodel.context.Node.getCurrentElement(Node.java:696)
      at uk.co.apps.bertha.wdj.ui.ts.wd.comp.tscomp.wdp.IPublicTeamStructComp$IPositionUpdateNode.currentPositionUpdateElement(IPublicTeamStructComp.java:10729)
      at uk.co.apps.bertha.wdj.ui.ts.wd.comp.tscomp.TeamStructComp.saveMyChildren(TeamStructComp.java:920)
      at uk.co.apps.bertha.wdj.ui.ts.wd.comp.tscomp.TeamStructComp.saveNewChangedTeam(TeamStructComp.java:882)
      at uk.co.apps.bertha.wdj.ui.ts.wd.comp.tscomp.wdp.InternalTeamStructComp.saveNewChangedTeam(InternalTeamStructComp.java:925)
      at uk.co.apps.bertha.wdj.ui.ts.wd.comp.tscomp.TeamStructEditView.onActionSubmitSuccess(TeamStructEditView.java:481)
      at uk.co.apps.bertha.wdj.ui.ts.wd.comp.tscomp.wdp.InternalTeamStructEditView.wdInvokeEventHandler(InternalTeamStructEditView.java:523)
      at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:142)
      at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:75)
      at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:159)
      at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.execute(ProcessingEventPhase.java:94)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:162)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:110)
      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseLoop(WindowPhaseModel.java:101)
      at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processPhaseLoop(WebDynproWindow.java:547)
      at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.handleWindowHierarchyChanges(AbstractClient.java:108)
      at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:56)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1652)
      at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1466)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:884)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessing(ApplicationSession.java:856)
      at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:343)
      at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:315)
      at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
      at com.sap.tc.webdynpro.serverimpl.wdc.DispatcherServlet.doContent(DispatcherServlet.java:76)
      at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:62)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
      at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
      at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:400)
      at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:203)
      at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:438)
      at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:427)
      at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:80)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
      at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
      at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
      at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
      at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
      at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
      at com.sap.engine.core.thread.execution.Executable.run(Executable.java:115)
      at com.sap.engine.core.thread.execution.Executable.run(Executable.java:96)
      at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:315)

    Thanks for reply,
    but i can't understand what is myModel indicates in the below code?
    Request_EmployeeManagementLocal_updateEmployee reqMod =
          new Request_EmployeeManagementLocal_updateEmployee(myModel);
    //Check empl model class will be there , create an object for that
          Employee objEmpl=new Employee(myModel);
    regards,
    Pradeep Kumar

  • Mapping Model Nodes

    Hi Gurus,
    Can anybody tell me , which is the best practise for mapping a structure to view through Component Controller .
    1) Setting all the model node values to a Value node on controller level and Map to the view
    2) Directly mapping the model node from controller to View .
    Please tell me the advantage also ?
    Thanks  in advance .
    Tony Isaac.

    Hi Tony,
    This looks quite wiered. As far as I think EHP1 should not restrict you to bind any modeled node attribute with the UI element. This is very basic requirement and as I said earlier if the scenario demands then we always bind teh values directly to the UI element.
    It makes no sence in first copying the values of the modeled node to the value node and then used the value nodes and finally take the values of the value node, copy them back to modeled node and finally save it. It will definitely hinder the performance. And in scenariois where we have lot of attributes in the structure then in all such cases the performance will be decresed drastically.
    Therefore I dont feel that there will be any such restriction on this.
    I hope this helps!
    Thanks and Regards
    Pravesh

  • Java.lang.NullPointerException in RFC model node

    Hi All,
    I am calling one of RFC from CRM system but getting some NullPointerException in model node.
    Details:
    1. creating input node
    2. pass parameter and bind input node
    3. execute node
    4. invalidate output node
    I am getting this exception when I accessing attributes from output node.
    Why my output node is not invalidated / refresh.
    Please solve this problem.
    Thanks,
    Krishna.

    Hi Krishna,
    Before every BAPI call are you resetting the input param values if any??
    Pls Verify this.
    -Ashwini.

  • Duplicate records in input structure of model node

    Hi,
    Following is the way, I am assigning data to a model node:
    //Clearing the model input node
    for (int i = wdContext.nodeInsppointdata().size(); i > 0; i--)
         wdContext.nodeInsppointdata().removeElement(wdContext.nodeInsppointdata().getElementAt(i - 1));
    //Creating element of the input model node
    IPrivateResultsView.IInsppointdataElement eleInspPointData;
    //START A
    Bapi2045L4 objBapi2045L4_1 = new Bapi2045L4(); //Instance of the input structure type
    //Populating data
    eleInspPointData = wdContext.nodeInsppointdata().createInsppointdataElement(objBapi2045L4_1);
    wdContext.nodeInsppointdata().addElement(eleInspPointData);
    eleInspPointData.setInsplot(wdContext.currentContextElement().getInspectionLotNumber());
    eleInspPointData.setInspoper("0101");
    //Inspection_Validate_Input is the model node. Adding instance to main node
    wdContext.currentInspection_Validate_InputElement().modelObject().addInsppointdata(objBapi2045L4_1);
    //STOP A
    //Now executing the RFC
    Above code seems to be fine. Works very well for the first time. But, when the user clicks on the same button for the second time, I can see duplicate records getting passed to RFC [Debugged using external breakpoint]. When I am sending 4 records, I can see there are total of 6 records. The number keeps increasing when clicked on the button.
    I am adding multiple records to input model node using the code from START A to STOP A. Does the code look fine? Why do I see multiple records?
    Thanks,
    Sham

    Issue solved.
    After executing RFC, I used following code to clear the input model node:
    try
         wdContext.current<yourBAPI>_InputElement().modelObject().get<yourinputnode>().clear();
    catch (Exception e1)

  • How to Transper data Model Node to Vallue Node

    Hi Friends
    I am getting problem in Create the Check box in Table
    I am getting model node from ECC System(Zmmoa_Pending_Getlist_Input)
    This is path for attributes avaliable
    Zmmoa_Pending_Getlist_Input-Output-outtab 
    Under outtab  all attributes available
    My Requrement is display Check box. So I am doing like this I will care one more Vallue Node (OutTab_1) under this Vallue Node I put I have node attributes.here I careate one Check boxdatatype --Boolean(i.e Under outtab attributes)
    Now I will get data from ModelNode and send that data to Vallue Node(by this node that data display in table formate.Eache Row Having Check box)
    So I have to this Code But Data is Not getting in Vallunode table
    in FirstView
    in Submit Button
    public void onActionGetData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGetData(ServerEvent)
        //$$begin ActionButton(1164287125)
        //wdThis.wdGetExamp2CompController().checkSRA();
         wdThis.wdGetExamp2CompController().checkBox();
        wdThis.wdFirePlugToSV();
        //$$end
        //@@end
    This is code writen in CC
    public void checkBox( )
        //@@begin checkBox()
        //Date today = new Date(System.currentTimeMillis());
        IWDMessageManager mes = wdComponentAPI.getMessageManager();
        try
             Zmmoa_Pending_Getlist_Input input1 = new Zmmoa_Pending_Getlist_Input();
             wdContext.nodeZmmoa_Pending_Getlist_Input().bind(input1);        
              wdContext.currentZmmoa_Pending_Getlist_InputElement().modelObject().execute();
              wdContext.nodeOuttab().invalidate();
    //          IPrivateExamp2Comp.IOutTab_1Element elem = wdContext.nodeOutTab_1().getOutTab_1ElementAt(i);         
             //mes.reportSuccess("Input:" +wdContext.nodeOuttab().size());
                      for (int i =0; i < wdContext.nodeOuttab().size(); i++)
                   //mes.reportSuccess("Input Of I:" +wdContext.nodeOutput().size());
                   //mes.reportSuccess("Input:" );
                   IPrivateExamp2Comp.IOuttabElement  elem = wdContext.nodeOuttab().getOuttabElementAt(i);
                   //wdComponentAPI.getMessageManager().reportSuccess("elem::  "+elem);
                   IPrivateExamp2Comp.IOutTab_1Element result = wdContext.nodeOutTab_1().createOutTab_1Element();
             //Zbapiresult result = new Zbapiresult();
             result.setCheckBox(false);
             result.setConf_Shp_Date(elem.getConf_Shp_Date());        
              wdComponentAPI.getMessageManager().reportSuccess("Conf_Shp_Date::  "+elem.getConf_Shp_Date());
             result.setExpt_Shp_Date(elem.getExpt_Shp_Date());
             result.setMaterial(elem.getMaterial());
             result.setMatl_Desc(elem.getMatl_Desc());
             result.setOa_Quantity(elem.getOa_Quantity());
             result.setOpn_Quantity(elem.getOpn_Quantity());
             result.setPo_Item(elem.getPo_Item());
             result.setPo_Number(elem.getPo_Number());
             result.setPo_Status(elem.getPo_Status());
             result.setPur_Group(elem.getPur_Group());
             result.setStat_Date(elem.getStat_Date());
             result.setQuantity(elem.getQuantity());
             wdContext.nodeOutTab_1().addElement(result);
         catch(Exception e)
                   mes.reportException(e.getMessage(), false);
        //@@end
    can u help me
    how to Transper data Model Node to Vallue Node. By using vallue node that data will display in table format with Check box.
    I need data display in table format with Check box
    Regards
    Vijay Kalluri

    Hi Vijay,
    TO copy values from Model Node to Value Node use the copyElements() method of the WDCopyService API. To acheive this, the name and type of the attibutes in the Value Node should be same as Model node attributes.
    Example: -
    Model Node <----
    > Value node
    ---Name-String                                       ---Name - String
    ---Number-Integer                                  ---Number -  Integer.
    then use the following statement:
    WDCopyService.copyElements(wdContext.node<ModelNode>(),wdContext.node<ValueNode>());
    This will copy all the values.
    Regards,
    Poojith MV

  • How to addRecord in Web Dynpro to Model node (Entity Service ref)

    Hi,
    1) I create Entity Service in CAF and try to write web dynpro Table UI for it.
    2) is it possible with using Model Node? or I MUST use Value Node - Table must have possibilities for Add, Edit and Delete records.
    Now I can edit, and delete records, but I can't add records with AddRecord method
    Code below
      public void NewTS( )
         //@@begin NewTS()
       IServiceFacade serviceFacade;
    // Add new Model object TS
       ATS ts = TSServiceProxy.create();
       ts.setDate( new Date(System.currentTimeMillis()));
       ts.getAspect().sendChanges();
       serviceFacade = CAFServiceFactory.getServiceFacade(tsDefinition.class);
    // try to addRecord to Controller context     
       IWDNodeElement n = wdContext.nodeTS().createElement(ts);
       wdContext.nodeTS().addElement(n);
    The error is: com.sap.caf.rt.exception.CAFBaseRuntimeException:
    Aspect row is invalid for aspect:   <Aspect name="TS" >
    Thx for any help

    Hi Nikolai,
    implement it in the following way:
    wdInit()
         IAspect originalAspect = TSServiceProxy.FindByName(employee) ;
         wdContext.nodeTS().bind(originalAspect)
         //just create new attribute this java native type IAspect
         wdContext.currentContextElement().setOriginalAspect() ;
    public void NewTS( )
    //@@begin NewTS()
         IAspect originalAspect = wdContext.currentContextElement().getOriginalAspect() ;
            IAspectRow newTS = originalAspect.createAspectRow() ;
            newTS.setAttributeValue("date", new Date(System.currentTimeMillis())) ;
    or
    public void NewTS( )
         IAspect originalAspect = wdContext.currentContextElement().getOriginalAspect() ;
            IAspectRow newTS = originalAspect.createAspectRow() ;
         ITSElement tsElem = wdContext.nodeTS().getTSElementAt(originalAspect.indexOf(newTS)) ;
            tsElem.setAttributeValue("date", new Date(System.currentTimeMillis())) ;
    Best regards,
    Aliaksei

  • Business Graphics and model nodes

    Hello,
    is it possible to bind a business graphics UI element in Java WebDynpro to a model node or does it have to be a value node?
    Thanks,
    Michael

    exactly!
    many ways to do this
    1.U can use WDCopyService(Source ,Target)  here Source : return node of model data
                                                                               Target : Your temporary value node which bound to BG.
    Note : Each time when ever model data get updated(CRUD) u have to call this node.
    2. Use Mapping type node and bind it to BG ui element  exe : when we create any node It has 4 options one of them is Mapping select this and provide the model node
      (mapping of node with model node is replica of the content there in model node, here u don't have to worry about updated content since its replica and get changed eveytime when model operations is performed)
    Best Regards
    Satish Kumar

  • Add value to model nodes

    hi all,
    I have to populate a model node and execute the RFC so that its updated at the backend and the nodes are once again refreshed.
    <b>It_Prcgprdg()</b> is the model to which i have to add the record which should be added in the backend and the outputnode should be refreshed.
    here's my code.
        IPrivatePriProdGrpView.IIt_PrcgprdgElement prod = wdContext.createIt_PrcgprdgElement(new Zsd_Pmt_S_Prcgprdg());
       wdContext.nodeIt_Prcgprdg().validate();
       prod.setZprigrp(wdContext.nodeEt_Pricegrp_out().getEt_Pricegrp_outElementAt(lead1).getZprigrp());
       int Size = wdContext.nodeEt_Prodgrp_out().size();
      for( int i = 0; i< Size;i++)
        int lead = wdContext.nodeEt_Prodgrp_out().getLeadSelection();
        if(wdContext.nodeEt_Prodgrp_out().isMultiSelected(i) || lead == i )
        prod.setZchngusr(Username);
        prod.setZprodgrp(wdContext.nodeEt_Prodgrp_out().getEt_Prodgrp_outElementAt(lead).getZprodgrp());
        wdContext.nodeIt_Prcgprdg().addElement(prod);
    wdThis.wdGetPricingGrpCompController().execute_RFC();
    Please correct if my code is wrong.
    Thanks in advance,
    Gopi

    Hi bala,
    <b>Zsd_Pmt_Pricegrp_Rfc_Input input1 = new Zsd_Pmt_Pricegrp_Rfc_Input();
           wdContext.nodeZsd_Pmt_Pricegrp_Rfc_Input().bind(input1);
       int lead1 = wdContext.nodeEt_Pricegrp_out().getLeadSelection();
       int outSize = wdContext.nodeEt_Prodgrp_out().size();
      for( int i = 0; i< outSize;i++)
        int lead = wdContext.nodeEt_Prodgrp_out().getLeadSelection();
        if(wdContext.nodeEt_Prodgrp_out().isMultiSelected(i) || lead == i )
       //Zsd_Pmt_S_Prcgprdg prod is the struc of It_Prcgprdg
       Zsd_Pmt_S_Prcgprdg prod = new Zsd_Pmt_S_Prcgprdg();
         prod.setZchngusr(Username);
         prod.setZprigrp(wdContext.nodeEt_Pricegrp_out().getEt_Pricegrp_outElementAt(lead1).getZprigrp());
       prod.setZprodgrp(wdContext.nodeEt_Prodgrp_out().getEt_Prodgrp_outElementAt(lead).getZprodgrp());
        input1.addIt_Prcgprdg(prod);
      wdContext.currentZsd_Pmt_Pricegrp_Rfc_InputElement().setIv_Zoperation("P");
        wdThis.wdGetPricingGrpCompController().execute_RFC();</b>
    I have written the above code in the <b>onActionAddProduct</b> method of the iview. I need to add the products to backedn when user clicks the buttonADD.
    <b>Zsd_Pmt_Pricegrp_Rfc_Input input1 = new Zsd_Pmt_Pricegrp_Rfc_Input();
           wdContext.nodeZsd_Pmt_Pricegrp_Rfc_Input().bind(input1);
    <b>Zsd_Pmt_Pricegrp_Rfc_Input input1 = new Zsd_Pmt_Pricegrp_Rfc_Input();
           wdContext.nodeZsd_Pmt_Pricegrp_Rfc_Input().bind(input1);
    <b>Zsd_Pmt_Pricegrp_Rfc_Input</b> node i have already initialized in compcontroller as
    Zsd_Pmt_Pricegrp_Rfc_Input inpri = new Zsd_Pmt_Pricegrp_Rfc_Input();
           wdContext.nodeZsd_Pmt_Pricegrp_Rfc_Input().bind(inpri);
    Still i am unable to update the data. Do i need to write the code in compcontroller only?
    <b>Iv_Zoperation</b> is the import parameter in RFC. i need to send this as "P".
    Please suggest me.
    gopi
    Message was edited by: gopi nidjelli

  • Binding value nodes to component in a view

    Hi,
          What is the use of these value nodes and value attributes? How can I bind them to, say a inputfield in my view? Can any change to the value node dynamically affect the inutfield?

    Thanks to Peter Conrad for the answer. The answer's in a different post. I have included his reply below.
    From a binding perspective there's no difference between value or model nodes/ attributes. you can always bind using the syntax
    //<contextnode/attribute to the value attribute of the tag.
    And yes, for accessing the value the SET_<attribute> and GET_<attribute> methods should be used in this case.
    Peter
    Edited by: Arun Prakash Karuppanan on May 15, 2008 10:24 PM

  • WebService Model Node

    Hi experts,
    I have worked with WebDynpro Java. There is it possible to create a WebService Model with a Wizzard. After that you can
    drag and drop Model Nodes to the context node and view and bind them to a view.
    Is this not possible in abap? Have I to create all Nodes and attributes by my own without wizzards support?
    This could be a lot of work for a complex service 
    Thansk in advance

    Hi SAP User,
    In Webdynpro ABAP you can not drag and drop to the context node to create them, but you can use a wizard to add Nodes with a certain data dictionary structure.
    Since the Webservice (you probably mean BAPI / Function Module) is always using data dictionary elements/structures as importing and exporting parameter, it might be more work as in Webdynpro Java but it's still relatively fast..
    So you have some kind of wizard support, but not as complete as in Java.
    Regards,
    Roelof

  • Unable to set Data in MODEL NODE ??????

    Hello All,
    I have created a Web Dynpro application which makes  RFC or BAPI calls.
    I need to <b>pass data to the BAPI as input parameter, but am failing to do so.</b>
    The Context structure for the model node is as follow -
    Level1 - Z_Mm_XXX_Input
    Level2 - Output_Repo
    Level3 - T_Plants_Selected_Repo of structure type "Werks"
    and supplying function "T_Plants_Selected"
    This contains the model attribute as Werks.
    Now i need to send this Werks attribute and pass it to the BAPI
    I have written the following piece of code -
    Z_Mm_XXX_Input zbapi_ip =
                   new Z_Mm_XXX_Input();
    com.xxx.Werks plants_sel = new com.xxx.Werks();
    plants_sel.setWerks("4522");
    zbapi_ip.addT_Plants_Selected(plants_sel);
    wdContext.nodeZ_Mm_Cmet_Report_Contrctr_Cse4_Input().bind(zbapi_ip);     
    The attributes for the model node Z_MM_XXX_input node is -.
    cardinality - 0..1
    selection - 0..1
    singleton - true
    The attributes for the model node Output_Repo node is -
    cardinality - 0..1
    selection - 0..1
    singleton - true
    The attributes for the model node T_Plants_Selected_Repo node is -
    cardinality - 0..n
    selection - 0..1
    singleton - true
    Still am not able to pass data to the model node.
    Am really confused what could be the probable mistake.
    Please let me know what have i missed out.
    Thanks in advance,
    Samta

    hi,
    i've the same problem,
    i can't set my input data to the BAPI.
    i've you the solution ?
    thanks
    PS here is a part of my code
    public void executeBapi_Wd_Tut_Listuser_R3_Input( )
        //@@begin executeBapi_Wd_Tut_Listuser_R3_Input()
              try {
                   Bapi_Wd_Tut_Listuser_R3_Input input =
                        new Bapi_Wd_Tut_Listuser_R3_Input();
                   Zuname nom_start = new Zuname();
                   Zuname nom_end = new Zuname();
                   nom_start.setUname("P*"); //hard coded for the moment...
                   nom_end.setUname("Q*");
                   input.setUname(nom_start);
                   input.setUname_End(nom_end);
                   wdContext.nodeBapi_Wd_Tut_Listuser_R3_Input().bind(input);
                   wdContext
                        .currentBapi_Wd_Tut_Listuser_R3_InputElement()
                        .modelObject()
                        .execute();
                   // Synchronise the data in the context with the data in the model
                   wdContext.nodeOutput().invalidate();

Maybe you are looking for

  • Is there any way to use two video resolutions in one project in Pre10?

    i looked up this question but didn't find what i was looking for. Pre10 on XP or on Win 7 64 bit( i have Pre 10 on two machines) both with lots of RAM. XP has a dual core processor and Win 7 64 has a quad core. I shot a concert video with a Sony HDR-

  • How do I build a field based on Checkboxes?

    I am VERY new to Javascript...but I think I can do what I want, just not sure of the syntax... I have a very large form with lots of checkboxes. I want to build (fill) some text responses based on those checkboxes. Assuming I have checkboxes 1 -3  (c

  • How to change a cost center ?

    Hi Currently one of our Price variance account is updated in a cost center. We want to change the cost center ? Any input will be highly appreciated Thanks Ni

  • How to input my own Validity Start and End Dates in ME21N

    Hi All, I have to change the Validity Start and Validity End date in Addiitional Data Tab of ME21 transaction( PO Create ) using default Customer Values.How Can i accomplish it? I have used the BAdI ME_PROCESS_PO_CUST and implemented it, I have coded

  • Workcenter Vs SAP WebClient

    Hi, We are trying to configure the incident management in solution manager 7.1, as we know in 7.0 we use the work center whereas in 7.1 it gets replaced by SAP WebClient. In 7.1 workcenter we used have "Reported by me","For processing by me","Process