Skip to Content
This weblog builds on the ST22 and scripting weblog created by The specified item was not found.. The PHP scripting front end with RFC connection is replaced with a Widget using web services.

The widget is a modified version of the TechEd Schedule widget (thanks to Sebastian Steinhauer and Stefan Huettenrauch).

Widget UI

image

Configuration

image

There are 5 config parameters.
Username
This is the username for authentication on the server.
Password
This is the password for authentication on the server.
Host
The ABAP host. This should not include the protocol.
Port
The port on the server for the service
Service
The path of the service, this should be “/sap/bc/soap/rfc”. Ideally I should have hard coded this.

Download

The widget can be downloaded from here

ABAP Coding

The code is almost the same as that provided by Alvaro. The only changes are a sort call, a change on the select params and a try catch to catch errors I occasionally got on the backend. The function module must be remote enabled.

Development Environment

Usually when developing a widget that accesses a Web Service I use another widget that lets me test Soap Requests and monitor the response with TCPDUMP. Unfortunately that widget runs on my Mac that has no SAP access right now. I had to find a way to view the SOAP headers. Some of the other tools I use are Scripting in a box and the SAP Scripting tool (Eclipse add in). Using the PHP generated from the scripting tool I added the following line:


Request Headers
‘.htmlspecialchars($client->__getLastRequestHeaders(), ENT_QUOTES); 

This allowed me to see the headers without having to use the Mac.

Possible Enhancements

Being able to lauch directly into ST22 would be nice, as would wrapping the text on the display.

Another problem is that I am being challenged for credentials on a PC, but not a Mac. Hopefully I can figure this one out.

To report this post you need to login first.

8 Comments

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

  1. Santhosh Lingaraju
    Hi John,

    Can you provide me the complete source code of Widget ( .kon & .js javascript file ). Actually I am trying to develope a simple widget which can integrate with SAP. Hence Javascript code of connecting to RFCs/ Webservices would be usefull. Your response would be very helpfull.

    Thanks & Regards,
    Santhosh

    (0) 
    1. Kevin Geiger
      Is the widget code for this still valid?   When I try to download I get the following error.  “An invalid character was found in text content.  Error processing resource ‘http:”www.predictionfootball.com/widgets/sapst2…

      regards
      Kevin Geiger

      (0) 

Leave a Reply