This weblog provides a simple implementation that uses SAPRFC , PHPRFC extension and PHP script to view the details of Mobile Devices(Details of Users , Installed Application Details and the Device Profile) attached to the particular MI Server. This blog would be helpful to those non-SAP users(PHP programmers) who are willing to use the simple functionalities provided by SAP MI. The sample scripts implement RFC calls to the function modules MEMGMT_DEVICE_GETLIST(for getting the list of all devices attached to the MI Server) and MEMGMT_DEVICE_GETDETAIL(for getting the details of a particular mobile device).
1. System must be configured properly to support the PHPRFC(This provides an RFC interface to SAP function modules in PHP).
2. The MI server user , used to login , must have the appropriate authorizations to execute the MI related RFC enabled function modules.
I used the Apache Server 2.0.58 , PHP 5.1.4 and the SAPRFC 1.4.1-5.1.1 as subject installations.
This initial.php file is to provide a generic user interface to login into the MI Server.
The login page will look like this when you access the page through browser.In this screen you have to enter the MI Server login parameters.
This login.php file contains the PHP scripts to display the list of mobile devices attached to the MI Server.I have used a little bit of style sheet and java script codes to format the output while viewing through the browser.
|Total Number of Mobile Devices|
|Device ID||User Name||Device Name||Changed Date||Changed Time|
|" , $user["DEPLID"] , "||",$user["USERNAME"],"||",$user["DEVICE_NAME"],"||", $formDate ,"||",$formTime ,"|
You can see the list of Mobile Devices in this screen.From this you will have to click on the particular device id to view its details.
The popDeviceDetails.php file contains the script to display the details of the selected mobile device.
|Device ID||User Name|
|User Name||Application Name||Version|
|Attribute Name||Attribute Value|
In this screen , you can see the , Users , Installed Applications and the device profile parameters such as OS used, Main Memory details, size of the data folder , JVM details , Client Users .etc .
Hope you have enjoyed the Mix of PHP and SAP MI.
You will have to copy these initial.php , login.php and the popDeviceDetails.php files into the htdocs(by default all the php files and html files are stored in this directory) directory of the Apache HTTP Server installation. You can create your own folders to store these php files.But you have to properly change the value of DocumentRoot "(changed document path)" in the httpd.conf file located in the conf directory of Apache home folder.