Introduction

This document refers the Moodle installation in windows system and enabling the SOAP web service for PHP and communicating with SAP. In this document we are going to communicate with SAP from PHP program using Moodle database. We are not using Moodle web services here for sap communication. This document contains process of fetching student details from sap system to Moodle database using background job. This background job will execute recurrently depend on our requirement.

This document also contains additional program steps used in php to get data from SAP. Back ground job will run using software moodle_cron. Moodle_cron is a small software which will do background jobs based on time interval what we mention. You can download moodle_cron.exe form the site.

Requirements

To install Moodle in windows system below are the prerequisites.

  1. Xampp latest version setup files(xampp is bundle of Apache server and MySQL database you can download from Here)

Enabling web services in xampp server

To Communicate with SAP we use SOAP web service. Below is the process to enable SOAP web service in PHP.

  1. To enable SOAP module open php.ini file form the path C:\xampp\php

/wp-content/uploads/2013/08/phpini_267947.jpg

  1. Search for the line “extension=php_soap.dll” in php.ini if not exists add it under Dynamic Extension. If already present uncomment it by removing  ; symbol in front of the line.
  1. Restart the Apache server.

 
  

  1. After restarting the server open phpinfo () page from local host link looks like: http://localhost/xampp/   left side in the menu select the phpinfo ().

/wp-content/uploads/2013/08/soap_267948.png

  1. Check in the page soap module enables or not as shown in the below figure.

Setting up SOAP in SAP and Connecting with PHP

For more information see the YouTube video: http://www.youtube.com/watch?v=GG85rUbhXMg&feature=player_embeddedSAP Setup
In transaction
SICF active the following services
  /wp-content/uploads/2013/08/sicf_267949.jpg

  1. Create your function modules in SE80/ SE37don’t forget these must be remote-enabled
      RFC.jpg
  2. Create webservice from that function module by right clicking on the function module and create -> web service and follow the instructions
  3. Optionally Create Service User.
  4. From within the transaction soamanager:
    Business administration – Web Service Administration.
      /wp-content/uploads/2013/08/soamanger_267953.jpg
  5. Find your web service and choose the Overview Tab. Get the WSDL URL from the link “Open WSDL document for selected binding” http://www.mattbartlett.co.uk/wp-content/uploads/2011/12/overview-wsdl-url.png

/wp-content/uploads/2013/08/webservice_267954.jpg

Optionally you can also setup authentication here.


Run PHP code by calling WSDL link

  php code.jpg

             

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply