Introduction:
By leveraging RFC, organizations can enable robust data exchange and process integration across different SAP and non-SAP systems.
However, creating RFCs is only half the battle. To harness their full potential, these RFCs often need to be exposed as web services, providing a standardized way for external applications to interact with SAP functionalities. This is where the power of web services comes into play, bridging diverse systems and enabling seamless, real-time data transactions.
But how can you ensure that these web services are functioning correctly? This is where testing tools like SOAPUI become invaluable. SOAPUI allows developers and testers to validate the performance, security, and reliability of web services before they go live, ensuring smooth and error-free operations.
In this blog post, we will dive deep into the process of creating RFCs in SAP, transforming them into web services, and rigorously testing them using SOAPUI. Whether you are a seasoned SAP professional or a newcomer looking to enhance your integration skills, this guide will provide you with the insights and tools needed to master SAP web services and ensure their optimal performance.
STEPS
- Create a function group in SE80.
2.Provide the package name & click on SAVE.
3.Activate the FUNCTION GROUP.
4.Execute the T-code SE37 & Create a FUNCTION MODULE.
- Give the Function group name, short description & click on SAVE.
- Click on the Radio button REMOTE ENABLED MODULE
- Take some importing parameters in order to receive the values as per the requirement.
- Take one exporting parameter to return the message if the value is not found.
- Take internal tables in order to store multiple data. Here, Gt_mara is referring to mara structure having some fields like MATNR, ERSDA & Gt_marc is referring to marc structure having some fields like MATNR, PLIFZ.
- You can write your own logic to test the RFC FM, whether it returns some value or not.
- Now, check the result by providing input values from MARA & MARC
12.now, create its webservice from function module.
13. Provide the service definition & description.
14. Below we can see the service definition properties. And activate it.
- Execute the T-code SOAMANAGER in S4HANA.
Click on to the Webpages.
16.Provide your Hana-user id & Password.
17.Click on web service configuration.
18.Choose the object type as Object Name and pass the correct service definition name. If the service definition exists, then we can be able to see ‘entry found’ otherwise not found.
19.Now, Click on Internal Name --->Click on Create service.
20.Fill up the details like service & binding name, Provide security, SOAP protocol & Operation settings.
21.Fill up the provide security
22.No need to fill out SOAP protocol details so, click on next. In operation settings click on finish.
23.Then Choose the service & activated--> below interface will open--> click on save .
24.Select the service & click on republish
- Click on save
26. Don’t provide any details, click on OK.
27. Click on the below Execute button under the WSDL generation.
28. Press CTRL+S and save the file in WSDL format.
29. Now, we are ready to test the service in SOAPUI. So, let's download the SOAPUI.
Notes:
how to Download the SOAPUI software & implement it.
- Go to SOAPUI.ORG website and download SOAPUI open source.
- Below is the interface of how the SoapUI looks like. can start doing the API testcases.
- Click on soap-->new soap project--> give a project name -->choose the WSDL which we have downloaded -->ok
- Click upon request1 then we can see the details in XML file.
- To access the data, provide the authorization. Click on add new authorization.
- Finally, we can see the result as shown below. For success the status code will be 200.