cancel
Showing results for 
Search instead for 
Did you mean: 

Can we open a Pop Up Window Inside Loop Webdynpro ABAP

Former Member
0 Kudos

HI,

Can we open Open UP Pop up window Inside Loop  , It is giving me runtime error. Do we have any other alternative of doing it ???

Means like for 1st entry pop up will come then for 2nd entry in loop pop up will come ..

'

Example like below :-

LOOP AT lt_node_vbak INTO ls_node_vbak.

 

     lo_api_component  = wd_comp_controller->wd_get_api( ).

     lo_window_manager = lo_api_component->get_window_manager( ).

     lo_window         = lo_window_manager->create_window(

                        window_name            = 'Z_WINDOW'

                        message_display_mode   = if_wd_window=>co_msg_display_mode_selected

                        button_kind            = if_wd_window=>co_buttons_ok

                        message_type           = if_wd_window=>co_msg_type_none

                        default_button         = if_wd_window=>co_button_ok

                        ).

     lo_window->open( ).

   ENDLOOP.

Please Suggest

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member211591
Contributor
0 Kudos

Hi Ankesh,

you could expand your context node corresponding to lt_node_vbak by field "status", which is initially initial. ( status can have following entries: initial = "not considered yet", X = "continue", C = "cancel").

LOOP AT lt_node_vbak INTO ls_node_vbak.

  if ls_node_vbak-status is initial.

     lo_api_component  = wd_comp_controller->wd_get_api( ).

     lo_window_manager = lo_api_component->get_window_manager( ).

     lo_window         = lo_window_manager->create_window(

                        window_name            = 'Z_WINDOW'

                        message_display_mode   = if_wd_window=>co_msg_display_mode_selected

                        button_kind            = if_wd_window=>co_buttons_ok

                        message_type           = if_wd_window=>co_msg_type_none

                        default_button         = if_wd_window=>co_button_ok

                        ).

     lo_window->open( ).

     exit.

elseif ls_node_vbak-status = 'X'.

     continue.

elseif ls_node_vbak-status = 'C'.

     exit.

endif.

ENDLOOP.

To make this work you need to enter the selected status within the eventhandlers of your buttons (for the first entry of your node which has status initial.).

BR

ismail

amy_king
Active Contributor
0 Kudos

Hi Ankesh,

It isn't possible to create a popup within a loop because of how the web dynpro phase model works.

The popup isn't displayed until the phase model completes, in which case only the popup from the final loop iteration would be displayed.

Cheers,

Amy

Former Member
0 Kudos

Thanks Amy , the query continues :-

Is there any functionality like POP UP that I can use withing the loop . In that pop actually I am asking with the user either Yes or No , on Yes it will continue the processing and on No it will leave the record.

One option I have is to create check-box as another field in the table and on clicking on check box i will do my processing but the client design says they need POP UP or similar kind of functionality...

Please suggest ??

Thanks

Ankesh Jindal

amy_king
Active Contributor
0 Kudos

Hi Ankesh,

One option may be to use either a MultiPane or RowRepeater inside the one popup. The MultiPane or RowRepeater could have as many instances of a Yes/No question as you need, but it would be displayed within a single popup. For each instance of the question, the user could indicate Yes/No maybe with a radiobutton, checkbox or ToggleButton and there could be a single "save" or "continue" button to handle all of the user's answers at once.

Cheers,

Amy