on 11-30-2009 9:25 AM
Hi experts,
I need to create a external window on click of an action in POWL.
I have a web dynpro application called "ywd_vendor_empanelment1". I need to generate an external window for this application.
I have done a powl with an action button called 'Display'. On click of the display button , i want 'ywd_vendor_empanelment1' to appear as a pop up.
Regards,
Vinod
In feeder class:
Method: IF_POWL_FEEDER~GET_FIELD_CATALOG
*** AUFNR
CLEAR: ls_fieldcat.
ls_fieldcat-colid = 'AUFNR'. "#EC NOTEXT
ls_fieldcat-display_type = me->c_la.
ls_fieldcat-text_ref = 'AUFNR'. "#EC NOTEXT
lv_colpos = lv_colpos + 1.
ls_fieldcat-colpos = lv_colpos.
ls_fieldcat-header_by_ddic = me->c_x.
ls_fieldcat-h_align = me->c_allign_left.
ls_fieldcat-allow_sort = me->c_x.
ls_fieldcat-col_visible = me->c_x.
ls_fieldcat-enabled = me->c_x.
ls_fieldcat-editable = me->c_x.
ls_fieldcat-allow_filter = me->c_x.
ls_fieldcat-allow_sort = me->c_x.
* ls_fieldcat-width = 12.
INSERT ls_fieldcat INTO TABLE me->mt_fieldcat.
Method: IF_POWL_FEEDER~HANDLE_ACTION
FIELD-SYMBOLS: <fs_result> LIKE LINE OF me->mt_result.
DATA: lv_hostname TYPE string,
lv_port TYPE string.
DATA: lv_weburl TYPE string,
lv_launchurl TYPE string.
DATA: ls_param TYPE powl_namevalue_sty.
CASE i_actionid.
WHEN 'POWL_ALV_CELL_ACTION'.
READ TABLE c_result_tab ASSIGNING <fs_result> INDEX i_action_index.
CHECK <fs_result> IS ASSIGNED.
CALL FUNCTION 'TH_GET_VIRT_HOST_DATA'
EXPORTING
protocol = 1
virt_idx = 0
IMPORTING
hostname = lv_hostname
port = lv_port.
CONCATENATE 'http://' lv_hostname ':' lv_port '/sap/bc/gui/sap/its/webgui/!?~transaction=' INTO lv_weburl.
CONCATENATE lv_weburl 'COR2&CAUFVD-AUFNR=' <fs_result>-aufnr '&~OKCODE=/00' INTO lv_launchurl.
CLEAR: ls_param.
ls_param-key = 'LINK_COR2'.
ls_param-value = lv_launchurl.
APPEND ls_param TO e_portal_actions-parameters.
e_portal_actions-fire_wdevent = abap_true.
ENDCASE.
Create event handler for event: POWL_FOLLOW_UP in webdynpro application:
DATA: lo_api_component TYPE REF TO if_wd_component,
lo_window_manager TYPE REF TO if_wd_window_manager,
lo_window TYPE REF TO if_wd_window,
ls_param TYPE powl_namevalue_sty,
lv_launchurl TYPE string.
READ TABLE event_parameters INTO ls_param WITH KEY key = 'LINK_COR2'.
IF sy-subrc EQ 0.
lo_api_component = wd_this->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lv_launchurl = ls_param-value.
lo_window = lo_window_manager->create_external_window( url = lv_launchurl title = 'Change order' ).
lo_window->open( ).
ENDIF.
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vinod,
In which release you are,
There is option of simple object editing but thats is fron 7.01 release.
Best reagrd,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can also consider use of Launchpad Customizing to launch application from POWL action.
How lanchpad is configured refer to [FPM Cookbook|http://www.scribd.com/doc/12612276/FPMCookbook21]
section 4 - navigatio customizing.
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Get the action Id of Display button in Handle Action.
2. Fire the event from Handle Action using :
e_portal_actions-fire_wdevent = abap_true. .
3. In the event handler of event POWL_FOLLOW_UP, in webdynpro component,
call the external window using this code :
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = 'http://www.google.co.in/'
MODAL = ABAP_FALSE
HAS_MENUBAR = ABAP_TRUE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_TRUE
HAS_STATUSBAR = ABAP_TRUE
HAS_TOOLBAR = ABAP_TRUE
HAS_LOCATION = ABAP_TRUE
RECEIVING
WINDOW = lo_window.lo_window->open( ).
I hope it is clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.