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

How do you invoke the custom operation of function import at runtime

$
0
0

Hi,

     Could you please tell me how do you invoke the operation of a function import at runtime

 

Here is the code of my remote enable function module (ZF_EXPERIMENT)

 

FUNCTION ZF_EXPERIMENT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(A) TYPE  I
*"     VALUE(B) TYPE  I
*"     VALUE(X) TYPE  I
*"  EXPORTING
*"     VALUE(RES) TYPE  I
*"----------------------------------------------------------------------

RES
= A + B + X.
RETURN.




ENDFUNCTION.

 

 

 

 

Here is the details of my metadata(i.e; the HTTP response )

this is my request URI ->  /sap/opu/odata/sap/ZMY_EXPERIMENT_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_EXPERIMENT_SRV" xml:lang="en" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">

 

 

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

 

 

-<Key>

 

 

<PropertyRefName="X" />

 

</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="X" Type="Edm.Int32" Nullable="false" sap:sortable="false" sap:filterable="false" />

 

 

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

 

</EntityType>

 

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

 

 

<EntitySetName="EXPCollection" EntityType="ZMY_EXPERIMENT_SRV.EXP" sap:content-version="1" />

 

 

-<FunctionImport Name="FIXP" ReturnType="ZMY_EXPERIMENT_SRV.EXP" EntitySet="EXPCollection" m:HttpMethod="GET" sap:action-for="ZMY_EXPERIMENT_SRV.EXP">

 

 

-<Parameter Name="A" Type="Edm.String" Mode="In" MaxLength="7">

 

 

-<Documentation>

 

 

<Summary>Employees Here</Summary>

 

 

<LongDescription/>

 

</Documentation>

</Parameter>

 

-<Parameter Name="X" Type="Edm.String" Mode="In" MaxLength="7">

 

 

-<Documentation>

 

 

<Summary>Employees Here</Summary>

 

 

<LongDescription/>

 

</Documentation>

</Parameter>

 

-<Parameter Name="B" Type="Edm.String" Mode="In" MaxLength="7">

 

 

-<Documentation>

 

 

<Summary>Employees Here</Summary>

 

 

<LongDescription/>

 

</Documentation>

</Parameter>

</FunctionImport>

</EntityContainer>

 

<atom:linkrel="self" href="http://<server-name>:<port-no>/sap/opu/odata/sap/ZMY_EXPERIMENT_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_EXPERIMENT_SRV/$metadata" xmlns:atom="http://www.w3.org/2005/Atom" />

 

</Schema>

</edmx:DataServices>

</edmx:Edmx>

 

 

 

 

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>