Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CRM - PHP connection

Former Member
0 Likes
922

Hello Experts,

I have couple of doubts regarding SAP CRM and PHP communication?

1. What is the best way to achieve this (web service or RFC connection using BAPI for continuous communication)?

2. For RFC what is the best combination in terms of versions of PHP, SAPRFC and SAP GUI?

3. Is it possible to communicate directly to 3rd party system using web service without any intermediate engine?

Any inputs will be valuable to me.

Thanks in advance.

Hello Experts,

I have couple of doubts regarding SAP CRM and PHP communication?

1. What is the best way to achieve this (web service or RFC connection using BAPI for continuous communication)?

2. For RFC what is the best combination in terms of versions of PHP, SAPRFC and SAP GUI?

3. Is it possible to communicate directly to 3rd party system using web service without any intermediate engine?

Any inputs will be valuable to me.

Thanks in advance.

4 REPLIES 4
Read only

Katan
Active Participant
0 Likes
796

Hi Krishnakant,

Are you trying to call a service hosted on another system?  If so, then to be honest, the communication is over HTTP(S), so really you only need to worry about these protocols. 

If so you should check out class CL_HTTP_CLIENT.

The SAP help here explains about making a service call.

http://help.sap.com/saphelp_nw70/helpdata/en/1f/93163f9959a808e10000000a114084/frameset.htm

There is also a handy method in this class to create a client by URL. 

http://help.sap.com/saphelp_nw74/helpdata/en/b2/86b4512ea4414fb36f17b0568a86ac/content.htm

In order to call the service from your SAP system, you need to check that the ports are open to that paticular host from the SAP system.  Your basis guys can check this for you. 

I usually run a "telnet" command to the host and port from the calling system as a quick check.   

Hope that helps you out.

Cheers,

Katan

Read only

Former Member
0 Likes
796

Hi Krishnakant

You need to see that the ports are open for the remote location from your SAP environment to make the service call. Then RFC destinations need to be configured and if you are using SSL , then certificates need to be exchanged with the remote location .

Please see the following thread for some probable ideas

Thanks

Rishi

Read only

Former Member
0 Likes
796

Hello Ketan and Rishi,

Thanks for your inputs.

But, my actual requirement is to access(read/write) the data of SAP CRM from PHP application.

Any idea on this and how to proceed?

Thanks in advance.

Read only

Katan
Active Participant
0 Likes
796

Hi,

Ah cool.  You were not totally clear in your message, what you were trying to achieve hence our confusion. 

Ultimately you need to expose a service that you can execute from your PHP application.  I don't think RFC is really a native way to go for a PHP app and I am not 100% sure it is possible. 

If your PHP system is outside of the company network, then I recommend you expose a Web Service using PI, if you have a PI system. 

If it is internal and you have an ESR, then it is also possible to create an Enterprise Service to expose your CRM functionality.

Last but not least, a really neat way is to expose a HTTP Request Handler and attach it to a node in transaction SICF.  I've done this and I know a lot of others have done this to expose RESTFUL APIs in ABAP.  All you need to do is create an ABAP class that implements the interface IF_HTTP_EXTENSION.  There are lots of examples out there and John Moy I think has one of the better ones. 

http://scn.sap.com/community/abap/user-interface-development/blog/2011/04/07/deliver-dynamic-search-...

Hope that gives you some ideas on what you need to do.  Shout out if you are not sure on any of the points.

Cheers,

Katan