<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>enterpriseGeeks &#187; Scripting</title>
	<atom:link href="http://enterprisegeeks.com/blog/tag/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://enterprisegeeks.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 18 May 2012 17:48:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New RFC SDK from SAP</title>
		<link>http://enterprisegeeks.com/blog/2007/03/06/new-rfc-sdk-from-sap/</link>
		<comments>http://enterprisegeeks.com/blog/2007/03/06/new-rfc-sdk-from-sap/#comments</comments>
		<pubDate>Tue, 06 Mar 2007 10:49:21 +0000</pubDate>
		<dc:creator>Craig Cmehil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[RFC]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[soa]]></category>

		<guid isPermaLink="false">http://enterprisegeeks.com/blog/?p=498</guid>
		<description><![CDATA[It&#8217;s not specific PHP but with this release I&#8217;d imagine we will soon be seeing the new PHP connector coming out as well, NetWeaver RFC gives the Next generation Ruby and Perl Connectors, even though it&#8217;s Ruby and Perl it&#8217;s certainly worth taking a look at that&#8217;s for sure! There&#8217;s been a lot of activity [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not specific PHP but with this release I&#8217;d imagine we will soon be seeing the new PHP connector coming out as well, <a title="SAP Network Blogs" href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5827">NetWeaver RFC gives the Next generation Ruby and Perl Connectors</a>, even though it&#8217;s Ruby and Perl it&#8217;s certainly worth taking a look at that&#8217;s for sure!</p>
<p>There&#8217;s been a lot of activity around this part of things lately and we are already seeing the connectors now being developed to handle both SOA as well as the RFC, and what&#8217;s even better:</p>
<blockquote><p>RFC is a stable technology, and has been for many years, so I can understand why this revelation may not seem very exciting. What is exciting is the unprecedented level of cooperation, understanding and good will that has come out in a relatively short time, as I have moved through the process of redeveloping the Ruby and Perl RFC Connectors. The result is (and will be more so), a better fit in terms of how the SDK works with Dynamic Languages, allowing the API that the Dynamic Languages offer for RFC connectivity, to better reflect the nature of those programming languages. For example &#8211; there are better features in the new NW RFC SDK that allow for easy translation of ABAP types to Ruby/Perl types.</p></blockquote>
<p>So as you can see many a new change coming to the world of SAP and Scripting Languages!</p>
]]></content:encoded>
			<wfw:commentRss>http://enterprisegeeks.com/blog/2007/03/06/new-rfc-sdk-from-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My latest rant on developing with SAP</title>
		<link>http://enterprisegeeks.com/blog/2006/12/05/my-latest-rant-on-developing-with-sap/</link>
		<comments>http://enterprisegeeks.com/blog/2006/12/05/my-latest-rant-on-developing-with-sap/#comments</comments>
		<pubDate>Tue, 05 Dec 2006 13:10:44 +0000</pubDate>
		<dc:creator>Craig Cmehil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[UI development]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://enterprisegeeks.com/blog/?p=494</guid>
		<description><![CDATA[It seems that James finally got around to blogging about something he saw. He talked a bit about it during one of the RedMonk Radio episodes but did not even scratch the service leaving me sitting ask &#8220;What the&#8230;&#8221; but finally he blogged it and will hopefully be sending over the &#8220;deets&#8221; from Andrew soon. [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that James finally got around to blogging about something he saw. He talked a bit about it during one of the RedMonk Radio episodes but did not even scratch the service leaving me sitting ask &#8220;What the&#8230;&#8221; but finally he blogged it and will hopefully be sending over the &#8220;deets&#8221; from Andrew soon.</p>
<p>James saw a presentation from T-Mobile and how they developed (rather quickly) an app using Adobe Flex. Now I like Flex (I too can get down with Flex) and I&#8217;m hoping to add a &#8220;Flex&#8221; forum to SDN here in the near future (any Adobe guys want to help moderate?) and since I&#8217;ve been pushing the use of Scripting Languages his post is right up my alley in fact in more ways than one.</p>
<p>I&#8217;m not going to comment on SAP&#8217;s UI strategy, Filip did that and Thomas just reminded everyone of that and raised a few more comments, nor will I comment on what Dan said about SAP&#8217;s UI, not that I don&#8217;t have an opinion it&#8217;s just&#8230;</p>
<p><a href="http://cmehil.com/craig/2006/12/finding-your-way-to-your-own-frontend.html">read more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://enterprisegeeks.com/blog/2006/12/05/my-latest-rant-on-developing-with-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why should I use PHP with my SAP landscape?</title>
		<link>http://enterprisegeeks.com/blog/2006/08/02/why-should-i-use-php-with-my-sap-landscape/</link>
		<comments>http://enterprisegeeks.com/blog/2006/08/02/why-should-i-use-php-with-my-sap-landscape/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 14:41:17 +0000</pubDate>
		<dc:creator>Craig Cmehil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[SDN]]></category>

		<guid isPermaLink="false">http://enterprisegeeks.com/blog/?p=486</guid>
		<description><![CDATA[I get this question a lot, and in fact since SDN is becoming more noticeable in the outside world and the fact that we have a growing and strong community and a decent size library of information, the question seems to be popping up more and more of late. Why should I use PHP in [...]]]></description>
			<content:encoded><![CDATA[<p>I get this question a lot, and in fact since <a href="http://sdn.sap.com" target="_blanK">SDN</a> is becoming more noticeable in the outside world and the fact that we have a <a href="https://www.sdn.sap.com/irj/sdn/developerareas/technology?rid=/webcontent/uuid/af5aa755-0b01-0010-b2a2-84ceba9a5429" target="_blank">growing and strong community</a> and a decent size library of information, the question seems to be popping up more and more of late.</p>
<div><em>Why should I use PHP in my SAP landscape?</em></div>
<p>Well the bottom line is this, and I know that if someone really wants to make me look bad they&#8217;ll post this way out of context, &#8220;You should not use PHP in your SAP Landscape&#8221;, now the rest of it for those of you interested in the whole story. You should not use PHP in your SAP Landscape if you don&#8217;t already have it. No one, myself nor SAP is actually telling you to run out and learn everything you can about PHP. What is being said is simply this, &#8220;if you have PHP already in your landscape you don&#8217;t need to run out and learn something else&#8221;.</p>
<p>A lot of times someone will hear that they are installing SAP so they do a search and find all this information related to  ABAP, Java, .NET so on and so forth so they think that all that work they&#8217;ve already done in PHP for their internal applications will have to be redone, removed or replaced. This is simply not the case, and that is the message I&#8217;ve been trying hard to get across. If you have PHP knowledge in house already and add SAP to the mix then you can still leverage that PHP knowledge and do not need to retrain all your developers in something other than the basics of how a SAP system works.</p>
<p>In fact with the release of NW04s the support for Web services is tremendous and therefore might make life even a little easier for your developers.</p>
<p>OK this was a lot shorter than I was thinking but I don&#8217;t want to confuse the bottom line message with clutter.</p>
]]></content:encoded>
			<wfw:commentRss>http://enterprisegeeks.com/blog/2006/08/02/why-should-i-use-php-with-my-sap-landscape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a headstart with SAP and Scripting Languages</title>
		<link>http://enterprisegeeks.com/blog/2006/04/19/getting-a-headstart-with-sap-and-scripting-languages/</link>
		<comments>http://enterprisegeeks.com/blog/2006/04/19/getting-a-headstart-with-sap-and-scripting-languages/#comments</comments>
		<pubDate>Wed, 19 Apr 2006 12:29:36 +0000</pubDate>
		<dc:creator>Craig Cmehil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[ABAP]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Scripting Languages]]></category>

		<guid isPermaLink="false">http://enterprisegeeks.com/blog/?p=478</guid>
		<description><![CDATA[One of the many problems most developers or business specialists face when wanting to see what a new technology, or I should say a different technology has to offer is all the pieces to the puzzle. Let&#8217;s see you are a developer and you&#8217;ve been using, in this particular case, PHP for a few years [...]]]></description>
			<content:encoded><![CDATA[<p>One of the many problems most developers or business specialists face when wanting to see what a new technology, or I should say a different technology has to offer is all the pieces to the puzzle.  Let&#8217;s see you are a developer and you&#8217;ve been using, in this particular case, PHP for a few years and you deploy applications inside of your company&#8217;s intranet and network.</p>
<p>Recently your friend who works as a system administrator over on the SAP systems   has been complaining that the support desk needs to be able to do something with users in the system. Your first questions is &#8220;what do they need to do, and why is it a problem&#8221;. His response is interesting as all the support desk needs to do is lock or unlock the users. This of course is something you have already built for other systems and it runs as a PHP application on the intranet for the support desk. You of course say &#8220;hey I already did that I&#8217;m sure I could add onto it and make it work for your system as well&#8221;; the administrator is of course happy as this means he does not have to deal with any development nor making several changes to menus and profiles, etc.</p>
<p>You both sit together and decide to write up a quick proposal, you&#8217;ve heard and seen things on the net about working with SAP and PHP so you know it&#8217;s possible. What you don&#8217;t realize though is that there is not an <a href="https://www.sdn.sap.com/irj/sdn?rid=/library/uuid/e50bd86e-0a01-0010-53bd-857585234a6a" target="_blank">&#8220;out of the box&#8221;</a> environment ready to go.</p>
<ul>
<li><a href="http://www.apache.org">Apache</a> 2.0.54</li>
<li><a href="http://www.php.net">PHP</a> 5.1.2</li>
<li><a href="http://saprfc.sourceforge.net/">SAPRFC</a> 1.4.1 for PHP 5.1.2</li>
</ul>
<p>Each of those items needs to be installed and configured and that just to test things. This of course can cause a project, especially one not high on a priority list to be nixed. Well I (that&#8217;s me now, not our friend here the PHP developer or his friend the system administrator) came across this problem from several people so I decided that I would go ahead and see what I could to make life a bit easier.</p>
<p>I put together a little <a href="https://www.sdn.sap.com/irj/sdn?rid=/library/uuid/e50bd86e-0a01-0010-53bd-857585234a6a" target="_blank">development environment</a> called <a href="https://www.sdn.sap.com/irj/sdn?rid=/library/uuid/e50bd86e-0a01-0010-53bd-857585234a6a" target="_blank">&#8220;Scripting in a Box&#8221;</a>, now some might ask about <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMPP</a> and why I didn&#8217;t just use it and all I can say is that I have my reasons and it was mainly because of the planned expansion of this environment.<span id="more-478"></span>Version 0.0.1 the current released version contains the following components:</p>
<ul>
<li><a href="http://www.php.net">PHP</a> 5.1.2</li>
<li><a href="http://saprfc.sourceforge.net/">SAPRFC</a> 1.4.1 for PHP 5.1.2</li>
<li><a href="http://www.apache.org">Apache</a> 2.0.54</li>
<li><a href="http://www.eclipse.org">Eclipse</a> 3.1</li>
<li><a href="http://www.mysql.com">MySQL</a> 4.1.18</li>
<li><a href="http://www.phpmyadmin.net">phpMyAdmin</a> 2.8.0.1</li>
<li><a href="http://www.phpeclipse.de/">PHPEclipse</a> 1.1.7</li>
<li><a href="http://www.activestate.com/Products/ActivePerl/">ActivePerl</a> 5.8.8.817</li>
<li><a href="http://search.cpan.org/dist/SAP-Rfc/">Perl SAP::Rfc</a> 1.39</li>
</ul>
<p>All of that is included and configured, you simply unpack the archive to the root of your C:, D:, E:, etc drive and run the &#8220;configure.vbs&#8221; script which will configure the environment for the drive letter you have unpacked it. What is very nice about this is, if you have this unpacked on a USB stick/drive you can easily take it and connect it to any system you want by simply rerunning the &#8220;configure.vbs&#8221; script again for the new drive letter.</p>
<p>With this environment you will then be able to easily test one of the sample applications included and connect it to your exisiting SAP system.</p>
<p>I mentioned that expansion was planned and v0.0.5 is on it&#8217;s way, I&#8217;m just testing it now to ensure things work correctly (upgrade is available so you can still download the current release and then upgrade), the newest version contains the following:</p>
<p>Development Tools</p>
<ul>
<li><a href="http://www.apache.org">Apache</a> 2.0.54</li>
<li><a href="http://www.mysql.com">MySQL</a> 4.1.18</li>
<li>MySQL Tools
<ul>
<li><a href="http://www.phpmyadmin.net">phpMyAdmin</a> 2.8.0.1</li>
</ul>
</li>
<li><a href="http://www.eclipse.org">Eclipse</a> 3.1.2</li>
<li>Eclipse Plugins
<ul>
<li><a href="http://www.phpeclipse.de/">PHPEclipse</a> 1.1.7</li>
<li><a href="http://e-p-i-c.sourceforge.net/">EPIC</a> 0.3.0</li>
<li><a href="http://pydev.sourceforge.net/">PyDev</a> 1.0.5</li>
</ul>
</li>
</ul>
<p>Development Languages</p>
<ul>
<li>Languages
<ul>
<li><a href="http://www.php.net">PHP</a> 5.1.2</li>
<li>PEAR Packages
<ul>
<li><a href="http://pear.php.net/package/Archive_Tar">Archive_Tar</a> 1.3.1   stable</li>
<li><a href="http://pear.php.net/package/Console_Getopt">Console_Getopt</a> 1.2     stable</li>
<li><a href="http://pear.php.net/package/Console_Table">Console_Table</a> 1.0.4   stable</li>
<li><a href="http://pear.php.net/package/DB">DB</a> 1.7.6   stable</li>
<li><a href="http://pear.php.net/db_dataobject">DB_DataObject</a> 1.8.4   stable</li>
<li><a href="http://pear.php.net/package/Date">Date</a> 1.4.6   stable</li>
<li><a href="http://pear.php.net/package/HTML_Common">HTML_Common</a> 1.2.2   stable</li>
<li><a href="http://pear.php.net/package/HTML_Table">HTML_Table</a> 1.6.1   stable</li>
<li><a href="http://pear.php.net/package/MDB2">MDB2</a> 2.0.0   stable</li>
<li><a href="http://pear.php.net/package/OLE">OLE</a> 0.5     beta</li>
<li><a href="http://pear.php.net/package/PEAR">PEAR</a> 1.4.9   stable</li>
<li><a href="http://pear.php.net/package/Pager">Pager</a> 2.3.6   stable</li>
<li><a href="http://pear.php.net/package/Spreadsheet_Excel_Writer">Spreadsheet_Excel_Writer</a> 0.9.0   beta</li>
<li><a href="http://pear.php.net/package/structures_datagrid/redirected">Structures_DataGrid</a> 0.6.3   beta</li>
<li><a href="http://pear.php.net/package/Validate">Validate</a> 0.6.2   beta</li>
<li><a href="http://pear.php.net/package/XML_Parser">XML_Parser</a> 1.2.7   stable</li>
<li><a href="http://pear.php.net/package/XML_RSS">XML_RSS</a> 0.9.9   beta</li>
<li><a href="http://pear.php.net/package/XML_Serializer">XML_Serializer</a> 0.18.0  beta</li>
<li><a href="http://pear.php.net/package/XML_Util">XML_Util</a> 1.1.1   stable</li>
</ul>
</li>
<li><a href="http://www.activestate.com/Products/ActivePerl/">ActivePerl</a> 5.8.8.817</li>
<li><a href="http://www.python.org/">Python</a> 2.4.3</li>
</ul>
</li>
<li>Connectors
<ul>
<li><a href="http://saprfc.sourceforge.net/">SAPRFC</a> 1.4.1 for PHP 5.1.1</li>
<li><a href="http://search.cpan.org/dist/SAP-Rfc/">Perl SAP::Rfc</a> 1.42</li>
<li><a href="http://www.python.org/pypi/saprfc/0.07">Python SAP::Rfc</a> 0.08</li>
</ul>
</li>
</ul>
<p>What you might call a development environment that packs a punch! All of it is Open Source so please be sure to pay attention to the various licenses.</p>
<p>With this package you can, literally, within minutes have a test application running so our PHP developer can show his friend the administrator but they can also show their managers the potential that is there as well how the SAP team could utilize the existing PHP developer group to create some applications to integrate into their existing landscape.</p>
<p>Give it a try yourself, <a href="https://www.sdn.sap.com/irj/sdn?rid=/library/uuid/e50bd86e-0a01-0010-53bd-857585234a6a" target="_blank">download v0.0.1</a> today.</p>
<p>Discuss &#8220;Scripting in a Box&#8221; <a href="https://forums.sdn.sap.com/thread.jspa?threadID=129272&amp;tstart=0" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://enterprisegeeks.com/blog/2006/04/19/getting-a-headstart-with-sap-and-scripting-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with PHP and SAP</title>
		<link>http://enterprisegeeks.com/blog/2006/03/20/getting-started-with-php-and-sap/</link>
		<comments>http://enterprisegeeks.com/blog/2006/03/20/getting-started-with-php-and-sap/#comments</comments>
		<pubDate>Mon, 20 Mar 2006 16:42:53 +0000</pubDate>
		<dc:creator>Craig Cmehil</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SAPRFC]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://enterprisegeeks.com/blog/?p=476</guid>
		<description><![CDATA[So you might be an experienced ABAPer or even an experienced PHPer, but do you know how to get the basic development environment setup to actually connect your PHP application to your SAP backend system? This is actually one of the most confusing parts, simply because of the various version levels and pieces of the [...]]]></description>
			<content:encoded><![CDATA[<p>So you might be an experienced ABAPer or even an experienced PHPer, but do you know how to get the basic development environment setup to actually connect your PHP application to your SAP backend system?</p>
<p>This is actually one of the most confusing parts, simply because of the various version levels and pieces of the puzzle. I decided to jot down some notes on this setup and what better way to preserve my notes than by sharing them with others? Therefore here&#8217;s the next blog in my series on discovering the flexibility of PHP together with SAP.<span id="more-476"></span>Now with the onset of web services within a SAP 6.20+ system it would be best to choose PHP5 due to the fact that it&#8217;s quite easy to simply start using web services, as opposed to PHP4 where you needed to add in some extensions and modules. So we are going to need the following items:</p>
<ul>
<li><a href="http://httpd.apache.org/" target="_blank">Apache HTTP Server 2.0.54</a></li>
<li><a href="http://www.php.net/" target="_blank">PHP version 5.1.1</a></li>
<li><a href="http://saprfc.sourceforge.net/" target="_blank">SAPRFC 1.4.1 for PHP 5.1.1</a></li>
</ul>
<p>This will give us the best combination of being able to use both web services as well as RFC calls to our SAP system. Once you have those downloaded you can install them to your drive.</p>
<p>I&#8217;ve setup a folder under my C:\ drive called &#8220;Development&#8221; and I&#8217;ve installed first the Apache there, by installing I basically just unpacked it there. Then I setup my PHP to reside in a directory under Apache. The reason for this is simple, I have it all together and it&#8217;s not to difficult to move it later if I need to.</p>
<p>Now just unpack your SAPRFC, you can do this straight to the htdocs directory under Apache.</p>
<p>Now with everything unpacked we just need to do a bit of configuration and we can get started with a simple application.</p>
<p><strong>httpd.conf</strong> file located under apache\conf:</p>
<p>I&#8217;m not going to go through each line of the config just the ones related to connecting PHP to it and getting it to start up, all of these lines are documented within the file so you should be OK there.</p>
<p><em><br />
ServerRoot &#8220;C:/Development/Apache&#8221;<br />
LoadModule php5_module &#8220;C:\Development\Apache\PHP\php5apache2.dll&#8221;<br />
DocumentRoot &#8220;C:/Development/htdocs&#8221;<br />
SetEnv PHPRC &#8220;C:/Development/Apache/PHP&#8221;<br />
PHPIniDir &#8220;C:/Development/Apache/PHP&#8221;<br />
ScriptAlias /cgi-bin/ &#8220;C:/Development/Apache/cgi-bin/&#8221;<br />
ScriptAlias /PHP/ &#8221; C:/Development/Apache/PHP/&#8221;<br />
AddType application/x-httpd-php .php .phtml<br />
Action application/x-httpd-php &#8220;/php/php-cgi.exe&#8221;<br />
</em></p>
<p>So with my Apache configuration all taken care of, we need to take a look at the  PHP config. That&#8217;s the <em>php.ini</em> file located inder Apache/php. This one doesn&#8217;t require too much just a couple of lines need to modified to ensure that PHP can find the SAPRFC module.</p>
<p><em><br />
include_path = &#8220;.;C:\Development\Apache\PHP\includes;C:\Development\Apache\PHP\pear&#8221;<br />
extension_dir = &#8220;C:\Development\Apache\PHP\ext&#8221;<br />
extension=php_mbstring.dll<br />
extension=php_gd2.dll<br />
extension=php_mysql.dll<br />
extension=php_saprfc.dll<br />
extension=php_soap.dll<br />
</em></p>
<p>You should find each of those lines OK, most you may only need to remove the <strong>;</strong> in front of it.</p>
<p>Then I also copied the <strong>php_saprfc.dll</strong> to the extension directory listed above. Just copy the file from Apache/htdocs/saprfc.</p>
<p>With those settings all done you should be able to start your Apache server now from Apache/bin/apache.exe, provided there are no typos your server should now be started and if you type http://localhost into your browser you should get the intial Apache page.</p>
<p>Now to ensure that SAPRFC is loaded properly, you will need to create a simple PHP page under Apache/htdocs. Call the page &#8220;phpinfo.php&#8221; and the contents should be:</p>
<p><code><br />
&lt;?php<br />
// Show all information, defaults to INFO_ALL<br />
phpinfo();</code></p>
<p><code> </code></p>
<p><code>// Show just the module information.<br />
// phpinfo(8) yields identical results.<br />
phpinfo(INFO_MODULES);<br />
?&gt;<br />
</code></p>
<p>If you then load that page in your browser, &#8220;http://localhost/phpinfo.php&#8221; you should get a page displaying all of the information about your server and PHP including the modules loaded. Just scroll down until you find SAPRFC.</p>
<p>If it&#8217;s there then we can get started and try out a simple connection to our SAP backend. If you don&#8217;t have a backend SAP system readily available I would recommend you download the free preview additon of the 6.40 system from the <a href="https://www.sdn.sap.com/irj/sdn/downloads" target="_blank">SAP Developer Network</a>, it takes only a few minutes to install and then you will be able to test to your heart&#8217;s content. The latest as of this blog was the 6.40 Full ABAP edition with Web Dynpro for ABAP.</p>
<p>I&#8217;ve already downloaded and installed as well as the SAP GUI for logging into it. The GUI is actually the other <strong>key element</strong> for connecting using RFC to an SAP system as you need the &#8220;<strong>librfc32.dll</strong>&#8221; which comes with the GUI loaded into your  system directory.</p>
<p>From this point on I will assume that you have your SAP system as well as your GUI installed or accessible and we will now create a simple connection to the system using PHP.</p>
<p><code><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;SAPRFC-Class: Get List of Users in SAP-System&lt;/h1&gt;<br />
&lt;?<br />
// Example for using the saprfc-class-library for accessing sap-functions via rfc<br />
// provided by lars laegner, btexx business technologies, august 2001<br />
//  !!!! PLEASE CHANGE THE LOGINDATA TO YOUR SAP-SYSTEM !!!!</code></p>
<p><code>// $Id: example_userlist.php,v 1.2 2001/08/16 15:54:35 llaegner Exp $</code></p>
<p><code>// saprfc-class-library<br />
require_once("saprfc.php");</p>
<p>// Create saprfc-instance<br />
$sap = new saprfc(array(<br />
"logindata"=&gt;array(<br />
"ASHOST"=&gt;"localhost"		// application server<br />
,"SYSNR"=&gt;"00"				// system number<br />
,"CLIENT"=&gt;"000"			// client<br />
,"USER"=&gt;"bcuser"			// user<br />
,"PASSWD"=&gt;"minisap"		// password<br />
)<br />
,"show_errors"=&gt;false			// let class printout errors<br />
,"debug"=&gt;false)) ; 				// detailed debugging information</p>
<p>// Call-Function<br />
$result=$sap-&gt;callFunction("SO_USER_LIST_READ",<br />
array(	array("IMPORT","USER_GENERIC_NAME","*"),<br />
array("TABLE","USER_DISPLAY_TAB",array())<br />
));</p>
<p>// Call successfull?<br />
if ($sap-&gt;getStatus() == SAPRFC_OK) {<br />
// Yes, print out the Userlist<br />
?&gt;&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;SAP-Name&lt;/td&gt;&lt;td&gt;User-Nummer&lt;/td&gt;&lt;/tr&gt;&lt;?</p>
<p>foreach ($result["USER_DISPLAY_TAB"] as $user) {<br />
echo "&lt;tr&gt;&lt;td&gt;", $user["SAPNAM"],"&lt;/td&gt;&lt;td&gt;",$user["USRNO"],"&lt;/td&gt;&lt;/tr&gt;";<br />
}</p>
<p>?&gt;&lt;/table&gt;&lt;?<br />
} else {<br />
// No, print long Version of last Error<br />
$sap-&gt;printStatus();<br />
// or print your own error-message with the strings received from<br />
// 		$sap-&gt;getStatusText() or $sap-&gt;getStatusTextLong()<br />
}</p>
<p></code></p>
<p> </p>
<p><code> // Logoff/Close saprfc-connection LL/2001-08<br />
$sap-&gt;logoff();<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
<p>The example I chose is one of the standard ones that comes with the SAPRFC module, example_userlist.php. In order to use it as well you need to ensure that the &#8220;<strong>saprfc.php</strong>&#8221; file can be located. This file is the main class file containing all the little bits and pieces you need to connect, thus making life much easier.</p>
<p><em><br />
// saprfc-class-library<br />
require_once(&#8220;saprfc.php&#8221;);<br />
</em></p>
<p>As for editing and working with your PHP files I tend to use <a href="http://www.eclipse.org" target="_blank">Eclipse</a> with <a href="http://sourceforge.net/projects/phpeclipse/" target="_blank">PHP Eclipse</a> mainly because I still do Java and Perl development. However, if you are strictly PHP you might want to check out one of these editors, located at <a href="http://www.snapfiles.com/freeware/webpublish/fwphptools.html" target="_blank">Snapfiles</a> or jump over to <a href="http://www.php.net">PHP.net</a> there you&#8217;ll find some good links for editors as well. There are many choices available so you will need to choose the one that best fits your needs.</p>
<p>Remember in terms of RFC connections to SAP you need to ensure your function module (created internally or by SAP) is &#8220;remote enabled&#8221; otherwise you won&#8217;t be able to connect to it.</p>
<p>I think that covers the basics for now and should be something to get you started&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://enterprisegeeks.com/blog/2006/03/20/getting-started-with-php-and-sap/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

