Skip to Content

After reading Matthias Zeller excelent blog [Engaging User Interfaces with Adobe Flex | Engaging User Interfaces with Adobe Flex] I start my Flex learning process…So yes…I have studied Flex for the last 10 days or less…Anyway…I have come to learn and really love Flex…It’s simple, nice and productive.

I download this awesome Module Flex Module for Apache and IIS in order to test my Flex experiments on my Apache Server.[

As I usually do when I first learn a new Scripting Language, I have developed a SE16 Emulator by using Flex, PHP and SAP…I know that you might be asking yourselfs…”Did Blag said PHP? Why?”…It’s fair simple…I can’t use WebServices on my laptop’s MiniSAP 4.6D so I needed a way to connect to SAP and pass the information to Flex.

What we need to do? We must create a Login Class…


We need an Index php page too…

index.php<br />

<textarea cols=”90″ rows=”20″><?php



$_SESSION[“Server”] = $_POST[“myServer”];

$_SESSION[“Sysnum”] = $_POST[“mySysnum”];

$_SESSION[“Client”] = $_POST[“myClient”];

$_SESSION[“User”] = $_POST[“myUser”];

$_SESSION[“Pass”] = $_POST[“myPassword”];

$Login = new Login();

$Log_Me =  $Login->Log_In($_SESSION[“Server”],$_SESSION[“Sysnum”],


$RFC_Me = $Login->RFC_Connection($Log_Me);



     $Return = “<connections><connection>







$_SESSION = array();


$Login = new Login();





</p><p>Now, we can build our UI in Flex.


browser.mxml<br />

<textarea cols=”90″ rows=”20″><?xml version=”1.0″ encoding=”utf-8″?>

<mx:Application xmlns:mx=”” xmlns=”*”


<mx:HTTPService id=”userRequest”


useProxy=”false” method=”POST”>

     <mx:request xmlns=””>





<mx:Panel x=”10″ y=”10″ title=”SE16 Emulator”

width=”775″ height=”400″ layout=”absolute”>

     <mx:Label x=”60″ y=”10″ text=”Table” />

     <mx:TextInput x=”110″ y=”10″ id=”myTable” text=””/>

     <mx:Button x=”280″ y=”10″ id=”ShowData” label=”Show Data”



     <mx:DataGrid id=”dgData” x=”20″ y=”40″ height=”300″ width=”710″



               <mx:DataGridColumn headerText=”{userRequest.lastResult.connections.     

               connection.value}” dataField=”data”/>







</p><p>In order for this to work, we need to create our last php page…

</p><p>SE16.phpP.S you can download the source code from my public box Blag’s Box .


To report this post you need to login first.


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

  1. Dushyant Shetty
    Nice, my curiosity on Scripting and Flex continues to increase !
    Quite an impressive motivator for us “Don’t know where to start” types…



  2. Former Member
    Well Done.
    I like the new possibilities that Flex offers and I want to test and experiment with flex myself.
    How can I get a test version, ’cause I acctually dont know where to start. Do I need to use the Java Stack of SAP or can I do it with the ABAP Stack?
  3. Matthias Zeller
    Hello Alvaro,
    I am impressed. All this in just a couple of days. Good work. Exciting to see all the various Flex projects going on in the SAP eco-system.



    1. Alvaro Tejada Galindo Post author
      Thanks a lot Matthias -:) I came to learn and love Flex in a short time…Of course…I’m just beginning…There’s a lot to learn an a lot of Flex, PHP and SAP integrations to do -;)



  4. Former Member
    Hi Blag,

    Nice one. Just thinking maybe you can try use states in Flex. Create a state for login and after login, create another state and show the datagrid. I dont know what the returned result are. Maybe you can use datafield in the each data column to map your returned data. I will download your source code and play around it.

    Just one question, I am using MacBook, so dont know if I can try to get a trial version of SAP to do the test.



Leave a Reply