cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming a webservice from an email and update values in ECC

harish_babu5
Participant
0 Kudos

Hi experts,

I have a requirement. The end user gets a url in an email. There will be two urls and he will click on one. One for accepting and another for rejecting. He will decide on which url he needs to click, and he clicks accordingly. When he clicks the url, webservice would be called, the values will be updated in webservice and the same values will be sent to ECC. This is not an existing webservice, we have to create the webservice in PI

E mail would have two values say purchase order or line number and a value accept. The second url will have first two values same and instead of third a value reject.

The values keep on changing. End user can click on the url from anywhere in the world, which means user could be outside the PI landscape.

Is it possible with PI? Can someone please suggest me a design?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Need some more details..

It depends on Who/How the email with URL will be sent to users..

You can create a web service(soap tp proxy) scenario but whoever/whichever is sending that email to users should consume the service provided by PI.

If that system which is sending emails is internal to your landscape then you don't even need to make a secure call/open port of PI to external world.

It's the responsibility of the system which is sending those email with the URL.

harish_babu5
Participant
0 Kudos

Hi Hareesh,

The ECC system is sending email to the users. It has the email of the users stored in a database and the email will be sent by the ECC system to all the users and those email contain the urls.

How can we make the ECC system consume the webservice since the end users click the url, which calls the webservice?

Again the end users can be outside PI landscape otoo

Regards

former_member184720
Active Contributor
0 Kudos

You can definitely consume a PI web service in ECC.

You can find many blogs on the same. Simply search for consuming web service in ABAP.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/802edea6-274e-2e10-fd95-e5e1a8bc0...

However you mentioned that user should enter/save some details when he clicks the URL in the email?

So you still need to build a front end(may be webdynpro abap application) which can be accessed by a URL. (from that application you'll invoke PI web service)

May be you can post it in ABAP development forum on how to develop service to retrieve details from an email and calling a web service.

harish_babu5
Participant
0 Kudos

Hi Hareesh,

No, the user doesn't have to enter any details. he just clicks the URL and it has to be updated at the webservice and the webservice should send those details to ECC

End user is not entering any details, merely clicking a URL

Regards

Harish

iaki_vila
Active Contributor
0 Kudos

Hi Harish,

Haresh suggestion is still valid. You can do a Proxy to Proxy scenario asynchronous with SOAP lookup, or in a better option Proxy - SOAP - Proxy with Async/Sync bridge (William Li's blog  )

Hope this helps.

Regards.

harish_babu5
Participant
0 Kudos

Hi Inaki,

can you elaborate on the proxy to proxy suggestion?

I mean how will the end user clicking on a url link in an email be accommodated here? So will it trigger the proxy and websevice developed in an ABAP system, here ECC?

Regards

iaki_vila
Active Contributor
0 Kudos

Hi Harish,

I supposed the email was available in the ECC user account, if the email is outside the ECC the sender scenario should to be HTTP, but the the remainder scenario is still valid.

Options:

1. HTTP - PROXY with SOAP Lookup:

SOAP lookup: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0b6bb9d-7689-2c10-52a7-c3bd341d4...

Server Proxy or proxy in the receiver side this link could be helpful: Step-by-step FTP to ABAP Proxy - Process Integration - SCN Wiki

2. HTTP - SOAP - PROXY. Async/Sync bridge.

My last post with the link still is helpful

From my point of and taking care you concern about the security in your last thread i think that you can give to your client some alternatives to make a faster and more secure scenario. Has the client an ECC account?, why don't work directly with ECC?, why to use email like method to communicate to the user and to use for example an ALV program?, Why don't use the email only like the way that the user knows the alert and go to the ECC or a third-party application to check the data?

Hope this helps.

Regards.

harish_babu5
Participant
0 Kudos

Hi Inaki,

The mail is outside the ECC. It's in the Outlok and the end user can trigger it even from his phone. So when he clicks in the url, the websevice is called and the values are already there in the url. The values to be added to the webservice and also the same set of values should be sent to the ECC. So what's the point of SOAP look up.

The webserice has to be created in PI

I have used SOAP Lookup but in this case, we have no requirement to get the values from anywhere as the values are already there in the url on which the end user clicks.

I doubt this works in my case

Regards

iaki_vila
Active Contributor
0 Kudos

Hi Harish,

Your scenario, with the URL so dynamics and working with mobile devices, seems to fit with Rest services more than use a PI adapter (SOAP or HTTP). If you have a PI with dual stack you can think to use SAP Netweaver Gateway (a free addon) to establish a server Rest. Inside the code you can call your PI scenarios or the ECC directly. What do you think?

Regards.

harish_babu5
Participant
0 Kudos

Hi Inaki,

We cannot create REST weservice from PI.

I am checking all the options

Regards

Harish

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Based on the discussions on this topic,  I want to convey one thing.  Hosting web service within PI and communicating to ECC is second portion of design.  The key here is how do you like to trigger the call from front end to PI. What is your front end?  You might want to know more about it.  You can even design SAP FIORI or simple UI5/html5 based jquery application on the front end using netweaver gateway and call odata or server side java script to call the PI webservice endpoint. If you setup front end web based application then even via email you can just trigger the URL page (which is already hosted in nw gateway) will trigger call to PI . the remaning call scenario which is pI to ecc is as usual. Hope this helps.  You need to build front end which will make call to PI. Otherwise push a call to http adapter with query string from the mail as Inaki explained.  In this case http to proxy is enough.

harish_babu5
Participant
0 Kudos

Baskar,

The main issue is that the end user will not take the pain to update the values into an application. So if that user is provided with a url that has all the parameter values that he needs to enter then he will click on it, the data will be updated in the webservice and also then it should be sent to the ECC.

Is using HTTP adapter to Proxy,  a compromise on the security of the PI server as we are allowing the end user to reach the PI landscape ?

Regards

Harish

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Please see this thread for developing java proxy.

http://scn.sap.com/thread/575913

If you are open for little effort on java side development,  you might also host small single page web application using java proxy.  So you can get help from portal team to host that page secured way... This way if user go to portal page they will update the data and it will go to ecc via pi.. Basically you can do java proxy to abap proxy via pi.   You might want to see the link provided by the thread for exploring on this topic.

Yes giving query input string with key values is not secured way via http sender.