Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Below are prerequisites before starting development of Gateway service and Android application.
-->. ECC system (Backend system)
-->. Gateway system
-->. RFC connections defined between above two systems.
-->. Eclipse with gateway plugin installed.
Here i am expecting that all the connections between two systems are in place and all the components that are required are installed in Eclipse. Most of the installation steps are already posted in SCN.
Below are steps i will discuss in my blog:
1. Create a custom RFC Function Module to get PO header and item details. ( Developed in Backend system)
2. Create service in gateway system using above RFC Function Module.
3. Test our service in 'Service Explorer'.
4. Create Application in Eclipse and testing on Simulator.
1. Create a custom RFC Function Module to get PO header and item details. ( Developed in Backend system)
      In this function module i am using FLAG variable to get data separately for header and items.( I am using same function module for both Header & Item      Entity sets)
     As there is no filter on PO number, i am getting only first 50 records.
    
      You can get sample code in the attached file.
2. Create service in gateway system using above RFC Function Module.
    Create New Project in SEGW:
    
     Import Entity type for header from RFC Function Module
    
Select required fields and mark EBELN as Key field.
    
Import Entity type for Items from RFC Function Module

     Create Entity Sets:

     Mark entity set's as Addressable.

Create Association to navigate from Header to Items data:

HEADER -> Map to Data source (GetEntity - Read)

HEADER -> Map to Data source (GetEntitySet - Query)

ITEMS -> Map to Data source (GetEntity - Read)

As we are using single RFC to get both Header and Item details, we are using flag to distinguish Header and Item.

ITEMS -> Map to Data source (GetEntitySet - Query)

Save and Activate the project.

Maintain service - Goto Transaction code: /IWFND/MAINT_SERVICE

Add service:

  Select service and add system aliases.

   3. Test our service in 'Service Explorer':

    Here we will get first 50 PO’s, as we are using UPTO 50 rows in our FM and we are not specifying any condition in URI.

    You can see sample data from the attached 'PO Header Data' file.

    Use Filter to get PO details: (Header & Items)

    POHeader/?$filter=(Ebeln eq '3000000191')&$expand=PONavigation

     You can see sample data from the attached 'PO Header & Items' file.

In the second part Steps to create custom Gateway service and Android application through Eclipse Part 2, we will see how to Create Application in Eclipse and testing on Simulator.

5 Comments
tom_krutis
Explorer
0 Kudos

Thank you for this blog, very helpfull.

rakshit_doshi
Active Contributor
0 Kudos

Hi Sheetal,

What steps did you follow to enable subscription and notification collection on your segw project based odata service?

Thanks,

Rakshit Doshi

0 Kudos

Hi Rakshit,

Try to check this blog : http://scn.sap.com/thread/3451972

Thanks,

Sheetal Reddy

Former Member
0 Kudos

Hi Sheetal,

Very helpful blog.

I have a query here. At the time of field mapping for service implementation, you have mentioned the RFC destination there. I hope its Dev front end to Dev back end system. How will we handle this when we are moving this to Quality system? Should we have the same RFC destination name in Quality systems?

Regards,

Lijo John.

Former Member
0 Kudos
Hi Sheetal,

 

Can please attache your Function module code .

 

I have tried same with sales order with multiple in put parameters and Header and item Entities but not getting the navigation values, Individually it is showing the values ( I.e both entities ).
Labels in this area