Problems in Instantiating the Model Node

Hi All,
I Have a problem with creating the instance of a Model Node  which needs an urgent solution, This is the Scenario:
I Have created a WebDynpro Project using NetWeaver CE Environment and Java EE 5.0 where i am using an Adaptive WebService Model. I have successfully created the model using the WSDL files and have also added to the Controller,
But when I try to create an Instance of the Request Node in my controller ie after writing this line:
Request_MI_Nwce007_AS_SOAPReq objReq = null;
objReq = new Request_MI_Nwce007_AS_SOAPReq();
This is the Request Structure from the WSDL - Request_MI_Nwce007_AS_SOAPReq
it gives me an Error saying The constructor Request_MI_Nwce007_AS_SOAPReq() is undefined.
Please let me know the exact problem and also the way to overcome this problem.
Its Quite URGENT!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Points Rewarded for helpful answers.
Regards,
Poojith MV

Hi Poojitha,
If your imported Webservice has any structure like  this Request_MI_Nwce007_AS_SOAPReq_Input then instantiate the input structure.
else
Try instantiating along with the package name, for example if your package name is: com.sdn then try this:
"com.sdn.*Request_MI_Nwce007_AS_SOAPReq objReq = null;
objReq = new com.sdn.Request_MI_Nwce007_AS_SOAPReq();
Hope this solves your problem.
Thanks n Regards,
Jhansi Miryala

Similar Messages

  • How can I create an element in the model node?

    Hi, Experts,
    I create a model node that name is containerNode in the contxt. Cadinility is: 1..n
    I write the code in the method:
      private String getDataForOutputTable( IWDNode wageTypePayslip, IWDNode containerNode ){
           String betrgSumStr = "";
         int index = 0;
         Vector containerVector = new Vector();
         int size = wageTypePayslip.size();
         IWDNodeElement element = containerNode.createElement();// The system report error when I run the application.
         BigDecimal betrgSum = new BigDecimal( 0 );
    I try to create a element in the containerNode, But the system report error when I run the application.
    java.lang.IllegalArgumentException: model object must not be null
         at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)
         at besuretech.com.wdp.IPrivatePayDataDispView$IOContainerElement.<init>(IPrivatePayDataDispView.java:1537)
         at besuretech.com.wdp.IPrivatePayDataDispView$IContextNode.doCreateElement(IPrivatePayDataDispView.java:88)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:884)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1351)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1370)
         at besuretech.com.PayDataDispView.getDataForOutputTable(PayDataDispView.java:251)
         at besuretech.com.PayDataDispView.getAllData(PayDataDispView.java:196)
         at besuretech.com.PayDataDispView.onPlugPayListViewIn(PayDataDispView.java:154)
         at besuretech.com.wdp.InternalPayDataDispView.wdInvokeEventHandler(InternalPayDataDispView.java:391)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
    How can I create an element in the model node ?
    Best regards,
    tao

    Hi,
    You need to execute the model before creating the element.
    Regards
    Ayyapparaj

  • How to get the data from the model node like a table ?

    I want to get the data from the model node  once a record ,and the node  is bound to a internal table in the RFM which I called in the R/3 system. Who can give me some advice to achive it?Thank you!!

    Hi,
    To get the data from the node:
    wdContext.node[your node name].current[node name]_InputElement().get[specific element in the node];
    or you van use:
    wdContext.current[your node]Element().get[your element in the node];
    examples:
    wdContext.nodeZ_Mepro_Po_Detail_Stock_Distri_Input().currentZ_Mepro_Po_Detail_Stock_Distri_InputElement().getUcpd_Flag();
    wdContext.currentT_Delv_ReqsElement().getShelflife();
    regards,

  • Table filtering on the model node table

    hi
        i have  two table where i need to perform table filtering on the tables and both the tables are of MODEL NODE
    and in some of the posts i have seen that we cannot perform
    table filtering on the MODEL NODE table  ,  and  other thing 
    i have  38 elements where i need to perform filtering on
    each and every column ,
    can any one help me with procedures for table filtering on
    two tables , one table is independent from other.

    Hi Kishore,
    Please refer to the following artice for the filter and sorting implementation:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f024364b-3086-2b10-b2be-c0ed7d33fe65
    Filtering works on the principle of selecting values from an existing master set. Hence, as suggested the master set can be your model node and create another value node (exact copy of the model node) to hold the values to be displayed in the table.
    Remember it is always better if the backend provides these capabilities rather than implementing filtering and sorting in front end.
    Regards,
    Kartikaye

  • Validating the model node

    Hi Experts,
    I have a requirement of validating( changing field names and changing values based on the conditions) the model node and copy the required values into value node.
    Bacially , copying the model node elements to value node based on conditions.
    How can i do this anyone help me pleae.
    Regards,
    Suresh

    hi
               to get number of records from the model node
            catch the size of the Model Node .
             int n = wdcontext.nodeModelNode.size();
             for(int i=0;i<n;i++)
               wdcontext.nodemodelnode.setLeadSelection(i);
    String name = wdcontext.nodeModelNode.get<Model>elementatindex(i).getName();
    if (condition)
    fetch the data from the RFC and set in the value node as
    wdcontext.node<vauenodename>.invalidate();
    IPrivateviewname.Icomponentname ele = wdcontext.node<valenode>.createNode();
    ele.set(name);.
    and so on
    wdcontext.nodevaluenode.addelement(ele)
    Edited by: murali krishna  reddy on Apr 19, 2009 2:40 PM

  • Webdynpro : How to SKIP the values of the Model Node.

    Hi
    i imported a WSDL into my WDJ application.
    where on context mapping, i mapped the MODEL with my CONTROLLER.
    I would like to SKIP couple of Attributes and Model node
    In WEBSERVICE navigator, i have the check box as SKIP, so using that i can skip in Navigator ,
    But how to do the same in WEBDYNPRO Coding.
    Say for Example
    Context
    ----------ModelNode1
    ----------ModelNode2
    ----------ModelNode3
    ----------======ModelAttribute1      NULL
    ----------======ModelAttribute2      SKIP
    ----------======ModelAttribute3      SKIP
    i know how to set the value if it need to set it to null
    wdcontext.nodelModelNode3.currentModelNode3element.setModelAttribute1("null")
    similaraly  can anyone tell me how to set the SKIP for other 2 attributes......
    Thanks

    Hi Chintan
    Thanks for your response....
    fine ... i understood your solution....
    but , my problem goes and makes me dizzzy
    i have 10 mandatory filed in my Webservice..
    i passed all the 10 mandatoy fileds and get perfect Response In WEBSERVICE Navigator....
    i tried passing the same value via WDJ application as show below
    since i have a node element with cardinalith 0..n
    I set the value those i passed in Webservice Navigator.....
    wdContext.nodeRequest_getSubmitRequest().
                     nodeRequestDetails().nodeRoles().invalidate();
           IPrivateOne_AppView.IRolesElement RoleE = wdContext.createRolesElement(new ComplexType_RoleData());
         RoleE.setRoleId("BASIC");
         RoleE.setSysId("R3");
         wdContext.nodeRequest_getSubmitRequest().
                   nodeRequestDetails().nodeRoles().addElement(RoleE);
    But Here ,I get a Error Message Saying  :Error in Submiting Request :  No role seleced for the request.
    so , i even checked whether the node is populated with rite value by printing them after executing the WSDL.
         wdContext.currentRequest_getSubmitRequestElement().modelObject().execute();
              MsgManger.reportSuccess( "After Push_execute_WSDL");
    MsgManger.reportSuccess( " COntroller getRoleId -- "+wdContext.nodeRequest_getSubmitRequest()
                        .nodeRequestDetails().nodeRoles().currentRolesElement().getRoleId().toString());
              MsgManger.reportSuccess( " COntroller getSysId -- "+wdContext.nodeRequest_getSubmitRequest()
                        .nodeRequestDetails().nodeRoles().currentRolesElement().getSysId().toString());
    Output
    After Push_execute_WSDL
    COntroller getRoleId -- BASIC
    COntroller getSysId -- R3
    Kindly let me know wat could be wrong........
    The MOST wired thing is
    if i didnt set and Role , SysId in webservice navigator , then Error thrown at Webservice Navigator is
    Error in Submiting Request : RoleId is mandatory,SysId is mandatory null
    on following same thing , if i didnt set Role and SysID in WebDynpro then, i get error as
    Error in Submiting Request :  No role seleced for the request.
    How is this possible....
    any help on this would be appreciated...
    Thanks

  • Problem while copying from model node to value node!!

    Hi All,
    I am trying to copy the contents of model table to newly created value table. For this i have written following code -
    IWDNode targetnode = wdContext.nodeZhress_Firstday_Service_ValueNode();
    IWDNode sourcenode = wdContext.nodeOutput().nodeT_Zhress_Firstday_output();
    WDCopyService.copyElements(sourcenode,targetnode);
    tagetnode is the node which is created in root context and sourcenode is the node which the node that shows the output when RFC runs.
    After that by using copyService i m trying to copy from source to targetnode.
    This target node is also binded to table, for getting the output.
    When i copied the things from source to target it's size is equivalent to source node but its not getting any data from source node and showing blank in the table.
    When i have tried to get whats it showing, its showing me        null .
    Please help me on this problem.
    Regards,
    Roshan Gupta

    hi
    check out this threads
    Re: WDCopyService - copy model node to Value node
    WDCOPYSERVICE
    Value of attribute not copied after WDCopyService.copyElements
    Regards,
    Gopi

  • Error while sorting the model node table

    hi
    if(firstTime)
                     view.nowCreateAllCustomExtensionFields();
               IWDTable tab= (IWDTable)view.getElement("tbl_car");
               wdContext.currentContextElement().setCarTableSorter(new TableSorter(tab,wdThis.wdGetCarTableSorterAction(),null)); 
    i have written the above code in domodifyview()  {}
    and   tbl_car is the id of the my table. and the table is of type
    model node .
    wdContext.currentContextElement().getCarTableSorter().sort(wdEvent,wdContext.nodeIt_Car_Data());
    created a sort action  for the table , present in the  table
    properties and  iam getting a error under sort()  saying
    method sort(iwdcustomevent,iwdnode,string)  is  of type 
    tablesorter and  not  applicable for  
      (wdcustomevent,iprivateview.nodename) 
    can any one help me ?

    replace
    if(firstTime)
    view.nowCreateAllCustomExtensionFields();
    IWDTable tab= (IWDTable)view.getElement("tbl_car");
    wdContext.currentContextElement().setCarTableSorter(new TableSorter(tab,wdThis.wdGetCarTableSorterAction(),null));
    by
    if(firstTime)
    view.nowCreateAllCustomExtensionFields();
    IWDTable tab= (IWDTable)view.getElement("tbl_car");
    wdContext.currentContextElement().setCarTableSorter(new TableSorter(tab,wdThis.wdGetCarTableSorterAction(),new HashTable()));
    nikhil

  • Problem while publishing the models - it is taking much time

    Hi,
    I am facing one issue while publishing the models.Previously when Re-publishing the models in Configurator processing pending publications usually took 3 to 5 minutes per model. Currently it is taking 15-20 minutes per model to process. Please suggest me the possiblities to identify the root cause of the issue.
    Thanks in advance.
    Regards,
    Purushoth

    You'll probably want to gather a trace for the Process a Single Publication concurrent request. You can turn this on by selecting ' enable trace' on the program definition. You'll need your dba to review the trace to identify which parts of the program are taking the longest.
    If you haven't run CZ Purge for awhile, try running it. Also find out how often stats are gathered for the CZ schema.
    Thanks,
    Jason

  • Problem in retrieving the model content

    Hi,
    i am using the webservice as a model in my application. In the database table i have nearly 100 fields, for this i have written a CRUD's in EJB and make it available through the webservices. Now i am using this webservices in the webdynpro. while retrieving the date from table through webservice a problem occured. If any one of the field is null then an exception is raised i,e null pointer exception. i solved this by keeping try catch block for each of the field seperately. so it increses the line of code. Is any alternative for reducing the Line of code in this situation or any better solution?
    Thanks in advance
    Siva Sankar N

    Hi
    Assign the values after checking the null to the webservice.
    if(wdContext.currentContextElement().get<Param>()!=null && wdContext.currentContextElement().get<Param>().length()>0){
    //assign thevalue to webservice
    Kind Regards
    Mukesh

  • 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

  • Issue in invalidating the model output node

    Hi All,
    I have a problem in invalidating the model output node. Below is the description of my approach and problem statement.
    REQUIREMENT: We have had the requirement to develop a custom WD java application in MSS which will fetch the appraisal data for each employee selection.
    APPROACH: To acheive the same, I have developed the custom WD java application and have associated it with the Standard Employee Search application. I have established the eventing between both the applications, such that on each employee selection in Employee Search, I get the PERNR for the selected employee.
                         I have mapped a local valude node to the UI elements of my custom application. I am having TWO RFCs; one to Read data based on PERNR and the other to Update/Save to R/3.
                         I read the RFC based on PERNR and save it to local value node which is binded to the UI elements. If the end user is editing the read data, I am passing the entire local value node to the Save RFC import parameter on click of Save button in my application.
                         Every thing is working as expected. I am able to Read and Save the data and its also updating the backend. But, in the same session, if I go back to the previously selected employee for whom the updation has happened, i am not able to see the new data.
                         Only when I refresh the session, I see the new data on employee selection. When I try to invalidate the Read Output Model node, on Save button, I do not see anything happening. The Read Output Model node always holds the old value.
                         I have currently binded the Read model output node to a table in the view to see what it holds in runtime. And what I see is , its always having the old record for the same employee, in the same session even after invalidating the same on Save button.
    I request you all to pleae try to understand the issue and let me know as how to get the new values in the same session.
    Regards
    DK

    Hi,
    When you are executing the read rfc ?? At the time of executing the read rfc try to bind the new object every time you execute and see what happens.
    Like..
    wdContext.node<READ_RFC_NODE>().bind(OBJECT of READ RFC);
    then execute it.
    Is there some kind of table which shows the employees and on selection you are showing the data? Can you give some more input on how you are reading the data?
    Best Wishes
    Idhaya R

  • Instantiating Model Node in Component Controller with new Abstractlist()

    Hi All,
    We have the following issue.
    When we instantiate a Node - Po_Items using Element.setPo_Items( new AbstractList() )
    We get an error "The Type AbstractList Cannot be instantiate" .
    So how to successfully instantiate AbstractList()  so that ultimately the BAPI_NODE_INPUT can be instantiated.
    Best Regards,
    Roby...

    Hi Murtuza,
    Thanks alot for the response.
    I tried initializing Node using
    Element.addPo_Items(new Bapiekpoc());
    But its not getting initialized and I get following errror when I run the application.
    500   Internal Server Error
    Web Dynpro Container/SAP J2EE Engine/6.40 
    Failed to process request. Please contact your system administrator
    Is there any other way to initialize the Po_Items Node which which is inside the Model Node BAPI_PO_CREATE_INPUT.
    BAPI_PO_CREATE_INPUT ( Model Node )
        -- Po_Items ( Subnode which is an input table inside the BAPI )
    Thanks again & Best Regards,
    Roby....

  • Difference among Model node creation, model attribute creation and the field creation in database through AET?

    Hello Friends,
    To display the field on the View, we can create the field via 3 ways:
    1) By creating the model attribute
    2) By creating the model node using the GENIL object and using its attributes in view
    3) Creating the field in Database structure using AET
    But, i am not aware that in exactly what kind of business scenarios we use the above 3 methods to create the field.
    Could you help me out to clarify the same.

    Hi Dev,
    1). By creating the model attribute: we will use this option in case of the field is avaibla in stanadrd sap system. It might be in another under child context nodes and we will use BOL relations to access the attribute.
    2).  By creating the model node using the GENIL object and using its attributes in view: We will use this option incase of there is no standard provision to use. Means you want to create any custom assignment block with custom attributes then you can go for this option. More over we can use AET to create custom genil object. We have an option Create Table in AET.
    3).Creating the field in Database structure using AET: We will use this option incase of there is no attribute in database relevant to your requirement then we will go for AET enhancement.
    Hope this might give you little clarification..
    Best Regards,
    Dharmakasi.

  • 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

Maybe you are looking for

  • Syncing Outlook 2010 contacts in Windows 7 32bit with iphone 4

    I have recently upgraded from windows vista to windows 7 32 bit home professional and upgraded from Outlook 2003 to 2010.  I also have the latest software on the iphone 4 and in itunes.  For some reason I can sync all the itunes data but I can't sync

  • HP LaserJet 2300 - "Printer Busy"

    I can only print one job on the 2300 without physically switching the printer off & then back on. If i try to print a second document without doing this i get a "printer busy" message. I am running OS 10.4.6 but have had this problem with all version

  • VO not saving

    Hi, I seem to have a problem with Virtual Office saving when I login to the interface as ADMIN. I make changes to Netstorage and 'click' on OK. I logout and log back in and the original setting is back again and the new setting dismissed. If I login

  • WHat is the total cost for a year with an Iphone?

    Considering getting an Iphone and wondering if I go to the apple store to purchase do I seperately have to contact ATT for my wireless plan or is it one stop shopping in that I can select everything at the Mac Store?

  • Hierarchy name missing while uploading!

    Hi, While scheduling info package , in the hierarchy selection tab, i am not seeing any of the hierarchy names . i had created one in maintain hierarchy screen after adding all external characteristics! Am i missing something here? Thanks, Ravi