You are on page 1of 1

Assignment number # ODG106

gFunction Import in SAP gateway


Scenario –

 Create SEGW project, and define Entity Type with name “Employee” using the Employee table.
 Right click on Data model and create function import. Provide proper name
 Provide the below details.
Cardinality: 0 :: N
Return Type Kind : Entity Type
Return Type : Employee
Return EntitySet : EmployeSet
HTTP Method Type : GET
 Register the Service using /IWFND/MAINT_SERVICE.
 Test the metadata using /IWFND/GW_CLIENT and it should be successful with status code 200.
 Now we will implement function import operation. Go to DPC_EXT class and redefine method
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION.
 Read the parameter from IT_PARAMETERS and filter the values from Employee table based on
this.
 Test the service using transaction /IWFND/GW_CLIENT using the below parameters.
/sap/opu/odata/sap/ZUSERINFO_SRV/Employee?Country=’US’
 Validate the output.

Tables involved – Employee(Custom table)

Transaction Involved – SEGW, /IWFND/MAINT_SERVICE, /IWFND/GW_CLIENT

Helpful Links:

https://blogs.sap.com/2014/03/06/let-s-code-crudq-and-function-import-operations-in-odata-
service/

https://help.sap.com/viewer/68bf513362174d54b58cddec28794093/7.4.19/en-US/
c5dc22512c312314e10000000a44176d.html

You might also like