<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Where on Earth is Piers?</title>
<link>http://www.piersharding.com/blog/</link>
<description></description>
<copyright>Copyright 2009</copyright>
<lastBuildDate>Thu, 27 Aug 2009 07:43:52 +1300</lastBuildDate>
<generator>http://www.movabletype.org/?v=4.24-en</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 


<item>
<title>New release for sapnwrfc PHP and Python</title>
<description><![CDATA[<p>Been a busy month, working on the NW SAP RFC connectors.  With build help from Menelaos, I now have a working Python build system for Windows on the Python NW RFC Connector as of version 0.07 - this is available <a href="http://www.piersharding.com/download/python/sapnwrfc/">here</a>.</p>

<p>Also, with help from Joachim, I've added a static function sapnwrfc_removefunction(&lt;sysid&gt;, &lt;function name&gt;) to the PHP connector that allows the removing of function definitions from the local cache.  this is most useful when developing RFC applications in PHP, as you can modify your RFC definition without having to restart the web server everytime.  This is available from version 0.09 <a href="http://www.piersharding.com/download/php/sapnwrfc/">here</a>.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/08/new_release_for.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/08/new_release_for.html</guid>
<category>general</category>
<pubDate>Thu, 27 Aug 2009 07:43:52 +1300</pubDate>
</item>

<item>
<title>Auth SAML 2.0 for Mahara</title>
<description><![CDATA[<p>Following on from the SAML 2.0 work that I've done recently for Moodle, I thought it was useful to do the same for the <a href="http://www.mahara.org">Mahara</a> ePortfolio service, while I was in the same space.  Details of the first release can be found <a href="http://wiki.mahara.org/Plugins/Auth/Saml">here</a>, with tested version for both trunk, and 1.1_STABLE.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/08/auth_saml_20_fo.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/08/auth_saml_20_fo.html</guid>
<category>catalyst</category>
<pubDate>Sat, 15 Aug 2009 09:25:49 +1300</pubDate>
</item>

<item>
<title>Moodle and SAML 2.0 Web SSO</title>
<description><![CDATA[<p>Of late I have been doing a lot of SSO integration work for the NZ Ministry of Education, and during this time I came across an excellent project  <a href="http://rnd.feide.no/">FEIDE</a>.  One of the off shoots of this has been the development of a high quality PHP library for SAML 2.0 Web SSO -  <a href="http://rnd.feide.no/simplesamlphp">SimpleSAMLPHP</a>.</p>

<p>For Moodle integration, Erlend Strømsvik of Ny Media AS, developed an authentication plugin, which I've made a number of changes to around configuration options, and  <a href="http://www.moodle.org">Moodle</a> session integration.  This has now been documented and added to Moodle Contrib to give it better visibility to the Moodle community at large.  Documentation is <a href="http://docs.moodle.org/en/AUTHSAML_authentication_plugin">here</a> and the contrib entry is <a href="http://moodle.org/mod/data/view.php?d=13&rid=2574">here</a>.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/08/moodle_and_saml.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/08/moodle_and_saml.html</guid>
<category>moodle</category>
<pubDate>Mon, 03 Aug 2009 08:41:44 +1300</pubDate>
</item>

<item>
<title>Perl sapnwrfc 0.30</title>
<description><![CDATA[<p>I doing some work for a client recently, I got the opportunity to do some major performance work on <a href="http://search.cpan.org/dist/sapnwrfc/">sapnwrfc</a> for Perl.  The net result is that a number of memory leaks, mainly of Perl values not going out of scope properly, have been fixed.</p>

<p>Additionally, I've had some time to put together a proper cookbook style set of examples in the <a href="http://search.cpan.org/dist/sapnwrfc/sapnwrfc-cookbook.pod">sapnwrfc-cookbook</a>.  These examples, while specifically for Perl, are almost identical for sapnwrfc for <a href="http://cheeseshop.python.org/pypi/sapnwrfc/">Python</a>, <a href="http://raa.ruby-lang.org/project/sapnwrfc">Ruby</a>, and <a href="http://www.piersharding.com/download/php/sapnwrfc/">PHP</a> too.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/06/perl_sapnwrfc_0.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/06/perl_sapnwrfc_0.html</guid>
<category>general</category>
<pubDate>Sun, 28 Jun 2009 07:20:41 +1300</pubDate>
</item>

<item>
<title>Dynamic Weather Map</title>
<description><![CDATA[<p>I had once seen on a colleague of mines Mac, a weather widget of New Zealand, that gave him an animated view of the weather situation as seen by the satellite passing over.  I had not been able to find this animation on the <a href="http://www.metservice.co.nz">Met Service </a>  website, and was puzzling over where the data was coming from.  Then I realised it was staring me in the face in the <a href="http://www.metservice.co.nz/public/maps/tasman-sea-nz-infrared-series.html">Infrared series</a>. So - in a bit of retro shell script coding, using GET, perl, convert, and gifsicle, I built my own <a href="http://www.piersharding.com/download/weather_anim.gif"><img border="0" src="http://www.piersharding.com/download/weather_anim.gif"/></a>.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/04/dynamic_weather.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/04/dynamic_weather.html</guid>
<category>general</category>
<pubDate>Sun, 26 Apr 2009 18:29:14 +1300</pubDate>
</item>

<item>
<title>OpenERP and Pentaho</title>
<description><![CDATA[<p>As part of some ongoing investigation work of the potential use of <a href="http://www.openerp.com">OpenERP</a>, I have had a look into connecting OpenERP with <a href="http://www.pentaho.org">Pentaho</a>.  At other times, I have implemented a limited form of Pentaho BI reporting for previous employers, but had mostly confined my activities to using the Metadata reporting object designer, which gives users the ability to create their own simple reports which they can generate as html, pdf, or spreadsheet.  This time, I wanted to get to grips with the far more powerful forms of interactive reporting, which meant <a href="http://mondrian.pentaho.org/">Mondrian</a>.</p>

<p>It's not easy getting it up and running (need to setup datasources, build Modrian schemas, design MDX queries, and then implement the xaction),  but once you are there, there is so much potential.  The ability to tune the queries interactively using the Pivot reporting engine, and the drill down features are excellent.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/03/openerp_and_pen.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/03/openerp_and_pen.html</guid>
<category>general</category>
<pubDate>Mon, 23 Mar 2009 13:36:15 +1300</pubDate>
</item>

<item>
<title>OpenERP</title>
<description><![CDATA[<p>As part of my job at <a href="http://www.Catalyst.net.nz">Catalyst</a> I've been part of a process of evaluating Open Source ERP systems.  The first one up is <a href="http://www.OpenERP.com">OpenERP</a>  and I have to say that I'm pleasantly surprised.  Having come from a long term SAP background, I'm appreciating the thought that has gone into usability, and intuitiveness of the user experience.  Also - big bonus - it's NOT written in Java, but Python!</p>

<p>Having just finished the Order to Cash cycle, and then followed it through on the Financial reporting. and cost account side, I'm finding that there is nothing missing that I would have expected to find from SAP - I'm excited, as I feel that OpenSource may have finally reached prime time in the ERP world.</p>

<p>Next up will be <a href="http://www.compiere.com">Compiere</a>, which will have to go a long way to win me over I think.</p>

<p>Note: on reflection, I should add that this is in the context of SMB.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/03/openerp.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/03/openerp.html</guid>
<category>general</category>
<pubDate>Mon, 02 Mar 2009 20:06:55 +1300</pubDate>
</item>

<item>
<title>Kiwi Foo - BaaCamp 09</title>
<description><![CDATA[<p>It was a real privilege to have been invited to <a href="http://baacamp.org/">Kiwi Foo 09</a>, and it certainly didn't disappoint.  The uniqueness largely stems from the courageous forward thinking attitude of the organisers to give the attendees almost no guidance at all as to what the format is, and the content to cover.  The net result is informed conversation across the spectrum of problems and opportunities facing New Zealand, and an environment with huge cross-pollination potential for ideas, and creativity.</p>

<p>So - what did I learn?</p>

<p>I spoke to the <a href="http://www.wrightspeed.com/">man</a> who is developing the fastest car in the world<br />
I learnt about solar powering my house<br />
Where the Geek Community thinks we are headed in the current climate <br />
Network Theory<br />
Perl 5.10, and Perl 6<br />
<a href="http://creativefreedom.org.nz/">Section 92A</a><br />
Software in Education<br />
OpenSource advocacy, and how to go main stream<br />
telecommuting<br />
Programming the G1<br />
Irish folk music<br />
Werewolf<br />
and many more things that escape me right now.</p>

<p>Many thanks to the organisers (Nat, Jenine, and Russell), and also to all the other people who attended and helped out, to make it a truly excellent event.<br />
</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/02/kiwi_foo_baacam.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/02/kiwi_foo_baacam.html</guid>
<category>general</category>
<pubDate>Mon, 16 Feb 2009 18:44:28 +1300</pubDate>
</item>

<item>
<title>sapnwrfc for PHP - version 0.06</title>
<description><![CDATA[<p>This week I've burnt some midnight oil, to get some additional features into sapnwrfc for PHP.  These are most notably properly named exceptions thrown for connection, and RFC call issues, and activate/deactivate parameter control for RFC calls (very handy if you want to ignore bulky parameter values).</p>

<p>Download from: http://www.piersharding.com/download/php/sapnwrfc/</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/02/sapnwrfc_for_ph_1.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/02/sapnwrfc_for_ph_1.html</guid>
<category>saprfc</category>
<pubDate>Tue, 10 Feb 2009 20:06:48 +1300</pubDate>
</item>

<item>
<title>Moodle Integration with SAP</title>
<description><![CDATA[<p>Over the last few months I have been working on developing the new SAP NetWeaver RFC SDK compatible PHP connector.  The main driver for this is to develop Moodle <-> SAP integration.  Finally, I have reached the first step towards that goal with developing mod/auth/sap.</p>

<p>This enables SAP authenticated logins, and the use of SAPs SSO via Logon Tickets.</p>

<p>The module is available at: <a href='http://www.piersharding.com/download/php/' target='blank'>http://www.piersharding.com/download/php/</a>.</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/02/moodle_integrat.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/02/moodle_integrat.html</guid>
<category>moodle</category>
<pubDate>Mon, 09 Feb 2009 19:16:22 +1300</pubDate>
</item>

<item>
<title>sapnwrfc for PHP</title>
<description><![CDATA[<p>In my recent work I've been working in the Education Software area, more specifically LMSs (Learning Managment Systems).&nbsp; As my current employer is a completely Open Source oriented company (yay!), we work with <a href="http://www.moodle.org/" target="_blank">Moodle</a>.</p><p>Moodle is PHP based, so when it came to the question of integrating this with SAP, we had a stumbling block.&nbsp; The existing connector is a very good one, but it doesn't give full UNICODE support, and it doens't take advantage of the NetWeaver RFC SDK such as complex structures, and strings.</p><p>To this end I've written sapnwrfc for PHP.</p><p>You can download sapnwrfc from <a href="http://www.piersharding.com/download/php/sapnwrfc/" target="_blank">here</a>.</p><p>Follow the INSTALL instructions, and here is a bit of a taster:</p><pre>&nbsp;&lt;?php<br />dl(&quot;sapnwrfc.so&quot;);<br />echo &quot;sapnwrfc version: &quot;.sapnwrfc_version().&quot;\n&quot;;<br />echo &quot;nw rfc sdk version: &quot;.sapnwrfc_rfcversion().&quot;\n&quot;;<br />$config = array('ashost' =&gt; 'ubuntu.local.net',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'sysnr' =&gt; &quot;01&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'client' =&gt; &quot;001&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'user' =&gt; 'developer',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'passwd' =&gt; 'developer',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'lang' =&gt; 'EN',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'trace' =&gt; '1' );<br /><br />// we must have a valid connection<br />try {<br />&nbsp;&nbsp;&nbsp; $conn = new sapnwrfc($config);<br />&nbsp;&nbsp;&nbsp; $fds = $conn-&gt;function_lookup(&quot;STFC_DEEP_STRUCTURE&quot;);<br />&nbsp;&nbsp;&nbsp; $fdt = $conn-&gt;function_lookup(&quot;STFC_DEEP_TABLE&quot;);<br />&nbsp;&nbsp;&nbsp; $parms = array('IMPORTSTRUCT' =&gt; array('I' =&gt; 123, 'C' =&gt; 'AbCdEf', 'STR' =&gt; 'The quick brown fox ...'));<br />&nbsp;&nbsp;&nbsp; $results = $fds-&gt;invoke($parms);<br />&nbsp;&nbsp;&nbsp; var_dump($results);<br />&nbsp;&nbsp;&nbsp; $parms = array('IMPORT_TAB' =&gt; array(array('I' =&gt; 123, 'C' =&gt; 'AbCdEf', 'STR' =&gt; 'The quick brown fox ...')));<br />&nbsp;&nbsp;&nbsp; $results = $fdt-&gt;invoke($parms);<br />&nbsp;&nbsp;&nbsp; var_dump($results);<br />&nbsp;&nbsp;&nbsp; $conn-&gt;close();<br />}<br />catch (Exception $e) {<br />&nbsp;&nbsp;&nbsp; echo &quot;Exception message: &quot;.$e-&gt;getMessage();<br />&nbsp;&nbsp;&nbsp; throw new Exception('Assertion failed.');<br />}<br /></pre>
<p>&nbsp;sapnwrfc is a work in progress, so testing and feedback is welcome. </p><p>A discussion has been started in the forums <a href="https://forums.sdn.sap.com/thread.jspa?threadID=1208671&amp;tstart=0" target="_blank">here</a>. </p>]]></description>
<link>http://www.piersharding.com/blog/archives/2009/01/sapnwrfc_for_ph.html</link>
<guid>http://www.piersharding.com/blog/archives/2009/01/sapnwrfc_for_ph.html</guid>
<category>saprfc</category>
<pubDate>Tue, 27 Jan 2009 20:49:48 +1300</pubDate>
</item>

<item>
<title>sapnwrfc for Python</title>
<description><![CDATA[The first version of sapnwrfc for Python is now available.  Like the sapnwrfc for Ruby, and Perl, this is a complete rewrite to take advantage of the new SAP NW RFCSDK, with unicode support, and support for deep structures.  This version provides Client side RFC support only.  The download is available <a href='http://cheeseshop.python.org/pypi/sapnwrfc/' target='_blank'>here</a>]]></description>
<link>http://www.piersharding.com/blog/archives/2007/05/sapnwrfc_for_py.html</link>
<guid>http://www.piersharding.com/blog/archives/2007/05/sapnwrfc_for_py.html</guid>
<category>saprfc</category>
<pubDate>Fri, 11 May 2007 06:27:59 +1300</pubDate>
</item>

<item>
<title>NW RFC SDK is now officially available</title>
<description><![CDATA[<h2>The new SAP NW RFCSDK</h2>
<p>
The new SAP NetWeaver RFCSDK is now available for official download - this opens the way for supported next generation Open Source Connectors such as <a href="http://search.cpan.org/search?dist=sapnwrfc" target="_blank">sapnwrfc</a> for <a href="http://www.perl.org" target="_blank">Perl</a>, and <a href="http://raa.ruby-lang.org/project/sapnwrfc" target="_blank">sapnwrfc</a> for <a href="http://www.ruby-lang.org" target="_blank">Ruby</a>.
</p>
<h2>Where to get it?</h2>
<p>
You need to go to the SAP service Portal <a href="http://service.sap.com/swdc">for Software downloads</a>, and follow the path of:
Download -&gt; Support Packages and Patches                                          
-&gt; Entry by Application Group -&gt; Additional Components  -&gt; SAP NW RFC                                            
SDK -&gt; SAP NW RFC SDK 7.10 -&gt; SAP NW RFC SDK 7.10                  .
</p>
<p>
There is an accompanying   OSS note:    <a href="https://service.sap.com/sap/support/notes/1025361" target="_blank">                                      
 1025361</a>.
</p>
<p>
<h2>Impact on Connectors</h2>
As mentioned in a 
<a href="https://weblogs.sdn.sap.com/cs/weblog/view/wlg/5827" target="_blank">previous blog</a> (but so much better in Ulrichs' <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6528" target="_blank">blog</a>), the new NW RFCSDK not only updates the implementation of the library that all 3rd party products use, but it also provides a better interface to develop to, and exposes several key features such as Unicode, and complex structures.</p>
<p>
Clearly - this is SAPs way forward in the RFC area of closely bound system integration, so all existing connectors  (and 3rd party products) will eventually have to migrate to it.
</p>
<p>
This is also true of code that is based on the existing connectors for Perl and Ruby.  For Perl - there will be a migration from SAP::Rfc -&gt; sapnwrfc, and likewise for Ruby moving from saprfc -&gt; sapnwrfc  (The client side implementation for the new sapnwrfc connector for Python is nearly finished, with the same implications).
</p>
<p>
My thanks and congratulations go out to the SAP NW RFC Team (NW AS ABAP Connectivity) - through their efforts, and willingness to engage the community, they have made it possible for us frustrated hackers to have a little more fun :-)
</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2007/05/nw_rfc_sdk_is_n.html</link>
<guid>http://www.piersharding.com/blog/archives/2007/05/nw_rfc_sdk_is_n.html</guid>
<category>sap</category>
<pubDate>Thu, 10 May 2007 08:49:04 +1300</pubDate>
</item>

<item>
<title>sap4rails updated to support new sapnwrfc </title>
<description><![CDATA[<a href='http://raa.ruby-lang.org/project/sap4rails' target='_blank'>sap4rails</a> has been upgraded to support the new RFC Connector for Ruby - <a href='http://raa.ruby-lang.org/project/sapnwrfc' target='_blank'>sapnwrfc</a>.]]></description>
<link>http://www.piersharding.com/blog/archives/2007/03/sap4rails_upgra.html</link>
<guid>http://www.piersharding.com/blog/archives/2007/03/sap4rails_upgra.html</guid>
<category>saprfc</category>
<pubDate>Thu, 01 Mar 2007 09:39:45 +1300</pubDate>
</item>

<item>
<title>New RFC Connector - sapnwrfc</title>
<description><![CDATA[<p>
SAP has undertaken a project to re-engineer the RFC SDK (creating the SAP NetWeaver RFC SDK), which is good news for the  Connectors (<a href="https://www.sdn.sap.com/irj/sdn/thread?forumID=50&threadID=286689">ref.</a>).</p>
<p>
This means that eventually - all the RFC connectors, and 3rd party products will need to be updated to use the new under-carriage.</p>
<p>
<h3>So whats the big deal?</h3>
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 - there are better features in the new NW RFC SDK that allow for easy translation of ABAP types to Ruby/Perl types.
</p>
<p>
<h3>New Features</h3>
If we set aside the rationalisation, and simplification of the NW SDK (which is a bonus in itself), there are new features of the NW SDK that can be drawn upon -
<ul>
<li>unicode in the core, with utf-8 to utf-16 conversion tools</li>
<li>intelligent ABAP <=> X helper functions to ease type translations</li>
<li>deep structures</li>
<li>interface discovery</li>
<li>interface, and structure caching</li>
</ul>
</p>
<p>
This has lead to a complete overhaul of the Ruby, and Perl Connectors, with the aim to take advantage of the new NW SDK features, and to produce connectors that create a more intuitive bond between the underlying RFC API, and the natural features of each Dynamic Language.
</p>
<p>
<h3>Call for testers</h3>
As the new Ruby and Perl RFC Connectors are a complete rewrite and Alpha, I am calling for testers/early adopters from the Community.
</p>
<p>
<h3>Obtaining the Connectors, and Netweaver RFC SDK</h3>
Download the new sapnwrfc connector for Ruby, and get the new RFC SDK, port your applications to it, and let me know how you get on.  I'm interested in usability feedback, problems, and feature requests.
</p>
<p>
For Ruby - download from the <a href="http://raa.ruby-lang.org/project/sapnwrfc/" target="_blank"> RAA</a>.  Follow the instructions in the included README file.  Documentation is available <a href="http://www.piersharding.com/download/ruby/sapnwrfc/doc/" target="_blank">Here</a>.  A GEM install package for Win32 has been built available <a href="http://www.piersharding.com/download/ruby/sapnwrfc/sapnwrfc-0.06-mswin32.gem">here</a>.
</p>
<p>
For Perl - download from <a href="http://search.cpan.org/search?query=sapnwrfc" target="_blank">CPAN</a>.  Again - follow the instructions in the included README file.  Documentation is available <a href="http://search.cpan.org/author/PIERS/sapnwrfc-0.06/sapnwrfc.pm" target="_blank">Here</a>.  A PPM install package for Win32 has been built available <a href="http://www.piersharding.com/download/win32/sapnwrfc-0.06.zip">here</a>.
</p>
<p>
If you are interested in trialling/testing the new connectors, then along with the installing the new connectors (above) you will need to obtain the new Netweaver RFC SDK.  in order to do this, please register your interest with me, ensuring that I know how to contact you, and what your platform requirements are, and with the help of the NW RFC team at SAP I will get the relevant details to you.
</p>
<p>
<h3>Ruby Examples</h3>
There are plenty of examples in the tests/ directory of the sapnwrfc download, but here is a basic walk through of the new API:
<pre>
 # specify a YAML base config file or pass connection
 #   parameters directly to rfc_connect()
 SAPNW::Base.config_location = './config_file.yml'
 SAPNW::Base.load_config
 conn = SAPNW::Base.rfc_connect

 # get the system and connection details
 attrib = conn.connection_attributes
 $stderr.print "Connection Attributes: #{attrib.inspect}\n"

 # lookup the dictionary definition of an Function Module
 fds = conn.discover("STFC_DEEP_STRUCTURE")
 $stderr.print "Parameters: #{fds.parameters.keys.inspect}\n"

 # create an instance of a Function call
 fs = fds.new_function_call

 # populate the parameters - structures and table rows now take hashes of field name/value pairs
 fs.IMPORTSTRUCT = { 'I' => 123,
                     'C' => 'AbCdEf',
                     'STR' =>  'The quick brown fox ...',
                     'XSTR' => ["deadbeef"].pack("H*") }

 # execute the RFC call
 fs.invoke
 $stderr.print "RESPTEXT: #{fs.RESPTEXT.inspect}\n"
 $stderr.print "ECHOSTRUCT: #{fs.ECHOSTRUCT.inspect}\n"
</pre>
</p>
<p>
Config file (refer to the sap.yml file in the download):
<pre>
ashost: ubuntu.local.net
sysnr: "01"
client: "001"
user: developer
passwd: developer
lang: EN
trace: 2
</pre>
</p>
<p>
Test it out - and give your feedback.
</p>
<p>
<h3>Perl Examples</h3>
As with Ruby, there are plenty of examples in the software download in the t/* directory.  Again - here is a taster showing the new API:
<pre>
 use sapnwrfc;
 use Data::Dumper;

 # specify a YAML base config file or pass connection
 #   parameters directly to rfc_connect()
 SAPNW::Rfc->load_config;
 my $conn = SAPNW::Rfc->rfc_connect;

 # lookup the Function Module
 my $fds = $conn->function_lookup("STFC_DEEP_STRUCTURE");

 # initialise a call instance
 my $fs = $fds->create_function_call;

 # set the parameters
 $fs->IMPORTSTRUCT({ 'I' => 123,
                     'C' => 'AbCdEf',
                     'STR' =>  'The quick brown fox ...',
                     'XSTR' => pack("H*", "deadbeef")});

 # invoke the Function Module and then play with the results
 $fs->invoke;
 $stderr.print "RESPTEXT: #{fs.RESPTEXT.inspect}\n"
 $stderr.print "ECHOSTRUCT: #{fs.ECHOSTRUCT.inspect}\n"
 print STDERR "RESPTEXT: ".Dumper($fs->RESPTEXT)."\n";
    ok($c eq 'AbCdEf');
 print STDERR "ECHOSTRUCT: ".Dumper($fs->ECHOSTRUCT)."\n";

 # cleanup
 $conn->disconnect;
</pre>
</p>
<p>
Config file format is the same as for Ruby - refer to the sap.yml file in the download:
<pre>
ashost: ubuntu.local.net
sysnr: "01"
client: "001"
user: developer
passwd: developer
lang: EN
trace: 2
</pre>
</p>
<p>
Test it out - and give your feedback.  The best place would be to carry on the discussion through the <a href="https://forums.sdn.sap.com/category.jspa?categoryID=39">Forums</a>.
</p>
<p>
Special thanks go to:
<ul>
<li> Ulrich Schmidt for fielding all my questions, and the whole of the NW RFC Team (NW AS ABAP Connectivity), for their support, and quick response.</li>
<li>Olivier Boudry - building and testing</li>
<li>and lastly (but by no means least) Craig Cmehil for tirelessly getting people together and making it all possible.</li>
</ul>
</p>

<p>
<a href=""><h3>Notes/Updates:</h3></a>
See the download instructions for the SAP NW RFCSDK  <a href='http://www.piersharding.com/blog/archives/2007/05/nw_rfc_sdk_is_n.html'> here</a>.
</p>]]></description>
<link>http://www.piersharding.com/blog/archives/2007/02/new_rfc_connect.html</link>
<guid>http://www.piersharding.com/blog/archives/2007/02/new_rfc_connect.html</guid>
<category>saprfc</category>
<pubDate>Wed, 28 Feb 2007 12:28:55 +1300</pubDate>
</item>


</channel>
</rss>