cancel
Showing results for 
Search instead for 
Did you mean: 

Generating an external window from POWL

Former Member
0 Kudos

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

deepakkumar
Discoverer
0 Kudos

unable to see any link for the registration .

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hello Vinod,

In which release you are,

There is option of simple object editing but thats is fron 7.01 release.

Best reagrd,

Rohit

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Saurav,

I am not using any web dynpro application for my POWL. I will directly run the POWL using the URL

Regards,

Vinod

Former Member
0 Kudos

hi,

In feeder, you should have interface IF_POWL_FEEDER_EXT,

then IF_POWL_FEEDER_EXT~GET_UI_PERIPHERALS method give the component which has implementation for popup.

tn the handle action, you will have todo e_portal_action-lanuch_editor = X.

Best regards,

Rohit

Former Member
0 Kudos

hi,

In feeder, you should have interface IF_POWL_FEEDER_EXT,

then IF_POWL_FEEDER_EXT~GET_UI_PERIPHERALS method give the component which has implementation for popup.

tn the handle action, you will have todo e_portal_action-lanuch_editor = X.

Best regards,

Rohit

Former Member
0 Kudos

Hi Rohit,

I didnt find the interface that you have mentioned. Can you give me some more details. Thanks in Advance

Regards,

Vinod

Former Member
0 Kudos

Hello Vinod,

In which release you are?

it is avaible from 7.01 release.

best regards,

Rohit

Former Member
0 Kudos

Hi Rohit,

Sorry for the late reply. We are working on 7.0 version. We have changed that requirement but if someone knows the answer kindly let us know.

Thanks,

Vinod