Quantcast
Channel: SAP NetWeaver Gateway Developer Center
Viewing all 49 articles
Browse latest View live

OData - Everything that you need to know (Part 6)

$
0
0

In my previous blogs, we discussed the basics of HTTP, REST and finally Odata with context of SAP Netweaver Gateway. We also saw what are the possible deployment options available. In short we have laid the foundation for what is coming in the following blogs, i.e. end-to-end guide of creating, publishing and consuming Odata services.

 

Previous Blogs in the series:

OData - Everything that you need to know (Part 1)

OData - Everything that you need to know (Part 2)

OData - Everything that you need to know (Part 3)

OData - Everything that you need to know (Part 4)

OData - Everything that you need to know (Part 5)

 

In this blog, we will define the problem statement and give you a glimpse of what we are trying to build as a small application to showcase the power of OData. We will also build a simple Fiori-like app as a frontend consumer. Knowledge of Fiori is not at all a must here. As I mentioned earlier, during the course of the end-to-end exercise we will also explain various artifacts of OData.

 

In the next few blogs we will be creating a simple Master-Detail Fiori-like app based on SAP Flight Model example. . We will leverage the existing backend developments to expose the data as OData service that will be consumed by frontend. Future blogs will follow the Embedded deployment environment but, most of the steps we do here is applicable to the other two deployments. It is just a matter of where you do the modeling.

Here, is a link to the Overview of Fiori in case you wish to know more.

 

The app we are going to develop is a very simple app based on SFLIGHT example to check seat availability and add new flight tours.

Master-detail app will have the left navigation panel will feature the list of Airlines along with codes. The detail section of the app will contain the tabular list of different flights corresponding Airline. User will be allowed to select a flight and check for availability for a given date and class. App will also allow user to add new flights for a specific Airline and dates on which the flights are scheduled. We will showcase the CRUDQ operations along with navigations from master to object view and function imports during the course of this app.

 

Data Model for SFLIGHT that we will use.

Drawing6.jpg

 

 

 

 

UI Mock-ups for the Sflight App:

1.jpg

Master-Detail view with Airlines information on left navigation panel and various flights operating for a specific airlines on the details section.

 

 

 

2.jpg

Check Availability sceanrio

 

 

 

3.jpg

Information on seats availability

 

 

 

4.jpg

Adding a new Flight tour for future dates.

 

 

In my next blog, I will cover the Service Document, Service Document Metadata and Entity Data Model concepts and then we are ready to get into the system.

 

Next Blog: OData - Everything that you need to know (Part 7)


OData - Everything that you need to know (Part 7)

$
0
0

In my last blog, I had given a breif overview of the data model for the OData service that we will build in the next segments. In this blog, I am posting a video explaining the structure of an OData service, OData Meta Model, browsing through an existing OData service in the system and explaining the URI convention used for consuming OData services.

 

Previous Blogs in the series:

OData - Everything that you need to know (Part 1)

OData - Everything that you need to know (Part 2)

OData - Everything that you need to know (Part 3)

OData - Everything that you need to know (Part 4)

OData - Everything that you need to know (Part 5)

OData - Everything that you need to know (Part 6)

 

 



In the next blog, I will create  an actual OData service in the system.


Next Blog: OData - Everything that you need to know (Part 8)


OData - Everything that you need to know (Part 8)

$
0
0

In Part 7 of this blog series, we saw the structure of an OData service in the system and discussed the OData URI convention model.

In this blog, we will create the OData model for the flight example.

 

Previous Blogs in the series:

OData - Everything that you need to know (Part 1)

OData - Everything that you need to know (Part 2)

OData - Everything that you need to know (Part 3)

OData - Everything that you need to know (Part 4)

OData - Everything that you need to know (Part 5)

OData - Everything that you need to know (Part 6)

OData - Everything that you need to know (Part 7)



 

 

 

In the next blog, I will explain the OData Channel and implement the service.

 

Next Blog: OData - Everything that you need to know (Part 9)

OData - Everything that you need to know (Part 10)

$
0
0

In previous few blogs, we saw how the structure of an OData service, service document, metadata, URI convention and also created an OData service from scratch.


Previous Blogs:

OData - Everything that you need to know (Part 1)

OData - Everything that you need to know (Part 2)

OData - Everything that you need to know (Part 3)

OData - Everything that you need to know (Part 4)

OData - Everything that you need to know (Part 5)

OData - Everything that you need to know (Part 6)

OData - Everything that you need to know (Part 7)

OData - Everything that you need to know (Part 8)

OData - Everything that you need to know (Part 9)


In this blog, I will simply show you the steps required to register the service and then it is ready for consumption.

 

OData - Everything that you need to know (Part 9)

$
0
0

In the previous blog, I created the data model of the OData service for the Flight example. In this segment I will explain he OData Channel, model provider and data provider classes and also implement the service.

 

Previous Blogs in the series:

OData - Everything that you need to know (Part 1)

OData - Everything that you need to know (Part 2)

OData - Everything that you need to know (Part 3)

OData - Everything that you need to know (Part 4)

OData - Everything that you need to know (Part 5)

OData - Everything that you need to know (Part 6)

OData - Everything that you need to know (Part 7)

OData - Everything that you need to know (Part 8)

 

 

 

In the next blog, I will show you how to register your service and test the same.

 

Next Blog: OData - Everything that you need to know (Part 10)

Step by Step Gateway Odata Service Creation Using SEGW - method 1. importing DDIC structure

$
0
0

Here I am exposing a sap table as odata using gateway service builder.TCODE is segw.

 

Steps

1.Go to TCODE SEGW.Then click on create icon
Fill Details Project name ,Description and choose package click tick button.A new project will be created.

 

2.Expand the Node Select Data Model node and right click select import-->DDIC structure

 

3.Enter name of the entity(give any reasonable name) and select abap structure.Here i have selected a custom table created by me

 

4.Select which all fields to be exposed.Tick mark needed fields and click next button

 

5.Select the Key fields in the table and Click finish button

 

6.Now click on Generate button to generate model provider classes and data provider class.This will be generated automatically by the system.

 

7.Click tick button.

 

8.Expand Service Maintenance node and click register button.

 

9.Select system alias.Here iam selecting LOCAL.Click tick mark button.

 

10.If you want to change service name you can do it here.Iam not gonna change it.Select local object and press OK button.Now press maintain button

 

11.Already Now you can view your service in the browser or gateway client.

 

12.Wow See the result in gateway client.Note that http status is 200 ok.If you get other than 200 You have done something wrong.         

An approach to automate oData services in NetWeaver Gateway

$
0
0

I am sharing the approach we took in automating oData services in our custom development project for our customer.


Problem statement / Why we need to automate ?

 

  1. We are developing 40+ GW Services in large insurance project in a landscape comprising of multiple systems : ERP Core, FS-PM, CRM, BI and other third-party products.
  2. As GW Data providers are wrappers of underlying functionalities, there is always a constant change in the backend systems which requires enormous amount of time in troubleshooting the issues

 

Solution / What and how we automated GW Services

  1. Developed a simple program to execute the test cases defined in Gateway client tool.
    1.       A configuration table to maintain which test group / test cases to be executed.
    2.       Logs table to maintain the test execution
    3.       Program which reads data from configuration table and execute the tests using Gateway client APIs and logs the test execution.
  2. Executed this program on a daily basis to test the following
    1.       Functional Regression : Does all the functionalities works as with yesterday
    2.       Performance testing : Captures the response time and content length for each test
    3.        Security testing : Is there any “Forbidden” response

 

Benefits we got

  1. Reduced the manual testing efforts of 5 hours per day resulting in 500 hours of saving for the project in next 6 months (for UAT till go-live)
    1.        200+ GW service operations automated
  2. Proactively monitoring the issues and solving it before the test team report the issues

How to merge data from multiple services running in multiple systems (multiple origin)

$
0
0

This blog will analyze how to achieve data merging of different two back end systems, we can assume the following scenario.

 

data_composition_from_multiple_systems.PNG

 

 

1. Step 1 : Create a Gateway builder project in SEGW in both CRM and BW with same EDM model.

blog_1_segw_project.png

 

2. Step 2 : Implement the data providers in CRM and BW systems.

blog_1_implement_1.png

 

blog_1_implement_2.png

3. Step 3: Register the service in GW Hub (from one system at-least)

blog_1_register.png

 

4. Step 4: Assign the system alias of both CRM and BW in GW Hub.

blog_1_sys_alias.png

5. Step 5 : Test and consume the services.

blog_1_test.png


Hub Deployment - Configuration Steps and Troubleshooting

$
0
0

Dear Gateway Developers,

 

Below I will list the prerequisites and common error scenarios encountered during testing SAPUI5 applications in Quality systems where there is Hub deployment of gateway server.

 

Prerequisites -

 

1. To be able to successfully call the backend code, a RFC destination has to be created in gateway system pointing to the backend server which shall use the login details of 'current user'. This will be done by SM59.

 

2. The a System alias has to be created which shall use the RFC destination created in step 1. This can be done via help doc i.e. go to transaction SPRO open the SAP Reference IMG and navigate to:  SAP NetWeaverGatewayOData ChannelConfigurationConnection Settings

SAP NetWeaver Gateway to SAP SystemManage SAP System Aliases

and create new entry.


3.Now the OData service needs to be registered via transaction code /N/IWFND/MAINT_SERVICE to consume the above created system alias.

 

Till this step the service should get registered and you should be able to successfully fetch the metadata.

 

Now, following issues may be encountered.


1. Data is getting created via gateway client but not from UI5 application.

Check whether the virus profile is deactivated or not. If not deactivate it. (T-code: /n/IWFND/VIRUS_SCAN)


2. If you are getting success - 200 in gateway client but still not getting data.

Check for proper authorizations for IWSV,IWSG and S_RFCACL object.


3. If timeout error is coming.

Go to T-code SMICM and check the Processing and KeepAlive timeout parameters values.


4. Metadata changes like data type change, addition/deletion of properties etc are not getting reflected.

Clear the backend cache (/n/IWBEP/CACHE_CLEANUP) and gateway cache(/n/IWFND/CACHE_CLEANUP)

 


I will keep adding to this list with time.



Further analysis can be done via activating the gateway trace in t-code (/n/IWFND/TRACES).



Please leave your experiences and feedback.



Viewing all 49 articles
Browse latest View live


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