Skip to Content
Hi everyone, first post here, it’s a quick one (albeit a bit late), just to upload the little PHP demo I did for the SDN day in Las Vegas. – some screenshots, and – the code Thanks to everyone who participated in the demos! For me, the participation at the SDN day and TechEd was an amazing experience!  For those of you that were not there, just a few words – what you can see if you download the code is an example of how to connect to your SAP system using the saprfc extension for PHP. There is one reusable login_form.php script that is included by all other files and does the authentication. The rest is one simple page that calls a BAPI to list the details of the currently logged-in user. And finally, a page that lists 20 flight customers and makes the phones and email addresses editable via a double-click. I did a bit of AJAX for the flight customers page to make it slightly more appealing, hope you like it.   For the JavaScript part, I used the Yahoo UI library to make the AJAX calls and to draw a draggable animated window, also to animate the color of the changed value to make it more visible for the user what exactly happened.  For the AJAX data transfer I used JSON format because it’s just so easy to work with.  What else? Yes, I used the Single Sign-On functionality so that once you login, your SAP session cookie is stored into the PHP session and then reused for authenticating in the next pages. Another thing was caching the functions interface in the session, so that when you call a function and you don’t know the interface, you find it with saprfc_function_discover() and then store it into the session, so the next time you reuse it in a saprfc_function_define() call.  Any feedback is appreciated, thanks! Looking forward to posting more at SDN.
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