cancel
Showing results for 
Search instead for 
Did you mean: 

[Integration] Web Dynpro ABAP calling Flex in Popup (without Flash Islands)

guillaume-hrc
Active Contributor
0 Kudos

Hi,

We do not intend to install Enhancement Package 1 in a near future.

Nevertheless, we do have requirements where Flex should be integrated with Web Dynpro ABAP (Flex components embedded or 'attached' to Web Dynpro ABAP applications).

I would like to open a popup showing a Flex component. Then, the user validates and the Web DYnpro ABAP application is resumed. All this integrated within EP 7.0.

What, according to you, would be the most effective combination :

- Suspend / Resume plug

- Server-side cookies

- iFrame (although it is deprecated)

- ...

Given what I have read so far, it seems encapsulating the .swf within a BSP application would be the best shot. Could it be possible to get rid of this 'additional layer' ?

Thanks in advance.

Best regards,

Guillaume

Accepted Solutions (0)

Answers (1)

Answers (1)

guillaume-hrc
Active Contributor
0 Kudos

Web Dynpro ABAP

Define a suspend and a resume plug.

BSP

Retrieve the parameters sent by WDA either by AUTO attributes or the following code

CONSTANTS: c_resume_name          TYPE string  VALUE `sap-wd-resumeurl`.

DATA: lt_tihttpnvp                TYPE tihttpnvp.

FIELD-SYMBOLS: <fs_httpnvp>       LIKE LINE OF lt_tihttpnvp,
               <fs_dept_magasin>  LIKE LINE OF t_dept_magasins.

** Lecture des paramètres envoyés (par le WD ABAP)
CALL METHOD request->get_form_fields
  CHANGING
    fields = lt_tihttpnvp.

READ TABLE lt_tihttpnvp ASSIGNING <fs_httpnvp> WITH KEY name = c_resume_name.
IF sy-subrc = 0.
  e_url = <fs_httpnvp>-value.
ENDIF.

Flex

To return to the Web DYnpro ABAP, call a Javascript function within the BSP using this kind of code :

jsReturn = ExternalInterface.call("sendBackToSAP", selectedDepartmentsParam, orderParam);

BSP

First, to react to the user action in the Flex component, define a Javascript function in the


      function sendBackToSAP(departements, ordre) {
         fireServerEvent(departements, ordre);

         return("Done");
       }

To fire a server-event (in order for BSP to call the WDA resume plug), I use this declaration :

<!--  Event used by the Javascript to trigger OnInputProcessing so as to create
              the server-side cookie -->
       <bsp:htmlbEvent name= "fireServerEvent"
                       id  = "flexAction"
                       p1  = "departements"
                       p2  = "ordre"></bsp:htmlbEvent>

Last, I simply call the URL that the WDA gives me first :

navigation->goto_page( e_url ).

If people are interested in a more detailed presentation, feel free to reply to this post, and I will write a blog about this. Nevertheless, it should become pretty obsolete with the Flash Islands release...

Edited by: Guillaume Garcia on Oct 11, 2008 11:13 AM

pramod_teewaree
Explorer
0 Kudos

Hello Guillaume,

Do you have a blog post about how to allow a CRM application communicate directly with a session open on Flex.

Let's say there is a Flex session already open. From CRM, I click on a link which is supposed to display an object on flex. What happens is that Flex loads a whole new session again before displaying the object. What I would like is to prevent flex from loading a new session and to display the requested object.

Thanks for your reply,

Best Regards,

Pramod.