Skip to Content

Creating a Service in SICF & Consuming it.

Business Scenario: Generally a service is called in the web browser with an URL. In this case we will create a service in SICF transaction and the service contents is provided by a handler Class.

Step1. Go to Tcode- SE24 to create a class.

Step2. Provide the class name and click on create button.

Step3. Provide the description and click on Save Button.

Step4. Go to the Interface Tab and provide the Interface ‘IF_HTTP_EXTENSION’ and then go to Methods tab.

Step5. Double click on the method to implement it.

Step6. Provide the below code and activate the method.

Step7. Go to Tcode- SICF.

Step8. Execute it.

Step9. Lets create a under ‘default_host/sap/bc’. Select the Node ‘bc’ and click on the Create Host/Service Button.

Step10. Provide the service name ‘ZDEMO_SERV1’ and click on Continue button.

Step11. Under the Login Data tab, provide the user credentials and then click on Hander List Tab.

Step12. Provide the above created CLASS Name and save it and go back.

Step13. The service ‘ZDEMO_SERV1’ is inactive.

Step14. Right Click on the service ‘ZDEMO_SERV1’ and click on Activate Service.

Step15. Click on YES button.

Step16. The service ‘ZDEMO_SERV1’ is active now.

Step17. Right click on service name and click on Test Service button.

Step18. The service is called and the output is appeared in the Browser.

Step19. In the URL part, remove the client part and provide any value separated by ‘/’. and hit enter button.

Step20. The value now passed to the handler class and appears in the browser.

___________________________________________________________________________________________________________________

3 Comments
You must be Logged on to comment or reply to a post.
  • Hi Sir,

    My question is:

    What is the difference in WEb service created by using FM and Class? Which one is secure of the modern way and why?

     

    Thanks

    Sukhwinder Singh

  • I never post.¬† And I don't have time to look.

     

    However posted this, THIS IS HUGE and AMAZING!!!!

     

    There are a number of technical details missing, but this is the best post existing to simply explain on how to create an SAP class to support a CUSTOM SAP URL with SICF.

     

    Now, be extremely cautious with coding a URL with a user id and password!!!!

     

    But with the basic info provided above, a reasonable SAP technical person can extend this info on how to build a more extensive HTTP(S) call.

     

    You rock!!!!