cancel
Showing results for 
Search instead for 
Did you mean: 

Insert a html-page (IPC) in WD Java Application

Former Member
0 Kudos

Hello everyone,

this situation: Im developing a application which makes it possible to create quotes/orders with enterprise services and configurable products. Because of this I need to integrate the html-page of the IPC into my WD Java application. I've read something about an IFrame UI-Element, but I simply don't FIND this IFrame-Element in my NWDS (I'm using SAP NetWeaver 7.1 Composition Environment SP06 PAT0003). Please help me.

And if I get this to work I also need to know how to catch the response of the IPC into my WD Java App.

Greetings, Marco

(are) "Very important" in title only allowed for "premium SDN customer"

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marco,

and: You can use it also in CE, but you have to add it programmatically, it's not shown in the ViewDesigner.

Read this wiki page: [Dynamic UI Generation|https://wiki.sdn.sap.com/wiki/x/Odc ]

kind regards

Stefanie

Former Member
0 Kudos

Thank you for your answers,

but since the old IFrame would kill my session of the wd java app and that the IFrame2 isn't documented well at the moment I think I'll use the possibilities of the portal. But here I also have some questions. Sorry, but I'm still a beginner in WD Java.

I found out that I can create an URL-IView, To this I can pass parameters (The ones which are needed by the IPC). But I don't really know how to do this. I'll give you a step by step explanation of my app from the beginning of the needed navigation:

- A configurable product has been chosen and an application internal ID is given to it.

- I click on a "Configure"-Button

- Now I first need to build the hookurl for my wd application. With this I must be able to jump back to my application as i left it.

- then the other needed parameters and the hook url need to be send to to the IPC URL-IView. The WD Application vanishes and only the IPC is visible.

- I configure the product

- I click on finish

- Now the IPC needs to send his data to the delivered Hook URL -> my WD Java App.

- Now the WD App needs to notice that the configuration is finished and must dispatch the response of the IPC

- Then the dispatched information must be saved to the item with the corresponding app internal ID.

I know, now that I see it these tasks are very.. complex. But I really need to get this work and don't know how to start the single points. Any information would be welcome!

Greetings Marco

Former Member
0 Kudos

Hi Marco.

I don't get what you mean with "Now the WD App needs to notice that the configuration is finished and must dispatch the response of the IPC", but I think your process is possible and not that complex. Of course, you have to know the tools.

From your Web Dynpro (Proxy page with suspendable=true) trigger a navigation to your AppIntegrator based IPC iView. An AppIntegrator iView is capable to receive any parameter you want, for example from the request. Search the how to pdf "Using the Application Integrator" for a detailed explanation on that.

When configuration is finished, the IPC iview has to trigger the navigation back to the Web Dynpro page + add URL parameters. Hook into the doApplicationStateChange method of your controller, e.g. like this:

WDApplicationStateChangeReason reason = stateChangeInfo.getReason();

if(reason!=null&&"RESUME".equals(reason.toString()))

{

readRequestParameters();

}

Cheers, Karsten

Former Member
0 Kudos

Hi Karsten,

thank you for your response. First: With "Now the WD App needs to notice that the configuration is finished and must dispatch the response of the IPC" i only mean that the needed information of the configuration which has been made in the IPC and passed to the wd app must be filtered out to be used in the app.

Now to your idea: This sounds good. But one thing I don't really understand. You say "the IPC iview has to trigger the navigation back to the Web Dynpro page". But the IPC is a non WD Application. for example: The IPC needs a parameter called "structure.hookurl". My WD App needs to get the configuration. Because of this some url of my application would be this hookurl. Now, if I have done the configuration and click accept in the IPC, the configuration would be send to the given hookurl as a http Post and the hookurl would be opened in the same browser window as the IPC.

Now I don't really see how to trigger a navigation or event or whatever with this http post. I hope you know what I mean. If not just say it. Then I'll describe it again in german. In this thread ther are only germans writing anyway

Kind regards, Marco

Former Member
0 Kudos

I don't have detailed knowledge about the IPC but as far as I understand you, you are able to configure some kind of hook url when you finished the configuration and pass a bunch of parameters.

Trouble is, navigation in a standard SAP portal is triggered with javascript.

http://help.sap.com/saphelp_nw70/helpdata/EN/43/00c110606a5277e10000000a1553f7/frameset.htm

What you could do, is creating a URL shortcut to your web dynpro page, like

http://your-portal.your-company.com/irj/portal/yourwebdynpropage

Maybe you have to wrap the parameters in a parameter called DynamicParameter.

http://help.sap.com/saphelp_nw70/helpdata/DE/44/be65751c743959e10000000a1553f6/frameset.htm

It's not that convenient, but it should work.

Former Member
0 Kudos

Hi Karsten,

thanks for your response. Sadly I think there would be some problems with your solution. First I need to keep my WD App open because if I open the IPC in the same window as the WD App all the actions which have been made before the product-configuration would be lost. And if I call the shortcutURL mentioned by you from the IPC the WDApp would be opened a second time in the window of the IPC. Additionaly this second instance of the WD App would be also a new instance with no data in it. I hope you understand what I mean.

Greetings Marco

Edited by: Marco Kröger on Nov 25, 2008 2:48 PM

Former Member
0 Kudos

No Marco, this works. I have implemented plenty of scenarios like that. Don't you know the resume plug?

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/102ed591-62a6-2910-94ac-e6038ef7...

Former Member
0 Kudos

Thank you Karsten,

no didn't know it. I'll work through your linkd document, try it and write again when done.

Greetings Marco

Former Member
0 Kudos

Hello again Karsten,

I've read through the Resume-Plug thing and I think this could work. But I still have a fiew questions. First: I think the whole Application (WD App + IPC) needs to run in one single URL IView because if i call the IPC in the URL IView I only could navigate back to the application in the same URL-Iview, and then I would have the Application in a IView and the Application again in the URL IView. Is this right?

And I also think you mentioned the thing with the URL shortcut bacause of this problem. Now I tried to go to the application via URL. I used the following URL:

http://skoll.sybit.de:50000/irj/portal/index.html?navigationtarget=pcd://portal_content/com.sybit.sy...

The positive: With this I can navigate to my application

The negative: I have also the Portal header again. Means the Top-Navigation is displayed twice

Could you please describe the thing with the URL-Shortcut more? And will I be able to raise events with given parameters on this way?

Thank you in advance!

Marco

Former Member
0 Kudos

Hi.

"First: I think the whole Application (WD App + IPC) needs to run in one single URL IView because if i call the IPC in the URL IView I only could navigate back to the application in the same URL-Iview, and then I would have the Application in a IView and the Application again in the URL IView. Is this right?"

No, suspend/resume only works on Web Dynpro proxy pages. Imagine a role with two pages, one is your Web Dynpro page, the second is containing an AppIntegrator iView with your IPC.

When calling the IPC from your WD, you trigger a portal navigation.

According the URL, this is what I meant:

http://help.sap.com/saphelp_nw70/helpdata/DE/97/b0ef8b24a64ae884f0ab246e54cae5/frameset.htm

So referring to the example, you point your quick link to the Web Dynpro page.

I'm not 100% sure, but I think when using the NavigationTarget parameter, a redirect would take place and your request parameters get lost.

If your TLN is displayed twice I think you just have to set the target of your request to _top.

Cheers, Karsten

Former Member
0 Kudos

Hello again,

i tried this quick link thing, and if i use the quick linkin my internet explorer i get to the corresponding application. But if my IPC opens this URL the whole portal is shown in the URL IView of the IPC (Weather I set target to _top or not. No difference.) and also the main-page of the portal is shown and not the application. Anyway, a suggestion would be that I use the URL Iview and not the Application Integrator IView. But in fact if I want to add a new IView there is no "Application Integrator IView" in the list. (Im using the portal of CE 7.1). Now I found this blog:

But on the there mentioned destination no Application Integrator can be found. Ok, the BLog is from 2005.. Any further ideas? And, Karsten, would you mind answering me by email? In german? I think this would be much more relaxed for both of us

My mail: marco.kroeger(at)sybit.de

Greetings, Marco

Former Member
0 Kudos

Mail sent.

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Marco,

the IFrame-UI-element was deprecated for technical reasons in NW CE 7.10. But in SAP NetWeaver CE 7.11 EhP1 we made some important improvement named "Stateful IFrame". A stateful IFrame does not refresh on every action-roundtrip triggered by the client:

Introduced IFrame lifecycle concept to persist or to "keep alive" the last navigated state of an IFrame so that it gets no set to its initial state with a page refresh:

  • Added IFrame UI Element property lifecycle of type WDIFrameLifecycle to avoid IFrame reloading in every roundtrip. From JavaDoc ...

  • Introduced new lifecycle management for IFrames. Depending on the lifeCycle property of the IFrame UI element the content of the IFrame is loaded with each roundtrip (lifeCycle == WDIFrameLifeCycle.ROUNDTRIP) or is kept alive as long as the UI element is alive (lifeCycle == WDIFrameLifeCycle.UIELEMENT). By default the lifeCycle attribute is set to WDIFrameLifeCycle.ROUNDTRIP because of compatibility reasons.

  • Introduced different IFrame lifecycles with enumeration class WDIFrameLifecycle

    • ROUNDTRIP: IFrame is recreated on client every time it is rendered by the browser that means it will be recreated with each roundtrip.

    • UIELEMENT: IFrame is created once and it is kept alive as long as IFrame UI element is alive.

The IFrame-2-Web-Dynpro-Controller communication is based on using the EPCF (Enterprise Portal Client Framework) together with the WDPortalEventing-API. But as far as I know there is no material existing yet, which describes this solution in-depth from end2end.

Regards, Bertram