cancel
Showing results for 
Search instead for 
Did you mean: 

Display Pop up for each entry in loop in WebUI

Former Member
0 Kudos

Hello,

My current requirement is that I have one internal table and for each entry in internal table I need to fetch some entries from different table and display that using decision_popup in WebUI.

I have added the code to display Pop up under Loop..Endloop.  System only displays Pop up for last entry.

Please guide me how can I achieve this requirement.

Thanks,

Nishad

View Entire Topic
Former Member
0 Kudos

Hi Nishad,

What coding did you do inside LOOP...ENDLOOP? can you please post that.

Former Member
0 Kudos

Hi Pratheek,

Inside Loop..Endloop I have added code to display decision popup.

Loop..

gr_dec_popup ?=

    comp_controller->window_manager->create_decision_popup ( have passed Title & Internal table )

call method gr_dec_popup->set_on_close_event

      EXPORTING

        iv_view       = me

        iv_event_name = 'POPUP_SELECT'.

*   Open the pop-up

    CALL METHOD gr_dec_popup->open.

endloop.

**EH_ONPOPUP_SELECT method contains the code for which line selected and based on that I am setting value and then Close the popup.

I am getting popup for only last internal record.

Please let me know if you need more details.

Thanks,

Nishad

Former Member
0 Kudos

Hi!

In the view controller you have to create a new attribute to store your initial internal table and an attribute for your internal table size and a counter . Then in the code where you are call the popup windows inside the loop, you have to do the following.

1. At the first run you should count your internal table entries. Store it to lv_iter_tab_size.

2. Inicialize your lv_counter with 1.

2. Then call the popup.

3. Register an event handler (LOOP_EVENT) for the pop up close.

In the EH_LOOP_EVENT create a while statement. In the while statement :

while lv_counter <> lv_iter_tab_size.

  read table lt_iter into ls_iter index lv_counter.

  lv_counter = lv_counter + 1.

gr_dec_popup ?=

    comp_controller->window_manager->create_decision_popup ( have passed Title & Internal table )

call method gr_dec_popup->set_on_close_event

      EXPORTING

        iv_view       = me

        iv_event_name = 'LOOP_EVENT'.

*   Open the pop-up

    CALL METHOD gr_dec_popup->open.

endwhile.

So do a recursive call for the LOOP_EVENT event.