Skip to Content
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.
     /wp-content/uploads/2013/11/2_313054.jpg
      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:
     /wp-content/uploads/2013/11/1_313076.jpg
     Import Entity type for header from RFC Function Module
     /wp-content/uploads/2013/11/4_313078.jpg
Select required fields and mark EBELN as Key field.

     /wp-content/uploads/2013/11/5_313082.jpg

Import Entity type for Items from RFC Function Module
/wp-content/uploads/2013/11/1_313076.jpg/wp-content/uploads/2013/11/2_313054.jpg

     Create Entity Sets:

     Mark entity set’s as Addressable.

/wp-content/uploads/2013/11/3_313088.jpg

Create Association to navigate from Header to Items data:

/wp-content/uploads/2013/11/4_313078.jpg

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

/wp-content/uploads/2013/11/5_313082.jpg

/wp-content/uploads/2013/11/6_313091.jpg

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

/wp-content/uploads/2013/11/7_313092.jpg

/wp-content/uploads/2013/11/9_313095.jpg

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

/wp-content/uploads/2013/11/10_313096.jpg

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

/wp-content/uploads/2013/11/1_313076.jpg

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

/wp-content/uploads/2013/11/2_313054.jpg

/wp-content/uploads/2013/11/3_313088.jpg

Save and Activate the project.

Maintain service – Goto Transaction code: /IWFND/MAINT_SERVICE

Add service:

/wp-content/uploads/2013/11/4_313078.jpg

  Select service and add system aliases.

/wp-content/uploads/2013/11/5_313082.jpg

   3. Test our service in ‘Service Explorer’:

/wp-content/uploads/2013/11/6_313091.jpg

/wp-content/uploads/2013/11/1_313076.jpg

/wp-content/uploads/2013/11/2_313054.jpg

    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

/wp-content/uploads/2013/11/3_313088.jpg

     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.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Rakshit Doshi

    Hi Sheetal,

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

    Thanks,

    Rakshit Doshi

    (0) 
  2. LIJO JOHN

    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.

    (0) 
  3. Mahesh B

    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 ).

    (0) 

Leave a Reply