cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic PopUp with File_upload

Former Member
0 Kudos

Dear Experts,

Greetings.

For an Enhancement in Standard SNC application, I need to trigger Dynamic PopUp with File_upload element and the data need to be taken into an internal table.

Please suggest.

Thanks and Regards

Siva Mandapudi.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Siva,

Write the code on Action from which you want to open popup with File upload UI.

write this code on that Action.

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.

data lt_buttons        type wdr_popup_button_list.

data ls_canc_action    type wdr_popup_button_action.

lo_api_component           = wd_comp_controller->wd_get_api( ).

lo_window_manager          = lo_api_component->get_window_manager( ).

* create the cancel icon, but without any action handler

ls_canc_action-action_name = '*'.

* Simple example, see docu of method create_and_open_popup for details

lt_buttons                 = lo_window_manager->get_buttons_ok(

*    default_button       = if_wd_window=>co_button_ok

  ).

lo_window                  = lo_window_manager->CREATE_WINDOW(

*    MODAL                = ABAP_TRUE

     WINDOW_NAME          = 'POPUP_WINDOW'   This should be the name of window u created                                                                                  and assigned the view in which ur fileupload ui                                                                                   is there.

     TITLE                = 'Any'

*    CLOSE_BUTTON         = ABAP_TRUE

*    BUTTON_KIND          =

*    MESSAGE_TYPE         = IF_WD_WINDOW=>CO_MSG_TYPE_NONE

*    CLOSE_IN_ANY_CASE    = ABAP_TRUE

*    MESSAGE_DISPLAY_MODE =

*    DEFAULT_BUTTON       =

*    IS_RESIZABLE         = ABAP_TRUE

).

lo_window->OPEN( ).

1) Create a view  and add fileupload UI and also create a window assign the new view into this window.

For more see the WDR_TEST_EVENTS component in webdynpro.

Regards

Madhukiran M.