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();

Similar Messages

  • Set data into Model Node on Navigating from a View

    Hi Gurus,
    Need your assistance with an issue that I am facing.
    I am developing an ESS application and it has two perspectives.
    1st Perspective contains - View1 and NavView
    2nd Perspectice contains - View2 and NavView
    I have created a dynamic ValueNode in View1 and on navigating to View2, I want the data in the ValueNode to be updated into a ModelNode.
    The problem I am facing is,
    1. I have the <b>actionOnNavigation</b> in the <b>NavView</b> whereas my data is in the <b>View1</b>.
    I tried setting the data into ModelNode in the <i>wdDoExit</i> of <b>View1</b>, but it doesnt help.
    I have the <i>Life_Span</i> property set to "<i>WHEN_VISIBLE</i>", but still, dont think the wdDoExit() of <b>View1</b> is being called.
    Any suggestions on how/ where I can set the data into my ModelNode?
    Thanks in advance.
    Anjana R.
    Message was edited by:
            Anjana Raghav

    Hi Gurus,
    Any idea on this question?
    I would like to know where I can set my data into the ModelNode before Navigating away from that view? <i>The data is in a dynamic context.</i>
    I can't write it on the onAction() method, coz action is defined in another view.
    Any suggestions? Is it a flaw in the design?
    Thanks in advance
    Anjana R.

  • Unable to add value to model node with cardinality 0..n

    Hi All,
       Im working with Webdynpro Java.i have an issue here.i have a input field item named customer and a drop down box item location.when i give customer and location as inputs,a WSDL (named Equipment WSDL) is called.the result is a  drop down list containing equipments id
    i took a custom node location with cardinaliy 0..n.i gave static values as input for location.i need to set the location values to model node location.when i m giving a single value to custom node location,that static value is not accepted by model node location(in WSDL) whose cardinality is 0..n.
    Please suugest a solution for this issue
    With Regards,
    Ushasri.

    HI Ushashri,
    What do you mean by 'static value is not accepted by model node location'
    how you have done the mapping
    send me the hierarchy of rfc and ur value node
    With Regards
    Naidu

  • How to set value to Model Node of cardinality 0..N

    hi
    I am looking for a way to set value to a model node of cardinality 0..N
    i imported a WSDL into my applicaion , which has the following Node Structure.
    Context
    --- ModelNode_Request
          ---ModelNode2_Input
          ---ModleNode3_Roles  [ cardinality 0..n singleton 1..1]
               ****Model_Attribute RoleID     <<<<<<<<<<<<
               ****Model_Attribute SysID      <<<<<<<<<<<<
      ---ModelNode_Response
    i tried with the below code  but effort went in vain.
    i tried following ways to set the value but , i get Nullpointer expection error.
         wdContext.nodeRequest__SubmitRequest().nodeRequestDetails().nodeRoles().
              currentRolesElement().setRoleId("BASIC");
         wdContext.nodeRequest__SubmitRequest().nodeRequestDetails().nodeRoles().
              currentRolesElement().setSysId("R3_220");
    i aslo looked into the forum  https://www.sdn.sap.com/irj/scn/thread?messageID=2035342 but couldnt find any solid solution.
    It would be great if some one can throw some snippets on the same.
    Thanks
    Edited by: RR on Dec 22, 2008 5:48 PM

    Hi RR,
    As far as i know u can set model nodes and values nodes are different. whats shown in the link is for values node. u should do differently for model node..
        Since this is a model node...u first need to create an object of the node type. then create an arraylist for that and then add values..
    try this..
    // Create an object for structures in the node to be used
    Yweb_Po_Items objPOItems = null; // where Yweb_Po_Items is the structure of the node...
    // Create an abstractlist for structures in the RFC node to be used, if u are planning to give single or multiple rows (in node/table) as input to the RFC
    AbstractList POObjAbsList = new Yweb_Po_Items.Yweb_Po_Items_List();
    objPOItems = new Yweb_Po_Items();
    //    /set first set of values
    objPOItems.setColumn1(u201Cabcu201D); // here hard codede for example
    objPOItems.setColumn2(u201Cabcfghu201D);
    // add the object to the abstract list
    POObjAbsList.add(objPOItems);
    //    /set second set of values
    objPOItems.setColumn1(u201Cnewabcu201D);
    objPOItems.setColumn2(u201Cnewabcfghu201D);
    // add the object to the abstract list again
    POObjAbsList.add(objPOItems); // now u got 2 records
    // now set the abstractlist to the node in the RFC
    objGoodsReceiptPO.setPo_Items_In(POObjAbsList);
    Hope this information is useful...
    Thanks
    Md. Yusuf

  • BC4j-- unable to set date type attribute in a row

    when i m set a attribute which is of date type in row of a view.
    it is giving me error " cannot create object of date type"
    i'll apreciate the answer to this problem
    thanx

    <%
    SimpleDateFormat databaseFormat = new SimpleDateFormat();
    SimpleDateFormat viewFormat = new SimpleDateFormat();
    databaseFormat.applyPattern("yyyy-MM-dd");
    viewFormat.applyPattern("MM/dd/yyyy");
    // to convert &#8220;MM/dd/yyyy&#8221; to &#8220;yyyy-MM-dd&#8221; for updating database
    String date_view=&#8221;12/31/2001&#8221;;
    String date_db=new String(databaseFormat.format(viewFormat.parse
    (date_view)));
    ...setAttribute(column_name,date_db);
    %>

  • 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

  • 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

  • Can not set date and time

    i can't not set date and time i live in florida and i am visiting hawaii.Brought my apple tv and airport express , created my own network to watch my apple tv but unable to set date and time on my apple tv.Pleas help.

    Assuming this is not the first time you have used your Apple TV
    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
    Also try restarting the router.
    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If restoring from the Apple TV doesn't help, try restoring from iTunes using a USB cable.
    If this is a new Apple TV, in addition to trying the above, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • 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

  • Unable to  set some dates  in Adobe bridge cs2

    HI ALL
    Our keywording team using  the  Adobe bridge CS2.
    Kindly  hep me to understand Why  some dates  Like
    1/1/1970
    1/1/1642
    1/1/1890
    etc  .....
    I unable to  set in  ITPC image Tab  information .............
    Lakhan

    Hi
    Thanks for revert ......
    I  tried   with  CS2 & CS3  but only  specific  dates like (1/1/1970) i above  mentioned  is still  not   reflecting in IPTC image  info   ........
    Please suggest....

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

  • How to set the Model Class for a newly created Model Node ?

    Hello All,
      I am trying to map a Model node from SourceA to DestinationB.
      To do so, I created a model node for Destination B in the interface controller (set the isInputElement to true). However why I try to map the node, I get an error saying that "Both context nodes have to be bound to a model class". Upon a closer look, I realised that the model node that I created in DestinationB has no entries under the properties.
      Does anyone knows/advise how I can add the model class entry to the model node that I have created as I am not able to do so. Or otherwise, is there a way to map a model node to another model node across different components ? Thank you very much.
    from
    Kwok Wei
    from
    Kwok Wei

    Hello Pascal
      The instructioons that you gave are for mapping the model between the view controller and the component controller within the same component is that right ?
      I am tryng to map a model node in the component controller of SourceA to another model node that belongs to another Component. I do believe that in this case I will need to create a model node in the interface controller of DestinationB and map that to the component controller of SourceA. However, by creating my own model node, how do I change the property modelClass in the context ?
      Thanks !
    from
    Kwok Wei

  • 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

  • Unable to set node credentials...

    I have setup the server as an OD master, and up until now it hasn't had problems binding, although I haven't been able to get any users to authenticate for any services, other than my local admin account.
    I haven't made any changes, but now when opening ServerPrefs, I get the following error:
    "Unable to set node credentials for /LDAPv3/127.0.0.1 with the record name server.mydomain.com$ There may be a problem with the Open Directory service."
    Any ideas where I went wrong?

    It isn't something that a patch is going to cure.
    I believe it does have something to do with the network and probably therefore the ip address / naming as the authentication does seem to be tied to the network location.
    I've managed to move things on a little in that I have bound user accounts on other machines such that when someone logs onto their laptop it will tell them they have an account on the server and provide a logon after which their account is bound and (I think) marked as 'managed' in their Preferences | Accounts. This provides additional sections in iCal and Address Book although these don't work. The only person who can log into the web stuff such as the wiki is the server admin and I still can't access the Server Preferences or authenticate the Server Admin so can't make much in the way of changes.
    I've submitted my application to Apple for support using the card provided with the Mac Mini. This was last Thursday and I've not yet received confirmation that this is live. As soon as it is I'll be having a long conversation with Apple Support.
    I sort of sympathise with Apple as the server is clearly at least an order of magnitude more complicated than the admin involved with just a desktop. Having said this, however, they do need to get this sort of thing sorted by making it slicker, providing more online support for these problems if they have any aspirations towards the smaller office or even home environment which don't have dedicated IT support staff.

  • Unable to set node credentials for /LDAPv3/127.0.0.1 with record name n`.

    When starting Server Preferences, I receive a window with the following text:Unable to set node credentials for /LDAPv3/127.0.0.1 with record name n`. There may be an error with the Open Directory Service.
    This started to occur after I used the command changeip to change the ip of the service.
    I've tried (Re)starting Open Directory Service, but that doesn't resolve it.
    Does anyone know how I can resolve this error? I'd like to be able to user Server Preferences again!

    One of our servers (10.6.8)  that had been running for months suddenly started generating that error message when trying to access Server Preferences.  Workgroup Manager, which seems to use the same login information, accessed just fine. We tried deleting access information in Keychain, to no avail. What finally worked for US was:
    - Via Server Admin, (in Open Directory > Settings > General) change the Role: Open Directory from Master to Standalone
    - This (for us) then restored access to Server Prefs
    - Use Server Admin to change the Role back to Master
    Warnings - 1)  backup first  2) you will have to reinstall the master password, and  3) ALL accounts were lost and had to be recreated.

Maybe you are looking for