Display & run a Flex Application in NW7

Hi @ all,
i´ve developed a FlexApplication to read the Bex Analyser favourites to a Flextree an now im trying to display this application in our NW7 portal. The application is connected to SAP throu a BSP-application.
With clicking one node of the tree i want to open an sapWorkbook with, for example tcode RRMXP and a WBID = xyz.
How to manage this problem?
In flex i have the workbookID and the transactionCode, but how to send them to SAPSystem and after that opening a workbook with excel?

Hi Daniel,
You can Export content from flex application using JSP file on your N/W server also.
The Flow for this would be, collect the required content in HTML Table format string.
then pass this string as parameter to a JSP page which will open an excel sheet and copy your content to it.
You can also apply table formatting using usual html tags.
Plz find some code snippets for your reference :
Suppose on on click of node you have called for an method which is written in your ActionScript part of Flex Application.
viz. loadContentInExcel(para1,para2)
Definition for this method would be like :
private function loadContentInExcel(para1:String, para2:String):void {
               //Pass the htmltable in a variable so that it can be delivered
               //to the backend script
               var variables:URLVariables = new URLVariables();
               variables.htmltable     = convertContentToHTMLTable(para1,para2);
               //Setup a new request and make sure that we are
               //sending the data through a post
               var u:URLRequest = new URLRequest("http://XXX.XX.X.XXX:YYYYY/Test_Excel/main.jsp");
               /* In Above Line Replace XXX.XX.X.XXX:YYYYY with <Host IP>:<Port>  */
               u.data = variables; //Pass the variables
               u.method = URLRequestMethod.POST; //Don't forget that we need to send as POST
               //Navigate to the script
            navigateToURL(u);
private function convertContentToHTMLTable(para1:String, para2:String):String {
             //Set default values
             var font:String = 'ARIAL';
             var size:String = '10';
             var str:String = '';
             var style:String = 'style="font-family:'+font+';font-size:'+size+'pt;"';                    
             str = "<table border=1><tbody>";
             str+="<tr width=\""+100+"\">";
             str += "<td width=\""+100+"\" "+style+">"+"<B>"+"TransactionCode : "+"</B>"+"</td>";
             str += "<td width=\""+100+"\" "+style+">"+para1+"</td>";
             str += "</tr>";
             str+="<tr width=\""+100+"\">";
             str += "<td width=\""+100+"\" "+style+">"+"<B>"+"WorkbookID : "+"</B>"+"</td>";
             str += "<td width=\""+100+"\" "+style+">"+para2+"</td>";
             str += "</tr>";
             str+="</tbody></table>";
             return str;
In main.jsp page mention content type as application/vnd.ms-excel.
In body tag mention out.println(request.getParameter("htmltable").
Hope this will help you..
Regards,
Vivek

Similar Messages

  • Flash won't run the flex application (swf)

    I'm Italian so my english isn't perfect....
    I try to run a flex application (swf) on a pc without flash
    player 9 (8.5) (on firefox and IE)....the flex application ask
    correctly if i want to install the flash player....but anyway,
    after the installation....the flex application doesn't run....
    also, i try to restart the pc....but....swf doesn't
    run.....anybody have the same problem ??

    Hung program: command-option-esc
    Shut down: hold down power button for 5-10 seconds.

  • Flash player in firefox is not giving the exact mouse coordinates while running a flex application in firefox. Actually it was working fine in the previous versions. I mean in the ver 5.5. In the latest version its not working fine

    Hi Friends,
    I face some mouse issues with the later versions of the Firefox (6 and above). When a flex application is executed in a Firefox, It runs on the flash player in the browser. While getting the mouse coordinates, flash player is returning some bad coordinates. Please respond to this as soon as possible

    A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Unexpected behaviour for flex application running on Mac 10.8 with Flash player 12 on Safari

    I have scenario here : I am running my flex application in my Mac 10.8 machine with Flash player 12 on Safari browser . I have a registration form and it is validating various fields in it and when I hit Continue button it is not navigating to the next screen even if all the fields are validated. This registration form is a Popup. Can any body help me with this?

    No, the problem still occurs.
    It's weird there are no plug-in errors or something.
    With fp installed:
    with fp uninstalled:
    as a side note: a few weeks ago, I made a new clean Mac OS installation because of a harddrive replacement. So, the whole system is actually very tidy...  

  • Flex application works locally, fails when online (connecting to PHP script to insert row into DB)

    Hi everyone,
    I've got a Flex application that works wonderfully when I test it on my machine locally. It uploads files and send variables to a PHP script (that inserts them into a DB) with no errors when I run it locally. As soon as I put it online, the upload continues to work but something between my Flex application and the PHP script fails because no data is committed to the DB. I know the PHP script works fine - not only does it work when I run the Flex application locally but when I go directly to the PHP file online, a new empty line is added to the DB.
    I initially thought that this was a cross domain issue so I added the following to the root of my hosted account:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*.MYURL"/>
    <allow-http-request-headers-from domain="*.MYURL" headers="*" secure="false"/>
    </cross-domain-policy>
    I based this off of what I found online which seems to have done nothing for me. I'd also be happy to provide an error message but I don't get one when I debug.
    Any thoughts would be greatly appreciated.

    Use a network monitor to see if the Flex app is truly requesting the right URL.
    -Alex

  • How to find memory leakages in every screens and components in an Flex application ?

    Hi Guys,
    I was running my flex application and left it running over night.
    I noticed that it had a memory leakage issue. The memory leakage was huge upto 1.5gb
    Is there is way i can find out from where (which screen? and which component?) the memory is leaking in my application.??

    That's why FlashBuilder has a profiler.  There are some tips for use on my
    blog.
    Alex Harui
    Flex SDK Team
    Adobe System, Inc.
    http://blogs.adobe.com/aharui

  • Flex application running under AIR takes a long, long time to start.

    I have a flex application which runs on a desktop under AIR. The application has an assets folder with 3,500 mp3 soundclips totalling about 50MB. The problem is, the application takes around 90 seconds to load. I'm sure that AIR is scanning the application folder and doing something with the contents because if I delete the assets folder it loads in about 5 seconds. Does anyone know why AIR/Flex would do this, and why it doesn't exhibit the same problem if I run or debug in Flexbuilder on eclipse? It's making my killer app unusable!
    Thanks
    Paulo

    Well, I've spent a bit longer looking at this now, and the problem appears to lie with my encrypted local store. The first thing that happens is for the app to read the product key from the ELS. But, it fails (for some unknown reason). So, the app seems to hang there for 90 seconds until it eventually renders the welcome screen. If I remove the assets folder it still fails to read from the ELS, but only takes a couple of seconds to start the welcome screen. This is where the scanning of the application folder seems to come into play, because if I remove the code which reads from the ELS the app starts within 2 seconds whether the asset folder is there or not.
    I think the slow startup and the scanning of the assets folder are just symptoms of a different problem, i.e. a problem with the ELS. I don't have the same problem with my development environment though - it's only when I test deploy the application.
    Thanks for your help on this problem EgorKDie. I think I should be able to resolve it once I can sort out why the ELS is being awkward.

  • Flex application not working when deployed run from Server

    Hi,
    I have Flex application which takes a parameter from user, makes a web-service call and returns the message.
    This application is running perfectly when I launch from IDE.
    But when I copy the files from bin-release to server and launch it, it gives me no result.
    In the crossdomain file on the server which hosts web-service, I have added the my host IP in the
    allow-access-from domain tag.
    In the initialization method of the application I load crossdomain using following code:
        Security.allowDomain("remoteservername");
        Security.loadPolicyFile("http://remoteservername/crossdomain.xml");
        var request:URLRequest = new URLRequest("http://remoteservername/crossdomain.xml");
        var loader:URLLoader = new URLLoader();
        loader.load(request);
    Is there a way I can debug application when running from server?
    Please give me some pointer to solve this problem.
    Thank you.
    Chintan

    Alex thanks for reply
    The URL for the app is http://<some_IP>/flex_app
    <some_IP> is added in crossdomain.
    Also we have outbound IP's and of these are also added in the crossdomain file.
    This is the current content of crossdomain file:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="<some_IP>"/>
    <allow-access-from domain="<outbound_IP1>"/>
    <allow-access-from domain="<outbound_IP2>"/>
    <allow-access-from domain="<outbound_IP3>"/>
    <allow-http-request-headers-from domain="<outbound_IP1>" headers="SOAPAction"/>
    <allow-http-request-headers-from domain="<outbound_IP2>" headers="SOAPAction"/>
    <allow-http-request-headers-from domain="<outbound_IP3>" headers="SOAPAction"/>
    </cross-domain-policy>
    App runs perfectly fine when launched from Flex Builder.

  • How to display pdf file in flex application

    hi,
    I am Ibran, I am using Flex4.5, in that i want to display a pdf file like images.
    How can i do it please anyone tell me.
    I have used navigateToURL(url),but this was going into navigation and i can't see my textfield and buttons.
    So without this  navigateToURL(url) how can i display a pdf file in flex without navigation so that i can see my textInputs and buttons.

    Flash does not have the ability to load/display/manipulate PDF files, so you can't open it directly in the flex application.  With clever HTML and javascript, you can make it appear that it is in the same window, but it will actually be in a separate window/div in the browser.  And yes, this has always seemed absurd to me that Adobe doesn't support PDF's......
    Mark

  • Displaying PDF file in Flex application

    Hello,
    Is there any way, by which I can read/display PDF file as it is in Flex application (Web based). Is there any way or work around by which I can achieve
    this.
    Awaiting for prompt response.
    Thanks and Regards

    Hello Mariush,
    I have to display the content of the PDF in the flex application. If not PDF directly, is there other workaround for this. Or can I display the content of the MS word file, if not PDF.
    Thanks and Regards
       Khalid Chaudhary

  • Reading/Displaying MS Word file in Flex application

    Hello,
    Is there any way, by which I can read/display word file as it is in Flex application (Web based). Is there any way or work around by which I can achieve this.

    Hello,
    You can find swc-s that convert doc files to pdf files, you can also convert one page at a time, in case you have a big document.
    Claude Bur.

  • Problem with an application running Adobe Flex. Tech people say they cannot monitor, track or catch the problem.

    Problem with an application running Adobe Flex. tech people say they cannot monitor, track or catch the problem. Application shuts down and give the following erre:
    Failure of server APACHE bridge:
    No backend server available for connection: timed out after 10 seconds or idempotent set to OFF or method not idempotent.

    <moved from Downloading, Installing, Setting Up to Flex>

  • Trying to make a flex application scalable in its display size by using a "Host-swf" - Problem

    We created a flex application using Flex 3. What we are
    trying to do is to make this application scalable in its display
    size. That means we want the application to scale itself to exactly
    fit the size of the browser window without using a scrollbar like
    normal Flash-swfs do. Sadly flex application don't scale like a
    normal flash swf.
    To get a workaround for this we created a so called
    "Host-swf" with flash CS3. This Host-swf loads the flex application
    and adds it as a child. And voila: When calling the Host-swf our
    application can scale.
    We used this code to achive this:
    var oUrlRequest:URLRequest = new
    URLRequest("Flex-Application.swf");
    var oURLLoader:Loader = new Loader();
    oURLLoader.load(oUrlRequest);
    addChild(oURLLoader);
    This works perfectly as long the browser window is larger
    then the resolution of the host-swf (900*600) when calling the url
    for the application:
    Picture showing the
    scaling
    But it doesnt't work out when the browser window is smaller
    than 900*600. The application is then shown with a scrollbar, and
    when resizing the browser window the scrollbar is still there:
    Picture showing the
    application with scrollbar
    Maybe anyone already tried to achive the same thing and has a
    different solution for us?
    Thank you in advance!

    "noby_95" <[email protected]> wrote in
    message
    news:gpsue6$rhh$[email protected]..
    > We created a flex application using Flex 3. What we are
    trying to do is to
    > make
    > this application scalable in its display size. That
    means we want the
    > application to scale itself to exactly fit the size of
    the browser window
    > without using a scrollbar like normal Flash-swfs do.
    Sadly flex
    > application
    > don't scale like a normal flash swf.
    >
    > To get a workaround for this we created a so called
    "Host-swf" with flash
    > CS3.
    > This Host-swf loads the flex application and adds it as
    a child. And
    > voila:
    > When calling the Host-swf our application can scale.
    >
    > We used this code to achive this:
    >
    >
    > --------------------------
    > var oUrlRequest:URLRequest = new
    URLRequest("Flex-Application.swf");
    > var oURLLoader:Loader = new Loader();
    > oURLLoader.load(oUrlRequest);
    > addChild(oURLLoader);
    >
    >
    > -------------------------
    >
    > This works perfectly as long the browser window is
    larger then the
    > resolution
    > of the host-swf (900*600) when calling the url for the
    application:
    >
    http://www.gansl-online.de/Bild1.jpg
    >
    > But it doesnt't work out when the browser window is
    smaller than 900*600.
    > The
    > application is then shown with a scrollbar, and when
    resizing the browser
    > window the scrollbar is still there:
    >
    http://www.gansl-online.de/Bild2.jpg
    >
    > Maybe anyone already tried to achive the same thing and
    has a different
    > solution for us?
    When I set the Application width and height to a percentage
    number, it will
    change its size based on the size of the window.

  • How to start Flash Media Encoder 3.2 from Flex application with run time parameters?

    Hello ,
    I'm developing the application to stream High Quality video.While streming by default camera/microphone settings the qulaity of streaming is not upto my expected level.I want to stream through Flash Media Encoder.My aim is the user login to the application.Video/audio qulaity details are retrived from shared object stored in the client machine.The login user name only gathered at run time & it will be the streaming profile name to Encoder.Once the the Encoder started the outgoing video will be come into screen to client.Please guide me How to start Flash Media Encoder 3.2 from Flex application with run time parameters(User name as  streaming name) without manually start the FME?
    Thanks in advance.
    Regards
    Sasharyuva

    Hi MarcSaphiron,
    Could you please send the samples?It will be much helpful to complete my
    job within the deadline.
    Thanks in advance.
    Regards,
    Sasharyuva

  • How can I display Flash Videos without any Flex application decoration

    I develop a flv video player with Flex3 and have problems to
    get rid of the application decoration (frame, border and the like)
    that is part of a standard Flex application. My video player is
    200px x 200px and I only wanna see what the video shows, so that
    the Flex application allocates 200px x 200px.
    It is not clear to me if this can be reached through special
    tags resp. attributes or if I have to do something in the CSS
    area.

    copy and compile this one taken from www.theflexteam.com with
    a couple of extra things, is that it?:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical" backgroundColor="#000000"
    backgroundGradientColors="[#000000, #000000]">
    <mx:Script>
    <![CDATA[
    private function playVideo():void
    videoPod.play();
    private function pauseVideo():void
    videoPod.pause();
    private function stopVideo():void
    videoPod.stop();
    ]]>
    </mx:Script>
    <mx:VideoDisplay id="videoPod" source="
    http://www.theflexteam.com/gfx/flvs/gorillaz_high.flv"
    backgroundColor="#000000" backgroundAlpha="0"
    shadowDistance="0" shadowDirection="center"
    />
    <mx:ControlBar>
    <mx:Button id="stopBtn" label="Stop"
    click="stopVideo();"/>
    <mx:Button id="playBtn" label="Play"
    click="playVideo();"/>
    <mx:Button id="pauseBtn" label="Pause"
    click="pauseVideo();"/>
    </mx:ControlBar>
    </mx:Application>
    /cujino

Maybe you are looking for