cancel
Showing results for 
Search instead for 
Did you mean: 

Print page function in dynpro

Former Member
0 Kudos

Hello.

Is it possible to implement a function in dynpro which opens the current view in a new popup window (for print).

The function should be triggerede by a simple button.

In my view thw enduser will type in data in UI elements. I would like the data also to be displayed in the pop up window which opens.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Printing is not supported in WebDynpro. If you try to create a modal window then also print will not be possible.

You can try the following. It should work but i have not tried it personally.

Say your WD Component has Window1 with View1.

create Another window Window2 with View2.

Scenario is true only if the following condition is met.

Assuming that View2 contains display only data when the window loads.

Create a iFrame in View2. The source property of iFrame type the following javascrip:window.print();

then save. Now call View2 in window2 from View1 using CreateExternalWindow() method.

Now at the time of loading the screen you will get the standard print window popup of the browser and when you say print it will do a screen print.

Remember if you load the screen and then try to call the print window on click of a button it will not work as the control will not know which window to refer to.

That is the reason i have said try with a External Window as it will be a new Browser window and the control will load the standard print popup.

Anyway try it out and let me know if that worked.

regards

Ravi

Former Member
0 Kudos

hi Ravi

could you please give me your contact number

and your mail id

thx in advance

Dhinakar

Answers (4)

Answers (4)

Former Member
0 Kudos
Former Member
0 Kudos

How to start the Print Function in webdyn pro

if anybody knows explain to me one by one

i.e from the beginning.

B'cos i want to take the print

already i posted this Q?

so for i didn't get clear idea about the print

Regards

Dhinakar

Former Member
0 Kudos

Hi.

For print a content of a node i implemented a function that creates an html based on my node content then creates a resource with the html and then opens an external window that will content this html. In the external window will have the print function of the browser or can create a link that call the window.print() javascript function.

Best Regards.

Gregory.

arun_srinivasan
Contributor
0 Kudos

hi jerry,

In the event handler of the button.To open a popup window u write the following code in that event handler.

IWDWindowInfo w=wdComponentAPI.getComponentInf().findInWindows("windowname");

IWDWindow win_obj=wdComponentAPI.getWindowManager().createWindow(win,true);

win_obj.open();

This will open the popup window.For using the same current view in that window.First u create the new window(popup window)in windows option in explorer view. In that window u embed the current view in that.

For the value enter in the popup(user data) to be transfered to main view , u use the component controller.u create value attribute in both view of same type and also in component controller. in the property tab of both view define the use of component controller in both views. map the value attribute in view to component controller attribute.

This will solve ur problem.

For more reference check this link

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on server-side eventing - 14.htm

for further reference check this link

Hope this helps u,

Regards,

Arun

Former Member
0 Kudos

Hello Jerry

Look this link

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/profile?userid=1324291">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/profile?userid=1324291</a>

BR

Evgeny

Former Member
0 Kudos

Hi Evgeny

The link is to your User Profile. Which post should I take a look at?

BR

Jerry