Arjan Nieuwenhuizen
Read all my blogsIn some earlier articles on this blog (like this one), we discussed SAP Netweaver Gateway, SAP’s platform for exposing business information and functionality to the outside world.
In this blog about SAP Netweaver Gateway we will discuss the most important transactions that you might use when you are working with SAP Netweaver Gateway. These transactions vary from customizing, development and testing / monitoring transactions.
Customizing: Transaction SPRO
- Enabling/disabling the SAP Netweaver Gateway
- Defining roles for SAP Netweaver Gateway users and administrators
- Connecting the system to SLD
- Connection the system to another SAP system
- Turning on/off the SAP Netweaver Gateway cache
- Turning on/off virus scanning (for binary data)
- Set SAP Netweaver Gateway log levels
Check out the path SAP Netweaver > Gateway (and subordinate paths) for all the settings.
Transaction SPRO |
Development: Transaction SEGW (Gateway Service Builder)
- The model
- A model provider base class (MPC)
- A model provider extension class (MPC_EXT)
- A data provider base class (DPC)
- A data provider extension class (DPC_EXT)
- The actual SAP Netweaver Gateway Service
Development: Transaction SE24 (Class Builder)
As mentioned in the previous section, the Gateway Service Builder generates a data provider extension class for you. Out of the box, everything is created for you and ready to go. For each of your modelled entity collections, the generated class already has the following methods set up:
- GET_ENTITY (Read a single entity)
- GET_ENTITYSET (Read a collection of entities)
- CREATE_ENTITY (Create an entity)
- UPDATE_ENTITY (Update a single entity)
- DELETE_ENTITY (Delete a single entity)
Admin: /IWFND/MAINT_SERVICE (Maintain Services)
Once your model and implementation are done, you can activate & maintain your service using this transaction. This transaction can also be found via transaction SPRO.
The most important thing you do here is adding your service to the list and assigning one or more system aliases to the service. The system alias can either be the local system or any other back-end system in case of a standalone Gateway installation (CRM, ECC etc.). By assigning the system alias, you are instructing your gateway on which server the service should be executed.
Transaction /IWFND/MAINT_SERVICE (Activate and Maintain Services) |
Testing: /IWFND/GW_CLIENT (SAP Netweaver Gateway Client)
Once modelling, implementing and activating is done, it is time to test your service. This can be done either by calling it from a client like an iOS device, but the SAP Netweaver Gateway also includes a transaction that can be used to test the services you create.
All you have to do is specify the path to your service, the method you want to test (GET/POST/PUT/DELETE) and request data (request data only applicable for PUT/update and POST/create). Once you hit execute, the Gateway Client will execute your request and provide you with the expected response or an error if something’s wrong.
SAP Netweaver Gateway Client |
Testing / Monitoring: /IWFND/ERROR_LOG (Gateway Error Log)
Let’s say you did not get the expected result when testing with the SAP Netweaver Gateway Client, then you would probably want to analyse what went wrong. The error log provides you a list you requests to the server that did not succeed. In the error log you can select the failed request and look at the request body of the call and get some additional information on the error that occurred while processing the request (e.g. RFC failure). The SAP Netweaver Gateway can provide you with some information in the response of your failed request, but this response can be vague and you will definitely need the error log to analyse errors with a bit more detail.
Transaction /IWFND/ERROR_LOG: SAP Netweaver Gateway Error Log |
Monitoring: /IWFND/APPS_LOG (Application Log Viewer)
If you’re not only interested errors, but also the successful service calls and activity on your SAP Netweaver Gateway server, you can check out this transaction. I must admit I don’t use it that often because it does not provide a whole lot of information. But you might be interested if someone who should be testing your app (or something like that) is actually testing your app. In the apps log, you can check if the user shows some activity in a period that you can select. The apps log provides you with information about the type of service call (read/create/update/delete), user name and time and date of the call.
Transaction /IWFND/APPS_LOG: SAP Netweaver Gateway Application Logs |
Too vague? Want more details?
I can imagine you would want some additional and more detailed info about all this. Luckily there are a lot of resources available online via http://scn.sap.com/community/developer-center/netweaver-gateway.