/wp-content/uploads/2016/09/disc1_1029612.png

 

 

 

In this series of blogs I have tried to document the steps I performed from creating a web service in ERP, configure this in PI and then implement this is C4C.

 

This part is the creation of a web service in ERP. I have chosen to create a very simple function module that calls the Master Data Template, and creates one Connection Object and one Premise. If you are familiar with Master Data Templates then you know that there is a lot of possibilities to configure this to create ad perform many different processes. That is why i thought this a good concept, as it would open up the possibility to have one call from C4C potentially performing different things, based on the configuration in ERP.

 

As a rule – I have included many screen shots.

 

The function module I created to test this is quite simple:

 

/wp-content/uploads/2016/09/2016_09_04_19_05_53_1029333.png

 

As you can see it accepts a few parameters for Connection Object and Premise, like city, street house number etc. Then after calling the Master Data Template it returns the ID of the Connection Object and the Premise. I have hard coded the name of the Master Data Template, but it would be logical to also pass this as a parameter if used in real life.

 

If you are interested in the entire source code, I put this in the end of the blog – but it is very simple and have juts the call of the Master Data Template, no error handling or similar.

 

In order to use the function module as the bases for a web service it has to be remote enabled.

 

Creating a web service is very simple:

 

 

/wp-content/uploads/2016/09/pic1_1029334.png

 

Open the function module using transaction SE37, and then under ‘Utilities -> More Utilities’ we have the option to create a web service from a function module (see above). This will start a wizard that will walk the user through the needed steps – I have included all the screen shots, even thoug there is not a lot that needs to be entered.

 

 

/wp-content/uploads/2016/09/pic2_1029362.png

 

 

/wp-content/uploads/2016/09/pic3_1029364.png

 

 

/wp-content/uploads/2016/09/pic4_1029368.png

For Authentication I selected user and password.

 

/wp-content/uploads/2016/09/pic5_1029369.png

Since this is just a test, I created this as a local object only.

 

/wp-content/uploads/2016/09/pic6_1029370.png

 

After this we have a web service created.  In order to get a runtime version, we need to create using transaction: SOAMANAGER.

 

 

When you call SOAMANGER the following view is opened:

 

 
/wp-content/uploads/2016/09/pic9_1029587.png

 

Select ‘Web Service Configuration’.

 

 

/wp-content/uploads/2016/09/pic10_1029372.png

 

In the ‘Object Name’ search for the web service we just created.

 

 

/wp-content/uploads/2016/09/pic11_1029499.png

 

 

Next click on the ‘Create Service’.  When I attempted this the first time, this option was ‘greyed out’. I figured out this was due to missing authorization for my user and not a problem with the service.

 

This will start a wizard, walking you through the steps required to initialize the service.

 

 

/wp-content/uploads/2016/09/pic12_1029588.png

 

Click ‘Next’.

 

 

/wp-content/uploads/2016/09/pic13_1029596.png

For the above step, the only option selected was ‘User ID/Password’.

 

Click ‘Next’.

 

/wp-content/uploads/2016/09/pic14_1029597.png

 

Nothing was entered for the above step.

 

Click ‘Next’.

 

/wp-content/uploads/2016/09/pic15_1029598.png

 

Click ‘Finish’ and the screen below will now show the service and binding.

 

/wp-content/uploads/2016/09/pic16_1029599.png

 

 

On the second line – click on the icon marked with the red arrow:

 

/wp-content/uploads/2016/09/pic16a_1029600.png

 

 

This will open the below view:

 

/wp-content/uploads/2016/09/pic18_1029601.png

 

Herewe have a URL for the WSDL – copy this URL as we will need to upload this WSDL whe we peform the configuration in PI.

 

As a last verification that the service is created, you can go to transaction SICF, here you will be able to find your activated service:

 

/wp-content/uploads/2016/09/pic19_1029608.png

 

 

 

 

This end the ERP part of creating the service.

 

The next step isto perform the PI confuguration – this starts HERE.

 

 

As promised a screenshot of the code from the function module:

 

/wp-content/uploads/2016/09/2016_09_04_19_06_51_1029613.png

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

    1. Steen Hansen Post author

      Hi Subhasish,

      unfortunately I do not curently have access to an HCI system. Maybe you have already seen this, but there is a very nice document on configuration for both PI and HCI – here.

      I think that combining the 2 should make it possible for you to perform this in HCI as well.

      Best Regards,

      Steen

      (0) 

Leave a Reply