cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet to RFC

former_member198060
Participant
0 Kudos

Hello experts,

I want to setup a scenario where I have a certain URL running on the PI system that can be called from the outside via a webbrowser and which will then trigger a RFC on a backend system.

After the RFC has been triggered successfully, the Webbrowser should show a message which indicates if the RFC call was successfull or not.

My first thought was to have a servlet running on the PI system which will then connect via the HTTP adapter to PI and which will then trigger a synchronous RFC call.

Maybe there is a better way to setup this scenario, or maybe you have some good pointers to documents which are describing the connction from the servlet to the PI system from Java coding.

Any comments would be greatly appreciated!

Best Regards,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

This is not a good idea. You should build an application direct on SAP system, you can use web dynpro or bsp.

PI should be used for any user interface scenario.

former_member198060
Participant
0 Kudos

Thanks for your replies!

Stefan, why do you think it is a bad idea running it via PI? I thought to have it on PI will give us the benefit to have the process in our central monitoring tool for integration processes which would be the PI system.

If I would use Webdynpro directly on the backend system that would mean that I would just trigger the RFC on the init step without any user input and then display a result message. Is there any posibility to monitor this process then?

stefan_grube
Active Contributor
0 Kudos

When you create a debitor with FD01, do you want to monitor this in XI also?

PI is made for connectiing application systems, not for user interface.

Or made I understood wrong scenario wrong?

Edited by: Stefan Grube on Feb 3, 2011 11:33 AM

former_member198060
Participant
0 Kudos

Don't get me wrong, I am not very experienced in setting up PI scenarios, so naturally I have a lot of questions.

The scenario is as the following:

An RFC on the backend system will send out an email to lots of different customers. This email should contain a link.

The link identifies a yes/no choice for the customer. If the link is clicked, another RFC on another backend system should be triggered with one single input parameter which would be the get parameter of the link the customer clicked.

After successful processing the customer should get a simple html response on his webbrowser, stating if the processing was ok.

So the customer does not need to input any data, he would just call a URL which should then trigger an RFC.

I think WebDynpro would be more of use if the user would need to input additional data, but in this case he does not have to do this. So I am not sure which would be the best setup for this scenario.

stefan_grube
Active Contributor
0 Kudos

Should this be a real life scenario, or a demo?

In a real life scenario you cannot run a servlet on PI server, as customer cannot access it through firewall.

But of course you could provide a servlet anywhere and do an HTTP call to PI.

Do you want to use PI for sending the email also? I think you have all customer data and email addresses in SAP system, so you rather would send the email without PI. What do you think?

former_member198060
Participant
0 Kudos

It will be a real life scenario.

We actually have a domain for our PI system where we can route requests from outside to the PI system, so accessing a servlet running on PI from outside is possible in our case.

PI system would not have to send out the email, this would be done by the RFC which is generating the link. It takes the customers email address from the customer master and then sends him the mail with the generated link.

Question would just be if the link should point to the PI servlet, or if there a more suitable setup for this kind of scenario.

Edited by: Peter Chezowitch on Feb 4, 2011 9:27 AM

stefan_grube
Active Contributor
0 Kudos

> We actually have a domain for our PI system where we can route requests from outside to the PI system, so accessing a servlet running on PI from outside is possible in our case.

I think when you allow people from outside to operate direct on PI server, you risk your PI going down.

The servlet should run on a seperate instance.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

@Stefan:

I know you are expert and my guru here. Please elaborate more about deploying servlet in PI Netweaver AS going to be a problem.?? AM I missing here something?

Servlet is a server side program that is going to reside on the java WEBAS of netweaver pi. IMHO, running enterprise services such as EJBS, servlets or Webservices are not going to cause any problem. SAP Netweaver AS is designed to handle those enterprise services for sure. If you create soap sender and host it in PI, I'm sure that AS is supporting the webservices context and its connectivity and more. Plus it uses HTTP protocol very similar to Servlet for the transport portion.

Java Proxy is pretty equivalent to server side program like servlet. SAP interprets its runtime as Java Proxy Runtime instead of default JRE.

Peter,

Doing HTTP to RFC (Synchronous) with AAE is a go solution for this.

stefan_grube
Active Contributor
0 Kudos

> I know you are expert and my guru here. Please elaborate more about deploying servlet in PI Netweaver AS going to be a problem.?? AM I missing here something?

I simply do not like the idea that people from outside the firewall access PI server directly.

Answers (1)

Answers (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Hi Peter Chezowitch,

I understand your scenario as, 1) when Http Post is done, 2) then RFC should be triggered 3) Http response from RFC (success or failure) should be received.

I think it is possible.

Let's say there is a Http to RFC synchronous scenario.

How do we test it? We use Http client [Link1|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8 ].

What does Http client do? It will Send HTTP Post (SOAP content) request to Integration Server, and we will get a response for QoS BE.

So I think you can implement HTTP to RFC synchronous scenario.

I guess (I am not sure)every Service Interface (WSDL) will running servlet to receive request on Integration Engine, after all SAP WAS 6.4 (Web Server) is server.

Regards,

Raghu_Vamsee