State of context model node if RFC-execution fails

Hi!
What is the state of a context model node if the execution of the related model instance fails - I suppose it to be always null, right?
Regards,
Thomas

Thomas,
I guess you are wrong. Node for output will conatins previous result element (if any) and all the nested nodes' elements.
So you have to invalidate manually if you want to avoid showing stale results to user.
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • Activation error : context model node has not been bound to a model class

    Hi All,
    I have DC project, which i am able to run without error, But when i try to activate this DC project, I am getting below error in activation log : Please help me out, It's very urgent...
    [wdgen] [Info]    Generating packages/com/ltli/crtmachineord/models/zp3019_dealer_default_valuesmodel/Zp3019_Dealer_Default_Values_Output.java
         [wdgen] [Error]   com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode Zp3019_Salesorder_Mac_Texts_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.)
         [wdgen] [Error]   com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode Output_Text [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.)
         [wdgen] [Info]    com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode Output_Text [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
         [wdgen] [Error]   com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode T_Contract_Note_Text [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.)
         [wdgen] [Info]    com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode T_Contract_Note_Text [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
         [wdgen] [Error]   com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode Zp3019_Get_Employee_Name_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.)
         [wdgen] [Error]   com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode Output_Name [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.)
         [wdgen] [Info]    com.ltli.crtmachineord.components.crtmachineordcomp.CrtMachineOrdComp --> ContextModelNode Output_Name [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
         [wdgen] [Info]    com.ltli.crtmachineord.components.crtmachineordcomp.CustnoView --> Caption grp_equipmentnumber_Header: UIElement does not have a label
         [wdgen] [Warning] com.ltli.crtmachineord.views.longtextview.LongTextView --> TextEdit txe_LongText: UIElement does not have a label
         [wdgen] [Info]    com.ltli.crtmachineord.components.crtmachineordcomp.MatnoView --> Caption grp_equipmentnumber_Header: UIElement does not have a label
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label SalesDocType_Lbl [labelFor]: Value is not valid
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label SalesOrg_Lbl [labelFor]: Value is not valid
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label DistChannel_Lbl [labelFor]: Value is not valid
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label Division_Lbl [labelFor]: Value is not valid
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label SalesOffice_Lbl [labelFor]: Value is not valid
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label SalesGroup_Lbl [labelFor]: Value is not valid
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label Plant_lbl [labelFor]: labelFor is not set
         [wdgen] [Error]   com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> TextView txv_Ename [text]: Context element and property are not compatible
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label lbl_CustNo [labelFor]: labelFor is not set
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label lbl_ConsigneeTo [labelFor]: labelFor is not set
         [wdgen] [Warning] com.ltli.crtmachineord.views.crtmachineordview.CrtMachineOrdView --> Label lbl_Pin [labelFor]: labelFor is not set
    Thanks
    Sandy

    We could resolved the problem by creating new DC project
    and copying the content of existing Dc project into new DC.
    (Also created new activity for this new DC), Build & Deploy the project.
    Now we are able to activate the new activity without any error.
    Thanks
    Sandy

  • Activation Failed: The context model node has not been bound to a model cla

    Hi Experts,
    I have created a DC for Models and created a DC for the Application.
    Have done all the steps that are required for getting the Model DC into the Application DC.
    Have made all the binding to the Controller and View, But durring the activation, I am receiving an error as given below
    [wdgen] [Info]    Initialize generation templates from configuration jar:file:/usr/sap/NWI/JC63/j2ee/cluster/server1/temp/CBS/22/.B/11457/DCs/sap.com/tc/bi/extwd/_comp/gen/default/public/def/lib/java/SapWebDynproGenerationCore.jar!/WebDynproGenerationConfigurationCompiled.xml
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelNode Zmm_Bapi_Get_Material_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.)
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Im_Maktg [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Im_Werks [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Im_Matnr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelNode Output [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.)
         [wdgen] [Info]    XXX.sampledc.CN_SAMPLEDC --> ContextModelNode Output [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ex_Message [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ex_Flag [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab2 [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.)
         [wdgen] [Info]    XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab2 [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Picture [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Waers [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Infnr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Netpr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco1 [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ekorg [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Lifnr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Price_Unit [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Maktx [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Name1 [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Filep [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Matnr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Werks [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco2 [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab [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.)
         [wdgen] [Info]    XXX.sampledc.CN_SAMPLEDC --> ContextModelNode It_Outtab [supplyingRelationRole]: Supply function or supplying relation role missing (Hint: A child node which is not mapped must have either a supplying relation role or a supply function or one of its parent nodes must have a supply function.)
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Picture [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ebeln [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Waers [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Netpr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco1 [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Lifnr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Price_Unit [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Ebelp [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Name1 [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Filep [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Matnr [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Txz01 [referencedProperty]: The context model attribute has not been bound to a model property
         [wdgen] [Error]   XXX.sampledc.CN_SAMPLEDC --> ContextModelAttribute Inco2 [referencedProperty]: The context model attribute has not been bound to a model property
    Thanks & Regards,
    Palani

    Hi Palani,
    May be something is missed while checking in the activity. This is what you can do:
    1) Note the error.
    2) You will have to forcefully activate the activity since its already checked in.
    3) Create a dummy activity and do the following:
                              Right click on the DC in the Webdynpro Perspective and Click on Repair and chose Project Structure and Classpath.
                              Right click on the DC in the Webdynpro Perspective and Click on Rebuild.
                              Right click on the DC in the Webdynpro Perspective and Click on Reload.
                             Close the DC and then open the DC again.
             Add these files to repository in the following way: Go to DC Perspective Expend the DC node Right Click on the src folder Chose DTR Chose Add Chose
                             Subtree. It will add the changes to the central repository and now if you Checkin the activity and see the results the changes will be effective.
    4) Also map the context attribute once again.
    5) Now check in the activity and try to activate.
    Regards.
    Rajat

  • Setting max length of the field when using Context Model Node

    I have created a model using Import Adaptive Web Service model option (a web service was a wrapper around SAP BAPI function module).
    There were no dictionary types created in the Local dictionary as a result of import.
    I have mapped the context of the controller to the model node.
    One of the fields in the model is name     CUSTOMER_NUMBER type string;
    Corresponding element in the wsdl of the web service is
    <xsd:element name="CUSTOMER_NUMBER" type="tns:char10" />
    I have created a view with the input filed mapped to the CUSTOMER_NUMBER field of the model node.
    When I type more than 10 chars into the field and hit the search button, I get a com.sap.dictionary.runtime.Ddcheck exception that the length of the field should be less than 10 chars.
    How can I set the max length of the field in design time to prevent runtime exception?
    Thanks,
    Julia

    Thank you for your reply.
    Java trim function will trim the white spaces only, not the characters.
    I can code check length functionality before calling execute function (the function that call the web service).
    I can also create a dictionary structure based on the model structure; create a context value node based on the dictionary structure and use WDCopyService API to move the data between value node and model node.
    I was looking for the best practice...
    When importing model based on Adaptive RFC, the dictionary structures are imported together with the model. This does not happen for Adaptive web service - hence there is a need to add coding for simple checks.
    Julia

  • RFC Execution Failed - Error

    Hi,
    When I am trying to create MBO, RFC execution is failing.  Error showing  in Error log as below.  SUP Version : 2.0. 
    java.lang.RuntimeException: Failed to execute EISOperation.
                    at com.sybase.uep.tooling.eis.BaseEISOperation.execute(BaseEISOperation.java:283)
                    at com.sybase.uep.tooling.eis.BaseEISOperation.execute(BaseEISOperation.java:165)
                    at com.sybase.uep.tooling.eis.SapEISOperationImpl.execute(SapEISOperationImpl.java:450)
                    at com.sybase.uep.tooling.ui.dialogs.preview.ExecuteSection.getRecordSet(ExecuteSection.java:289)
                    at com.sybase.uep.tooling.ui.dialogs.preview.ExecuteSection.access$300(ExecuteSection.java:75)
                    at com.sybase.uep.tooling.ui.dialogs.preview.ExecuteSection$3.run(ExecuteSection.java:192)
                    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Caused by: java.lang.RuntimeException: Failed to execute JCA operation
                    at com.sybase.vader.da.jca.JcaInteractionOperation.execute(JcaInteractionOperation.java:171)
                    at com.sybase.vader.statistics.MonitoringOperation.execute(MonitoringOperation.java:65)
                    at com.sybase.vader.service.interaction.PipelineCompositeInteractionOperation.execute(PipelineCompositeInteractionOperation.java:55)
                    at com.sybase.uep.tooling.eis.BaseEISOperation.execute(BaseEISOperation.java:265)
                    ... 6 more
    Caused by: java.lang.NullPointerException
                    at com.sybase.vader.jca.sap.connector.cci.SapFunctionModuleDynamicMetadataMappedRecord.put(SapFunctionModuleDynamicMetadataMappedRecord.java:272)
                    at com.sybase.vader.jca.sap.connector.cci.SapRootInteraction.execute(SapRootInteraction.java:100)
                    at com.sybase.vader.da.jca.JcaInteractionOperation.execute(JcaInteractionOperation.java:145)
                    ... 9 more
    Help me ...

    Hi,
    did you try to switch to the advanced developer profile and to deactivate the result check ?
    Best Regards,
    Stefan
    Edited by: Stefan Wawrzinek on Jan 11, 2012 12:10 PM

  • Interface Controller context model attribute error

    I am trying to create a controller interface as such:  I created a DC that goes out and retrieves SAP ID using a RFC call.  My controller context is bound to a RFC model.  I'd like to expose the SAP ID that comes back from that call within a model attribute to other components.  I try to create a model node and corresponding model attribute within the Interface Controller, setting the isInputElement = true.  However, as soon as I do this I get a number of compile errors:
    "The context model node has not been bound to a model class", "The context model attribute has not been bound to a model property". 
    Are you not allowed to map model nodes to an interface?

    Karla,
    First, set isInputElement to false. Think again, you are exposint "result" outside but not collecting "input" from outer component.
    Next, calculated attributes to the rescue here.
    Say, in component controller you have 1..1 / 0..1 model node <i>SapIdQuery_Input</i> with 1..1/0..1 child <i>SapIdQuery_Output</i> that holds <i>System_Id</i> attribute, type <i>string</i>.
    Now create in component controller context (right below root node) attribute <i>System_Id</i> of type <i>string</i>, set read-only to true and calculated to true. Switch to source editor and write the following for generated attribute "getter":
    if (wdContext.currentSapIdQuery_InputElement() != null &&
        wdContext.currentSapIdQuery_OutputElement() != null)
      return (String)wdContext
        .currentSapIdQuery_OutputElement()
          .getAttributeValue("System_Id");
    else
      return null;
    Now add controller usage (of component controller) in interface controller and map attribute in interface controller to calculated attribute in component controller.
    If you expirienced problems with mapping, try to create calculated attribute in 1..1 subnode of root context node.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • 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

  • 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

  • Context-Model binding

    Hi experts,
    I am having some trouble with the binding between my controller context and the model objects. My context model nodes are the following (imported from a Web Service):
    Context
    --KES (Model Node)
    Request (Model Node, singleton, selection 0..1)
    Metadata (Model Node, singleton, selection 0..1)
    creator (Model attribute)
    In wdDoInit() of the controller, I initialize my model objects as follows:
    Request_KeywordEnhancerWSViDocument_generateMetadataComSapMltKesKESRequest req       =
    new Request_KeywordEnhancerWSViDocument_generateMetadataComSapMltKesKESRequest();
    wdContext.nodeKES().bind(req);
    ComplexType_KESRequest request  = new ComplexType_KESRequest();
    ComplexType_DCMetadata metadata = new ComplexType_DCMetadata();
    request.setMetadata(metadata);
    req.setRequest(request);
    Furthermore, I have bound the Request model node to my view controller. Setting model attributes for the Request node is no problem, but I cannot access those in the Metadata node. This only works if I add an element to the node collection or explicitly bind my metadata object to the model node. Then, however, the relation between the Request and Metadata model objects is broken and I cannot properly execute the Web Service.
    I've been stuck on this matter for hours now and have tried just about everything. I'd appreciate it if someone could give me a hint. Is this a matter validating/invalidating the context node?
    Any help would be greatly appreciated! Thanks!
    Cheers,
    Tim

    Hi Valery,
    thanks for the fast response.
    Unfortunately, your suggestions did not have any effect. Even with first creating the object graph and having both nodes as singleton, the Metadata node isn't properly set up.
    The supplying relation roles are set to "request" and "metadata", respectively.
    Tim

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

  • CopyCorresponding to model node

    Hi,
    i have following problem:
    I have a context node with cardinality 1:1. This node should be copy to a model node as input for the rfc function. the model node has the cardinality 0:1
    I try copy with:
    WDCopyService.copyCorresponding(wdContext.nodeContextNode().currentContextNodeElement(),
              wdContext.nodeModelNode().currentModelNodeElement());
    But  wdContext.nodeModelNode().currentModelNodeElement() is NULL after this statement.
    I think because of the cardinality 0:1, there is no current...... Element..!?

    Hi Christopher,
    Before the code:
    WDCopyService.copyCorresponding(wdContext.nodeContextNode().currentContextNodeElement(),
    wdContext.nodeModelNode().currentModelNodeElement());
    add following code:
    wdContext.nodeModelNode().createModelNodeElement();
    Regards,
    Gopal

  • Fiiling multiple entries in model node.

    Hi Experts,
    I am new to wdjava,i have query please help me on this:
    In my RFC(General reimbursement) i need to fill table(multiple entries), which is described under table tab.When i execute that filling the data in table, my entries gets saved in the backend.
    My issue is how to set multiple enteris in the model node(table which is required to be filled before execution).Moreover do i need to set this model node to context node .(zhr_welfare_rem_input).
    i am also using the addelement() method in loop but that is overwriting my previous data and thus outcome is single data.
    Regards:
    somya

    Hi Tony,
    I tried using the method as mentioned by you.
    The code in use is as mentioned below :
    Zess_Emp_Welfare_Input inpNew= new Zess_Emp_Welfare_Input();
    IPrivateEmployeeWalfareOverView.IU_DetailsNode nunode = wdContext.nodeU_Details();     
    for(int i=size-1;i>0;i--)
    Zwelfare_Details inp1 = new Zwelfare_Details();
    IPrivateEmployeeWalfareOverView.IU_DetailsElement nuele = wdContext.nodeU_Details().createU_DetailsElement(inp1);
              if(lead==i || wdContext.nodeU_Details().isMultiSelected(i))
                         nuele.setAmount(new BigDecimal(wdContext.nodeCa_PPTE_INS().getCa_PPTE_INSElementAt(i).getAmount()));
         nuele.setBer_Type("PPTE");
         nuele.setBill_Date(wdContext.nodeCa_PPTE_INS().getCa_PPTE_INSElementAt(i).getBill_Date());
         nuele.setBill_No(wdContext.nodeCa_PPTE_INS().getCa_PPTE_INSElementAt(i).getBill_No());
         nuele.setParticulars(wdContext.nodeCa_PPTE_INS().getCa_PPTE_INSElementAt(i).getParticulars());
         nuele.setZmonth("AUG");
         nuele.setZyear("2009");
         nuele.setMandt("180");
         nuele.setPernr(wdContext.currentOutputElement().getE_Pernr());                          
    nunode.addElement(i,nuele);      
    inpNew.setMode("INS");
         inpNew.setI_Year("2009");
         wdContext.nodeZess_Emp_Welfare_Input().bind(inpNew);
    try
         wdContext.currentZess_Emp_Welfare_InputElement().modelObject().execute();
         wdContext.currentZess_Emp_Welfare_InputElement().modelObject().modelInstance().disconnectIfAlive();
         wdComponentAPI.getMessageManager().reportSuccess("Mahesh567");
    catch(Exception ex)
         wdComponentAPI.getMessageManager().reportSuccess("Mahesh");
    Then I execute my RFC.
    RFC name is  Zess_Emp_Welfare
    Model node in which it needs to be inserted is U_Details.
    The structure for U_Details is Zwelfare_Details.
    Please do let me know the solution at the earliest.
    Thanks and Regards,
    Soumyadeep Ghosh.

  • 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

  • Problem in mapping model node with cardinality

    Hi,
    I have a requirement where the RFC  which is being called has cradinality 0..n.
    I imported the RFC model in a different DC and then added the model to public part.
    Then, I used that model in the second dc.
    Now, I did context mapping with the component controlller by dragging the model context to the
    component controller. The view is also mapped with the component controller.
    The RFC has input field BUS_PART_NO which is a 12 character input field.
    I passed String in it.
    There is no error while I build the DC. But while I run the application, the input field is coming Read Only.
    I can't changed the component controller to 1..n or 1...1.
    I think I need to create a context node and attribute in the view or component controller and then programmatically add this
    to the model node.
    Please send some SDN links and urls.
    Regards
    Neha Singh

    Hi Neha,
    Please create the custom context node/attribute same structure as RFC model node. then populate the data using below following code :
    - get the size of the RFC model node which you want to populate in the costom node like
    int xxx =  wdContext.node<XXX node>().size;
    - Create onject for custom node like
      I<Custyom Name>Element element = null;
    -  then use for loop for fetching data from Model node and populate in custom node
    for(int i =0; i<xxx; i++)
             element = wdContext.create<Custyom Name>();
             element.set<Attribute Name>(wdContext.node<XXX>().get<XXX>ElementAt(i).get<>Attribute name for model())
             wdContext.<Custyom Name>().addElement(element);
    It will populate in your custom node from model node.
    Hope it will helps you.
    Regards
    Arun

  • 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

Maybe you are looking for