cancel
Showing results for 
Search instead for 
Did you mean: 

Display pdf in a popup window

Former Member
0 Kudos

Hello @all,

i want to convert a smartform to pdf and show the pdf in an second window or in a popup. When i click on a button in the application, a new window with the pdf should be open. Is this possible to show the pdf in a second window or in a popup. Can anybody help me?

Accepted Solutions (1)

Accepted Solutions (1)

saket_abhyankar
Active Participant
0 Kudos

Yes, It is possible to convert smartform to pdf and display it the in another popup.

Please follow the link for same:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6...

Regards,

Saket.

Former Member
0 Kudos

I know how to convert the smartforms to PDF in WDYA . My question is, how i can open a the popup with pdf?

saket_abhyankar
Active Participant
0 Kudos

I think you need to create one window and display pdf in it.

Try following code:

1) Create one Window

2) Create the view to be displayed in popup (add pdf in this view)

3) Embed the view created in above step in the window created in first step.

4) Create following attribute in the Component controller:

I) Z_WINDOW type ref to IF_WD_WINDOW

Mark the attribute as u2018Publicu2019.

Code to open Window in Popup

DATA: api_component TYPE REF TO if_wd_component,

l_window_manager TYPE REF TO if_wd_window_manager.

api_component = wd_comp_controller->wd_get_api( ).

l_window_manager = api_component->get_window_manager( ).

  • Create window and pass parameters

CALL METHOD l_window_manager->create_window

EXPORTING

modal = abap_true

window_name = 'ZC_SO_ALV'

title = 'Test Popup'

close_button = abap_true

RECEIVING

window = wd_comp_controller->z_window.

wd_comp_controller->z_window->open( ).

Regards,

Saket.

Answers (0)