Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

Issue in implemnting Gateway service

$
0
0

Hi ,

 

 

This is my scenario...

 

I have created a function module which accepts two numbers and displays the result of it...in this I have two import parameters( A & B) and one export parameter(RES). RES stores the sum of A & B.

 

Using this function module i have created a service in gateway, I'm able to view the xml file in the HTTP Response part of the gateway client (/iwfnd/gw_client)

the name of my service is ZMY_DEMO_SRV

this is my URL -> /sap/opu/odata/sap/ZMY_DEMO_SRV/?$format=xml

 

<?xml version="1.0" encoding="utf-8" ?>

-<app:service xml:lang="en" xml:base="http://<server-name>:<port-no>/sap/opu/odata/sap/ZMY_DEMO_SRV/" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData">

-<app:workspace>

<atom:title type="text">Data</atom:title>

-<app:collection sap:content-version="1" href="NEWCollection">

<atom:title type="text">NEWCollection</atom:title>

<sap:member-title>NEW</sap:member-title>

</app:collection>

</app:workspace>

<atom:linkrel="self" href="http://<server-name>:<port-no>sap/opu/odata/sap/ZMY_DEMO_SRV/" />

<atom:linkrel="latest-version" href="http://<server-name>:<port-no>/sap/opu/odata/sap/ZMY_DEMO_SRV/" />

</app:service>

 

 

Here is my metadata xml file

-> /sap/opu/odata/sap/ZMY_DEMO_SRV/$metadata

 

 

<?xml version="1.0" encoding="utf-8" ?>

-<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData">

-<edmx:DataServices m:DataServiceVersion="2.0">

-<Schema Namespace="ZMY_DEMO_SRV" xml:lang="en" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">

-<EntityType Name="NEW" sap:content-version="1">

-<Key>

<PropertyRefName="Res" />

</Key>

<PropertyName="A" Type="Edm.Int32" Nullable="false" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<PropertyName="B" Type="Edm.Int32" Nullable="false" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

<PropertyName="Res" Type="Edm.Int32" Nullable="false" sap:sortable="false" sap:filterable="false" />

</EntityType>

-<EntityContainer Name="ZMY_DEMO_SRV" m:IsDefaultEntityContainer="true">

<EntitySetName="NEWCollection" EntityType="ZMY_DEMO_SRV.NEW" sap:content-version="1" />

</EntityContainer>

<atom:linkrel="self" href="http://<server-name>:<port-no>/sap/opu/odata/sap/ZMY_DEMO_SRV/$metadata" xmlns:atom="http://www.w3.org/2005/Atom" />

<atom:linkrel="latest-version" href="http://<server-name>:<port-no>/sap/opu/odata/sap/ZMY_DEMO_SRV/$metadata" xmlns:atom="http://www.w3.org/2005/Atom" />

</Schema>

</edmx:DataServices>

</edmx:Edmx>

 

 

         Now I wanted my service to accept two inputs and print the result .

C      Could you please guide me through as to how to go about doing this in the URL if possible or is there any other

         way to go about this ...

 

 

          Regards,

          Prathik.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>