In my previous blog Steps to create custom Gateway service and Android application through Eclipse 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:

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

Import Entity type from Data Source

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

Entity Type for PO

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

Entity Type for POItems

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

Create Entity sets, Association and Activate it.

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

Map data source for READ

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

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

/wp-content/uploads/2013/11/8_325277.jpg

Similarly do it for Query , update & delete operations

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

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

/wp-content/uploads/2013/11/11_325280.jpg

Similarly map data sorce for POItemSet for Read & Query also

/wp-content/uploads/2013/11/13_325282.jpg

Goto Transaction: /IWFND/MAINT_SERVICE

Select service and add to list

/wp-content/uploads/2013/11/14_325292.jpg

Select service and explore service:

/wp-content/uploads/2013/11/15_325293.jpg

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

/wp-content/uploads/2013/11/3_325272.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.

To report this post you need to login first.

1 Comment

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

Leave a Reply