cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a 2nd component and returning from it later

Former Member
0 Kudos

Hi All,

from Component 1 (and some other components, too) I need to call Component 2 and return later from 2 to 1.

One example is calling a complex article search (Conponent 2) from the main component (Component 1) or to create a new customer, which should be possible from more than one component - therefore the split into several compoents (reusing functionality).

For this szenario I found to technologies:

a) Via ViewContainer

- In Component 1 I add a view, which contains only a ViewContainer.

- Decleare usage of Component 2 in Component 1 and its component controller, window and view.

- Within the inbound plug of the view with the ViewContainer, Component 2 is created and a method of Component 2 is called in order to pass some data.

- In order to return from Component 2, an event is defined on the component controller of Component 2. This event is fired when Component 2 wants to return. Data is passed as event parameter.

- In the window of Component 1 an event handler method has been defined and subscribed to the above mentioned event. Within the event handler method, parameters are taken, Component 2 is destroyed and the navigation to the next window is fired.

b) Via suspend and resume plugs

- In Component 1 I fire a suspend outbound plug in order to call Component 2.

I can pass parameters, but only of type string and TIHTTPNVP.

Component 2 is addressed via URL.

- Upon return, Component 2 fires an outbound plug of type exit.

- Within Component 1 a resume inbound plug has been defined, whcih should now automatically be called.

Now my questions:

1) My example application did not reach the resume plug, although defined as interface. Upon return I see only an empty screen. Any idea why?

2) How to build the URL dynamically at runtime? E.g., the test system will have another URL then the development system or production.

3) Passing parameters seems to be limited. Form Component 1 to 2 only strings or TIHTTPNVP. Is the data transferes within the URL and therefore is there a limitation of size, too?

4) How to pass parameters back from Component 2 to 1?

5) Within the online help, I found (http://help.sap.com/saphelp_nw2004s/helpdata/en/43/6b972329d23d33e10000000a11466f/frameset.htm):

"If an outbound plug is flagged as a suspend flag in a Web Dynpro ABAP application, this can lead to errors when the application is executed in the portal. If you are not completely sure that your application is executed solely outside a portal, you should avoid the use of suspend plugs."

Is this still valid? We will have a portal environment. Therefore this may be a show stopper for variant b).

6) Overall: Which variant would you prefer?

Best regards

Lars

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

sorry to ask again ... any thoughts on this topic?

Best regards

Lars