Quantcast
Channel: SAP Gateway
Viewing all articles
Browse latest Browse all 253

Custom Gateway service with CRUD Operations and Android application through Eclipse Part 1

$
0
0

In my previous blog Steps to create custom Gateway service and Android application through Eclipse with GWPA Part 1, I was discussing about getting PO data without CRUD operations and any filter conditions. In this blog I will explain all CRUD operations and how to build an android app based on input values. Before starting, I am expecting that you have basic idea of gateway service or you have gone through my previous blog.

 

Below are the steps we will discuss in this blog.

1. RFC function module with PO Number,Creation Date & PO Release indicator as input parameters.

2. Create service in Gateway system with all the CRUD operations.(Create Read Update Delete)

3. Test our service in 'Service Explorer'.

4. Create Application in Exclipse and test it on Simulator.

 

1. Create a custom RFC Function Module to get PO header and item details. ( Developed in Backend system)

In this FM we have option to pass PO number & Creation date range. I am using custom FM for Read & Query operations only as there is no standard FM to get PO data with input as PO number Range or Date range.

A.  FM: ZBAPI_PO_GETLIST to Read & Query Operations

B.  FM: BAPI_PO_CREATE1 to Create.

C.  FM: BAPI_PO_CHANGE to Delete & Update Operations

FM1.jpg

FM2.jpg

You can get sample code in the attached file.

 

2. Create service in Gateway system with all the CRUD operations.(Create Read Update Delete)

Goto SEGW:

1.jpg

Import Entity type from Data Source

2.jpg

Entity Type for PO

3.jpg

Entity Type for POItems

4.jpg

Create Entity sets, Association and Activate it.

5.jpg

Map data source for READ

6.jpg

7.jpg

8.jpg

Similarly do it for Query , update & delete operations

9.jpg

10.jpg

11.jpg

Similarly map data sorce for POItemSet for Read & Query also

13.jpg

Goto Transaction: /IWFND/MAINT_SERVICE

Select service and add to list

14.jpg

Select service and explore service:

15.jpg

2.jpg

3.jpg

In my next blog Custom Gateway service with CRUD Operations and Android application through Eclipse Part 2 I will explain various combinations of filter conditions and how to test CRUD operations.


Viewing all articles
Browse latest Browse all 253

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>