Create a service in SAP using T-Code SICF

Step 1 : Create a service in SAP using T-Code SICF.

Create a service SAP
Create a service SAP

Step 2 : Create a New Sub Elements in default_host->sap->bc. Here we give the name ZAPI_TESTSERV and select Independent service.

Adding Handler in SAP Service
Adding Handler in SAP Service

In HANDLER enter the Class Object Name which we are created. In our case we enter ZAPI_TEST and Save the Service in Local Object. Now We Created Service for API. But it is not Activated. We need to activate it. Select the service name ZAPI_TESTSERV and click right mouse button and select Activate Service option. Our service is now activated and ready for testing. To test our service right click on our service and select Test Service. We will get the test result as given below.

OUTPUT in JSON format

JSON Data
JSON Data

You can watch the complete video tutorial also.

In the next section we will learn how to connect this JSON Data through C# application.