on 04-28-2015 1:51 PM
Hi,
We are trying to implement function import using eclipse kepler SAP Platform Tools. We created a stored procedure with name GetStudentName as below.
CREATE PROCEDURE GetStudentName(
@studentid INT --Input parameter , Studentid of the student
)
AS
BEGIN
SELECT FirstName+' '+LastName As FullName FROM MarkList WHERE StudentID=@studentid
END
We created ODataModel with entity types and function imports with the same name as stored procedure created before.
The deployed service document looks like below
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
</Key>
<Property Name="StudentID" Type="Edm.String" Nullable="false"/>
<Property Name="FirstName" Type="Edm.String"/>
<Property Name="LastName" Type="Edm.String"/>
<Property Name="Subject" Type="Edm.String"/>
<Property Name="Marks" Type="Edm.String"/>
</EntityType>
</Key>
<Property Name="PhoneBookID" Type="Edm.String" Nullable="false"/>
<Property Name="Name" Type="Edm.String"/>
<Property Name="Address" Type="Edm.String"/>
<Property Name="PhoneNo" Type="Edm.String"/>
</EntityType>
</Key>
<Property Name="StudentID" Type="Edm.String" Nullable="false"/>
<Property Name="FirstName" Type="Edm.String"/>
<Property Name="LastName" Type="Edm.String"/>
<Property Name="Subject" Type="Edm.String"/>
<Property Name="Marks" Type="Edm.String"/>
</EntityType>
<EntitySet Name="PhoneBook" EntityType="MarkOdataModel.PhoneBook"/>
<EntitySet Name="MARKVIEW4" EntityType="MarkOdataModel.MarksView"/>
</FunctionImport>
</EntityContainer>
</Schema>
Now we are trying to access https://xxx.xxx.x.xxx:8083/gateway/odata/SAP/SAP_TESTSERVICE;v=1/GetStudentName?$studentid=1011
We are getting the following error:
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<message xml:lang="en-US">Requested entity could not be found.</message>
</error>
Please help us to resolve this issue?
Hi,
Using $filter on service created, we are successful in making simple queries.
for example
store.executeReadEntitySet("tablename" + "?$filter=status+eq+'active'"
, null);
we are able to make complex queries too
$filter=x eq 'a' and y eq 'b' and z eq 'c'
Now we are trying with table join.
Please clarify that this can be done through SAP NetWeaver Gateway 2.0 only?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shibu,
IGW doesn't support function import. Enabling Database Content as OData Services - Data Integration using Integration Gateway - SAP Libra...
CC: Bjoern Woppmann ,
Regards,
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.