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
Labels in this area