Tuesday, 25 October 2016

Creating a Class Handler for SICF Service (with code example)

This is both a tutorial for creating a SICF service with source code and also the documentation for zMIMESync service class. Check the open source project if you are a BSP developer.
Easy BSP JavaScript development with zMIMESync (Open Source)
My colleagues leverage new front-end technologies like JS frameworks. However each time they edit a JavaScript file they have to open the MIME file, edit it and close it to see the change in the … Continue reading
Go to transaction se24 or go to your development package to create class.
se24:

Creating a Class Handler for SICF Service (with code example)

Create a class like this:

Creating a Class Handler for SICF Service (with code example)

Any SICF service class should implement the interface “IF_HTTP_EXTENSION” with method “handle_request”. There is two ways to achive this, write code in source code-based view or add IF_HTTP_EXTENSION to class interfaces in form-based view.

Creating a Class Handler for SICF Service (with code example)

There is source code available here: https://github.com/fatihpense/zmimesync_service

Copy the contents of the class to your new class. Then activate your class.

Now we have to create a service in SICF and point the service to our class for handling requests.

Go to transaction sicf and execute:

Creating a Class Handler for SICF Service (with code example)

Create new sub-element under /sap/bc

Creating a Class Handler for SICF Service (with code example)

Name your service:

Creating a Class Handler for SICF Service (with code example)

You should enter a description:

Creating a Class Handler for SICF Service (with code example)

Now the linking part! Go to the handlers tab and add your class:

Creating a Class Handler for SICF Service (with code example)

Last step is to activate the service:

Creating a Class Handler for SICF Service (with code example)

No comments:

Post a Comment