May 27

OData Basics – Part 6 (Build Service using GBI)

Consuming BOPF in OData service is very simple and can be achieved in 3 steps. Refer to the blog Gateway BOPF Integration (GBI)

Start with transaction SEGW

2017-05-26 17_53_05-183.82.114.111_3333 - Remote Desktop Connection

Click ‘Create’ button:

2017-05-26 17_53_30-183.82.114.111_3333 - Remote Desktop Connection

2017-05-26 17_54_16-183.82.114.111_3333 - Remote Desktop Connection

To consume BOPF, Navigate to Data Model >>> Redefine >>> BOPF Service

2017-05-26 17_54_35-183.82.114.111_3333 - Remote Desktop Connection

For this demo, I have chosen “/BOBF/DEMO_PRODUCT” and “SELECT_ALL” as default query

2017-05-26 17_55_06-183.82.114.111_3333 - Remote Desktop Connection2017-05-26 17_55_51-183.82.114.111_3333 - Remote Desktop Connection

Choose the required nodes from BOPF business object and click ‘Finish’

2017-05-26 17_56_47-183.82.114.111_3333 - Remote Desktop Connection

Now, generate run time artifacts..

2017-05-26 17_57_15-183.82.114.111_3333 - Remote Desktop Connection2017-05-26 17_57_54-183.82.114.111_3333 - Remote Desktop Connection

Next, Activate the service as shown in below screenshot or through transaction /IWFND/MAINT_SERVICE

2017-05-26 17_57_57-183.82.114.111_3333 - Remote Desktop Connection

2017-05-26 17_58_46-183.82.114.111_3333 - Remote Desktop Connection

Test the service now..

2017-05-26 17_59_33-183.82.114.111_3333 - Remote Desktop Connection

When I executed the service, I was able to see metadata of the service:

2017-05-26 18_00_40-183.82.114.111_3333 - Remote Desktop Connection

I have retrieved the data related to ROOT node

2017-05-26 18_02_15-183.82.114.111_3333 - Remote Desktop Connection

Also used association to retrieve the text data

2017-05-26 18_02_16-183.82.114.111_3333 - Remote Desktop Connection

Data can be verified in the backend test environment BOBT:

2017-05-26 18_03_48-183.82.114.111_3333 - Remote Desktop Connection2017-05-26 18_04_42-183.82.114.111_3333 - Remote Desktop Connection2017-05-27 07_33_15-183.82.114.111_3333 - Remote Desktop Connection