Development Trends

Archive for the ‘SAP NetWeaver’ tag

Four ways to integrate Adobe Flex with SAP Netweaver

without comments

For quite some time now SAP and Adobe has presented different methods and initiatives you could use if you would like to integrate Adobe Flex and SAP Netweaver.  I will try to summarize four different scenarios you could consider.

Using SAP Flash Island scenario

If you are using Netweaver 7.0 EhP1 or 7.1 then you can use the SAP Flash Island framework to integrate Adobe Flex with SAP (read more about SAP Flash Island here). The framework will create a ‘bridge’ between a SAP WebDynpro application and Flex. In order to ‘connect to this bridge/framework’ – you need to use a library from SAP in your Flex project – I have created a template project you can use for this purpose click here. Flash Islands are best suited for smaller applications/components – especially for areas where you are missing UI functionality in the WebDynpro, e.g. could be advanced graphics, interactive maps, graphs and statistics. Authentication, User and session management will be handled by the WebDynpro application.

Using SAP BSP and an embedded Adobe Flex component

So what do you do if your application is SAP is not based on WebDynpro – then you will be missing the framework and bridge which will make it easy to communicate with an Adobe Flex application – or ? Well in SAP BSP you can use <object><embed> … </embed><object> to include an SWF application in the application – read more here.  But the data binding and event handling you will have to handle yourself in the BSP and in the Flex application. This kind of integration is also meant for smaller applications/components – especially for areas where you are missing UI functionality in SAP BSP, e.g. again could be advanced graphics, interactive maps, graphs and statistics. Authentication, User and session management will be handled by the SAP BSP application.

Using an HTTP REST backend application in SAP BSP – and an Adobe Flex RIA as Frontend

So… what do we do if we want to build a larger application in Adobe Flex (RIA) which should be integrated with SAP Netweaver? Well.. One possibility would be to build a set of backend services in SAP BSP using the HTTP REST approach/architecture (read more here). In SAP you will then be building normal BSP’s which will receive the input parameters in a HTTP request – and send the reply to the calling application as XML. These services can be called from Adobe Flex using the HTTP-request object. The work could be divided in two parts: the work regarding the design and implementation in SAP and the work with the design and implementation of the RIA using Adobe Flex. In between you need to describe and design the implementation of the interface. User and session management could be handled by the SAP BSP application if it’s running as a state full application. Regarding Authentication you need to consider how you would implement this in the application.

Using WebService enabled SAP BAPI’s as backend application – and an Adobe RIA as Frontend

In the last method you could consider using Webservice enabled BAPI’s instead of having to write BSP’s to communicate with the frontend. From Netweaver 6.40 and onwards all BAPI’s in SAP could be webservice enabled – and from 7.0 the functionality has been improved. And it’s possible to call these webservice enabled BAPI’s directly from Adobe Flex. You can use standard BAPI’s and/or make custom development for your own specific BAPI requests. User and session management should be handled by the Adobe Flex application. Regarding Authentication you need to consider how you would implement this in the application.

Written by MKE

September 2nd, 2009 at 8:02 pm

RIA Hacker Night 2009 – SAP TechEd

without comments

The RIA Hacker Night 2009 will be held in connection with SAP TechED 2009 in Phoenix, Vienna or Bangalore. The sponsors this year will be: Adobe, RedMonk and SAPPress

Read more here and/or join here :-)

Written by MKE

August 19th, 2009 at 3:29 pm

Posted in Events

Tagged with , ,

Developing rich Internet applications for SAP with Adobe Flex

without comments

Do you want to know/learn more about RIA for SAP? – then read this whitepaper from Adobe.

Written by MKE

July 3rd, 2009 at 10:43 am

Google Analytics in SAP WebDynpro using SAP Flash Islands

with one comment

If you are doing Web development using SAP WebDynpro in Netweaver – you might find the fact that you cannot use Javascript in the UI a little bit annoying… so what do you do if you would like to use e.g. Google Analytics to monitor the usage of your WebDynpro application…? in order to do this you need to add a small Javascripts snippet to your webpages, and this is not possible in WebDynpro… or…. (btw: the same Javascript idea applies to other kinds of third party app’s.. not only Google apps)

Well.. I ran into a couple of links – and it gave me a good idea, that might help you embed Google Analytics.

  1. First of all your development platform need to support SAP Flash Islands (min. SAP NetWeaver 7.0 EhP1)
  2. Then you need to goto Google Analytics Tracking for Adobe Flash – in order to get the analytics.swc file
  3. Create a Google Analytics account in order to get an account-id for tracking
  4. Create a new SAP Flash Island application (click here to see an SAP Flash Island template)- and add the analytics.swc to the Flex build path/Library path – the Island should not display much… maybe just a company logo etc.
  5. The new SAP Flash Island application should take an url as an input parameter and pass this url to Google Analytics using the Google Analytics Tracking tool for Flash/Flex (see example) using the command: ”
    tracker.trackPageview( the input url parameter );"
  6. Place the new SAP Flash Island application on each of the WebDynpro pages you want to track (the visual size of the Island could but small or covered by a company log – you just need it somewhere on the page) – and pass the actual url of the WebDynpro Application parameter to the Island. You actually just use SAP Flash Island to call Google Analytics, so from a display point of view the output of the Island is not that interesting in this example
  7. And you will be able to start collecting the WebDynpro Usage in Google Analytics
  8. Remember to check the terms of service

Happy programming…

Written by MKE

May 4th, 2009 at 10:28 pm

Want to learn more about SAP Flash Island?

without comments

With the introduction of SAP Flash Islands in Netweaver 7.0 EhP1- SAP will now also attract ressources from the Adobe Flex community together with SAP’s own developer community. Developers from both communities will be needed to make SAP Flash Islands a real success.

Flex developers will now have the possibility to use their existing skills from the Adobe Flex ‘world’ to develop and invent new SAP Flash Islands components which can be integrated easily with SAP Netweaver.

SAP developers on the other hand can focus on UI integration areas where advanced  e.g graphical components are needed and use the new SAP Flash Islands from the Adobe community to complete this kind of task.

Read more at:

Development Trend

Adobe – Developer Connection

SAP Community Network – a video about SAP Flash Island

SAP Flash Island – LinkedIn Group

Written by MKE

April 14th, 2009 at 10:34 pm

SAP Flash Island and Google Maps

with 3 comments

SAP Flash Island and Google Maps… – it’s so obvious – and therefore I had to try to build an example of how this could be done.  If you are familar with Google Maps – you might be thinking: JavaScript… ! and how could this be integrated with Flex… well.. Google has made it a little bit easier for Flex developers with the Google Maps API for Flash. All you need to do is to register in order to get an API Key and then download the SWC file: map_flex_1_6.swc and include it in the library path of your project. With the SWC file you will get access to the Google Maps interface library.

And why could it be helpfull to integrate Google Maps with SAP using Flash Islands? Well… it’s just one of those examples which illustrate some of the basic ideas of SAP Flash Island – you embed a powerfull UI with SAP which isn’t available in SAP Netweaver. And with this feature it’s suddenly easy to show e.g.:

  • where your customers are located
  • which installations needs a visit from a service technician
  • where is the nearest truck
  • and more…

You just need to pass either the GPS coordinate or the address of the location(s) to your Flash Island – and the Flash Island will handle the rest. The gecoding feature in Google will help you with the address conversions to GPS coordinates.

Remember to include the SAP Flash Island swc’s into your library path as well – see example here

Example source code below (marked with blue) – replace the parts marked with red.

if you want to try it without the SAP Flash lib – just remove:

  • import sap.FlashIsland:
  • FlashIsland.register(this)
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    width="100%"
    height="100%"
    initialize="init()">
    <mx:Script >
        <![CDATA[
            import sap.FlashIsland;
            import mx.controls.Alert;
            import com.google.maps.controls.MapTypeControl;
            import com.google.maps.controls.ZoomControl;
            import com.google.maps.controls.PositionControlOptions;
            import com.google.maps.Map;
            import com.google.maps.MapEvent;
            import com.google.maps.MapType;
            import com.google.maps.LatLng;
            import com.google.maps.controls.PositionControl;
            import com.google.maps.overlays.Marker;
            import com.google.maps.overlays.MarkerOptions;
            import com.google.maps.styles.FillStyle;
            import com.google.maps.styles.StrokeStyle;
            import com.google.maps.InfoWindowOptions;
            import com.google.maps.MapMouseEvent;
            import com.google.maps.services.ClientGeocoder;
            import com.google.maps.services.GeocodingEvent;
            [Bindable]
            public var inputAddress:String;
            private var gMap:Map;
            private var MyCurrentLocation:String;
            private function init():void
            {
                FlashIsland.register(this);
                gMap = new Map();
                gMap.key = "enter your api key here - enter your api key here";
                gMap.width = 600;
                gMap.height = 400;
                gMap.addEventListener(MapEvent.MAP_READY, mapReadyHandler);
                mapContainer.addChild(gMap);
                if ( inputAddress == null )
                {
                    inputAddress = "your initial location"
                    addr1.text = inputAddress;
                }
            }
            private function mapReadyHandler(e:MapEvent):void
            {
                gMap.setCenter(new LatLng(55.999121,9.540081), 4 ,
                MapType.NORMAL_MAP_TYPE);
                gMap.setSize(new Point(mapContainer.width, mapContainer.height));
                gMap.addControl(new PositionControl());
                gMap.addControl(new ZoomControl());
                gMap.addControl(new MapTypeControl());
                FindMyLocation();
            }
            public function FindMyLocation():void
            {
                doGeocode();
            }
              private function doGeocode():void
              {
                var geocoder:ClientGeocoder = new ClientGeocoder("AU");
                geocoder.addEventListener(GeocodingEvent.GEOCODING_SUCCESS,   
                function(event:GeocodingEvent):void
                {
                      var placemarks:Array = event.response.placemarks;
                      if (placemarks.length > 0)
                      {
                        gMap.setCenter(placemarks[0].point);
                        var marker:Marker = new Marker(placemarks[0].point);
                           marker.addEventListener(MapMouseEvent.CLICK,
                           function (event:MapMouseEvent):void
                           {
                               marker.openInfoWindow(new InfoWindowOptions(
                               {content: placemarks[0].address}));
                        });
                           marker.setOptions(new MarkerOptions({ strokeStyle:
                           new StrokeStyle({color: 0x987654}), fillStyle:
                           new FillStyle({color: 0x223344, alpha: 0.8}), radius: 12,
                           hasShadow: true }));
                        gMap.addOverlay(marker);
                      }
                });
                geocoder.addEventListener(GeocodingEvent.GEOCODING_FAILURE,
                function(event:GeocodingEvent):void
                {
                    Alert.show("Location not found");
                    trace(event);
                    trace(event.status);
                  });
                gMap.clearOverlays();
                geocoder.geocode(addr1.text);
              }
        ]]>
    </mx:Script>
    <mx:Label id="lab1" text="Find Functional Location.." />
    <mx:TextInput id="addr1" />
    <mx:Button id="geocoding" label="Search" click="FindMyLocation()" />
    <mx:UIComponent id="mapContainer" width="100%" height="90%"/>
</mx:Application>

Written by MKE

February 5th, 2009 at 12:07 am

Use SAP Flash Island/Adobe Cocomo to build a social network in SAP

with 2 comments

SAP Flash Island is a new/upcoming feature in SAP Netweaver and the discussions about what kind of features we could/would expect in these Islands have already started. SAP and Adobe have already given some examples – and for people working within the SAP area, the upcoming Flash Islands could open up for quite new features and possibilities.

The other day – I ran into an interesiting project at Adobe Labs. A project called Adobe Cocomo which is in it’s final testphase. It’s a set of  hosted services which will make it easy to add social capabilities to your Adobe Flex application (Flash Island). You will need to download a SWC to use in the SAP Flash Island project – with this Cocomo interface it will be quite easy to use  some of the following features in your SAP Flash Island:

  1. VoIP Audio
  2. Webcam Video
  3. Chat
  4. Multi-User Whiteboards
  5. Real-Time File Sharing
  6. User Management
  7. Roles and Permissions
  8. Robust Data Messaging

You might think – “… why implement features we already have in Skype or Messenger in a WebDynpro application”? Well – with a SAP Flash Island you will have a welldefined integration path to the backend system, masterdata, transactional data and authorizations – and could consider to use this as input (and output) to the Flash application.  So suddenly you could display a snapshot of the latest sales figures at the multi user white board and discuss the sales progress in a Webcam, VoIP or chat session – just as an example of the possibilities.

Six Thinking Hats

You might take it a step further – and look at some of the methods behind the “Six Thinking Hats” (also known as “The de Bono Hats system”) and use them as an inspiration to enhance the SAP/Cocomo features and end up with a SAP Flash Island application which will do much more than Skype or Messenger – and it will be integrated with SAP Netweaver.

Read more:

Adobe Labs Cocomo website

Six Thinking Hats/The de Bono Hats system

An Adobe Flex template project for SAP Flash Islands

SAP ABAP developers: How to get started with Adobe FLEX – part II

Written by MKE

January 25th, 2009 at 10:15 pm

An Adobe Flex template project for SAP Flash Islands

with 4 comments

It’s always nice with a small template project, which will contain the basic setup needed in order to get started with a new kind of development – in this case SAP Flash Island (Adobe Flex). I have therefore made a description of how to create your own SAP Flash Island template project.

The template will cover an Flex 3.0 project (Netweaver 7.1):

  1. Download the following files from the MIME repository in SAP (path: public/bc/ur/nw7/flashislands)
    • WDIslandsLibrary30.swc
    • WDIslandsLibrary30-debug.swc
  2. Save the two files on your PC
  3. Create a new Flex 3.0 project – just with the initial mxml sourcecode
  4. Include the two SWC files in the Flex project using the following procedure:
    • Right click at the projectname in Flex Navigator
    • Select ‘Properties’
    • Choose ‘Flex Build Path’
    • Select the tab ‘Library path’
    • Press ‘Add SWC’  and upload the two files
  5. Copy/paste the source code below (marked with blue) – and save the project
  6. You now have a template for an SAP Flash Island project
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
    initialize="initApp()" >

    <mx:Script>
        <![CDATA[

            import sap.FlashIsland;

            [Bindable]
            public var MyInput:String;
            [Bindable]
            public var MyOutput:String;

            public function initApp():void
            {
                FlashIsland.register(this);
            }

            public function FireEvent():void
            {
                MyOutput = exinput1 as String;
                FlashIsland.fireEvent(this, "Event1");
            }
        ]]>
    </mx:Script>

    <mx:TextInput id="exinput1" />
    <mx:TextInput id="exinput2" text="{MyInput}" />
    <mx:Button id="fevent" label="Fire Event" click="FireEvent()" />

</mx:Application>

You do not need to rewrite the function “initApp” – it’s already completed. It will register the Island in the Web Dynpro UI.

The two bindable Strings (MyInput and MyOutput) defines the variables which will pass data to the Flash Island and back. It’s important that they are bindable and public. If you want to pass arrays of data you should use an ArrayCollection. But be aware that the datatypes in WebDynpro and Flex is not always available/compatible – in SAP you can use e.g. Integers, REAL and dates – they are not available in Flex in the same format.

The function “FireEvent” will trigger an event which will be caught by the webdynpro – and the value of MyOutput will be sent back together with the event to actionhandler in SAP. You can define more event triggers in your Flex Application and define the associated Action handlers in your web  dynpro.

When you have completed your Flash Island – you will need to export an release build and import the swf in the MIME of the web dynpro project and make the binding of data and events.


Written by MKE

January 2nd, 2009 at 11:49 pm

SAP ABAP developers: How to get started with Adobe FLEX – part II

with 2 comments

In my previous blog I described how you could find descriptions and inspirations on how to get started with Adobe FLEX development.

In this blog, I will focus a little bit more at some Adobe FLEX examples. But before we go into details, you need to get Adobe FLEX installed. There are two possibilities, you can either download the free Flex 3 SDK – with this download you will get the Flex Framework and the Flex compiler, which will enable you to develop and deploy Flex applications. But you will miss an IDE which is not part of the package. If you want to go for the full package you will have to download the Flex Builder 3 – Adobe has a trial download available. My ‘How-to-get-started’ examples will be based on Flex Builder 3.

After you have installed Flex Builder 3, you are ready to get started with the traditional ‘Hello world’ application:

  • Start Flex Builder 3
  • Choose ‘File -> New -> Flex Project’
  • Enter a project name ‘SAPSDNdemo1′
  • Application Type ‘Web Application (runs in Flash Player)

The Application type will determine whether the Flex application will run in a browser as a web application or as a desktop Adobe AIR application.

  • Copy/paste the sourcecode below (marked with blue) into the ‘Source’ tab:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        <![CDATA[
        import mx.controls.Alert;
        public function Button1Clicked():void
        {
            Alert.show('This is demo1', 'How to get started', mx.controls.Alert.OK);
        }
        ]]>
    </mx:Script>
    <mx:Label text="Hello - SAP Community Network"/>
    <mx:Button id="button1" label="Press me" click="Button1Clicked()" />
</mx:Application>
  • ‘Save’ the project
  • Choose ‘Run’

The ‘Hello world’ project will start in your browser (see/try the example below)

The sourcecode contains two types of elements:

  • MXML: Multimedia eXtensible Markup Language (mx: tag’s)
  • ActionScript

MXML is a markup language and is used to define the layout of the FLEX application and the binding between UI components. A large number of Flex UI components are available in Flex Builder.

ActionScript is used for the implementation of the application logic. ActionScript could be quite complex and built using OO.

In the example above, I have used mx-tag’s to define:

  • The general attributes of the application with mx:application
  • A label with ‘mx:label’
  • A button with ‘mx:button’
  • and a script block with ‘mx:script’

In the Script block you will find a public function definition which will display the popup message (button1clicked). In the mx:button tag you will see how the button event is linked to this function.

In the next blog (part III) I will implement an example where we use Google Maps in a Flex Application… could this be a candidate for the first Flash Island? And I will demonstrate how build MVC applications using Adobe Flex…

Written by MKE

December 9th, 2008 at 11:57 pm

xBCML (Extensible Business Client Markup Language)

without comments

In SAP NetWeaver 7.0 Enhp1 a new xml rendering technology is introduced. The xml rendering is called xBCML – Extensible Business Client Markup Language. The xml will contain the description of the UI elements and their properties which is send to the client using HTTP(S). The purpose of this new protocol is to be able to send rendering information to Smart clients built in e.g FLEX, Silverlight or SAP’s own Business Client. Does this mean that existing WebDynpro applications should be changed? The answer is no – existing WebDynpro application can also be rendered using xBCML without any changes.

Written by MKE

October 30th, 2008 at 11:15 pm