cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 oData Read function with function import functionality

Former Member
0 Kudos

HI,

1)I had created a project ZACCCLERK using SEWG and imported Data base T001S and it has properties Bukrs,Busab,Sname,Usnam and made Bukrs and Busab as key fields.

2)created a function Imports "INVOKEWORKFLOW" and added the following parameters in the function imports

BUKRS,BUSAB,SNAME,USNAM and used HTTP as GET

3)I am able to execute this service with the below url in SAP Netwear Gateways

sap/opu/odata/sap/ZACCCLERK_SRV/INVOKEWORKFLOW?BUKRS='0008'&BUSAB='ZC'&SNAME='Anna Tehlewitz'&USNAM='I825956'

in backend system i.e SAP system

4)Now i created a  SAPUI5 project in Ecipse and done the following code in the INIT() function in controller

var oModel = new sap.ui.model.odata.ODataModel      

("https://pgdmain.wdf.sap.corp/sap/opu/odata/sap/ZACCCLERK_SRV/");

this.getView().setModel(oModel,"accClerk");

And in the Controller there is another function called sumbit

sumbit : function(){

var oModel = this.getView().getModel("accClerk");

var OData = {

  Bukrs : comCodeval,

  Busab : accClerkval,

  Sname : nameAccval,

  Usnam : sapOfficerval

  };

I had tried all the below 6 possible ways and i was getting error like for example invalid key or invalid function import parameters

1)oModel.read("/INVOKEWORKFLOW(Bukrs='"+comCodeval+"'&Busab='"+accClerkval+"'&Sname='"+nameAccval+"'&Usnam='"+sapOfficerval+"'')",

               null,

               null,

               false);

2)oModel.read("/INVOKEWORKFLOW('"+comCodeval+"&"+accClerkval+"&"+nameAccval+"&"+sapOfficerval+"')", OData, null, null);*/

3)oModel.read("/INVOKEWORKFLOW", OData);

4)oModel.read("/INVOKEWORKFLOW('"+comCodeval+"&"+accClerkval+"&"+nameAccval+"&"+sapOfficerval+"')", OData, null, null);

5)oModel.read("/INVOKEWORKFLOW('"+comCodeval+"&"+accClerkval+"&"+nameAccval+"&"+sapOfficerval+"')", OData);

6)oModel.read("/INVOKEWORKFLOW('"+comCodeval+"&"+accClerkval+"')", OData);

COuld you any one help on this.

Thanks

Durga Prasanth

Accepted Solutions (0)

Answers (1)

Answers (1)

jamie_cawley
Advisor
Advisor
0 Kudos