Skip to Content
avatar image
Former Member

value from view to model

Hello Friends,

I am trying to enhance an existing application and new to web dynpro. ( we use SAP as a backend system )

So the backend table in sap dict. is extended with one field ( lets say varname ). Now I have to place an input field at view fill this field and pass this value to this backend field. ( how I can do dynamic binding )...... seconly how I can place a f4 help on this input field.

Many thanks in advacne...

Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 24, 2007 at 10:00 AM

    Any documenation for dynamic bining for view fileds to backend model fields would be great...

    I have also confusion for value attributes and model attributes, I mean at view the fields will be called value attributes, and at model level same field will be called model attribute, they how I can map ( bind) the view field with model field ?

    Any documenation / tips / suggestions would be gr8

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 24, 2007 at 10:04 AM

    Hi Shah,

    For F4 u can reffer these links

    <a href="/people/valery.silaev/blog/2006/07/18/ovs-rfc:///people/valery.silaev/blog/2006/07/18/ovs-rfc

    <a href="/people/valery.silaev/blog/2006/03/10/minus-evs-plus-ovs-value-help-smart-input:///people/valery.silaev/blog/2006/03/10/minus-evs-plus-ovs-value-help-smart-input

    https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/391ee590-0201-0010-1c89-f1193a886421www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/391ee590-0201-0010-1c89-f1193a886421">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/391ee590-0201-0010-1c89-f1193a886421>

    For ur 2nd problem if i understand properly,u have added a new field in table.in that case u have to reimport the model.

    In case u r getting that attribute already in model,in the view also it should be model attribute.U can not bind value node to model node.It will not allow.If u try to do it in runtime,u will be getting runtime exception.

    regards

    Sumit

    Message was edited by:

    Sumit Malhotra

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Shah,

      After reimporting the Model must do the mapping including new parameter.

      Take a Value Node “Employee” with cardinality 0..1 with a attribute say eno.

      Initializes the node inside wdDoinit.

      wdContext.nodeEmployee()bind(wdContext.createEmployeeElement());

      Here is the code to Execute RFC with Parameter.

      IWDMessageManager msg = wdComponentAPI.getMessageManager();

      try {

      String empid = wdContext.currentEmployeeElement().getEno();

      Bapi_Employee_Getdata_Input input = new Bapi_Employee_Getdata_Input();

      //set the input parameter.

      input.setEmployee_Id(empid);

      wdContext.nodeBapi_Employee_Getdata_Input().bind(input);

      // Calls remote function module BAPI_EMPLOYEE_GETDATA

      wdContext.currentBapi_Employee_Getdata_InputElement().modelObject().execute();

      // Synchronise the data in the context with the data in the model

      wdContext.nodePersonal_Data().invalidate();

      } catch (Exception e) {

      // TODO Auto-generated catch block

      msg.reportSuccess(e.getMessage());

      }

      https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/355b9c90-0201-0010-d2a8-89fece426526

      For OVS

      -


      Search Help(F4 Help)

      Regards,

      Mithu