cancel
Showing results for 
Search instead for 
Did you mean: 

Clear popup data

Former Member
0 Kudos

Hi There,

I've opened a popup for customer with some information in webui, if I click on cancel and select new customer with different values the popup data is populated with the old customer values in the popup text, can you please suggest me how to flush/clear popup data.

Regards

Krishna

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Set initial value to the entity in the wd_create_context method of the view that you open in the popup. So whenever the view loads as a popup, it will have the initial entries i.e. empty.

Refer the below code:

METHOD wd_create_context.

     CALL METHOD super->wd_create_context.

     DATA: ls_stru TYPE zmo_facilty_mas,  ""structure by which context node was made

                lr_entity TYPE REF TO cl_bsp_wd_value_node.

    lr_entity ?= me->typed_context->zfacility->collection_wrapper->get_current( ).

     IF lr_entity IS BOUND.

       lr_entity->set_properties( is_attributes = ls_stru ).

     ENDIF.


Endmethod.


Hope this helps.


former_member267851
Participant
0 Kudos


Hi Krishna,

I am glad that my previous answer helps u.

I want to know , is this popup linked with custom component or a standard one.

What ever the case u need to write code for clear in on close event of that popup.

Regards

Alok

Former Member
0 Kudos

Hi Alok,

First of all thanks for you helpful answer, can you please give the code details as you said which is to be written in the close event of the popup.

Regrads,

Krishna

former_member267851
Participant
0 Kudos

Here is the code.

This is the code for show pop up as custom component view .

CALL METHOD comp_controller->window_manager->CREATE_POPUP

  EXPORTING

    IV_INTERFACE_VIEW_NAME = 'ZCUSH_POPUP/MainWindow'

    IV_USAGE_NAME          = 'SH_POPUP'

    IV_TITLE               = 'SEARCH  CODE'

  RECEIVING

    RV_RESULT              = GR_CUSTOM_POPUP
.
CALL METHOD GR_CUSTOM_POPUP->SET_ON_CLOSE_EVENT

            EXPORTING

             iv_view = me

             IV_EVENT_NAME = 'CUSTOM_POPUP_CLOSED'
                                       .
CALL METHOD GR_CUSTOM_POPUP->OPEN
.

Create event hander in .impl class and clear that entity .

RaviTejaGuptha
Active Participant
0 Kudos

Hi Krishna,

We can use DO_CLEANUP_CONTEXT method, check in the debugging mode whether is it getting triggered according to your requirement or not.

Thanks,

Ravi

Former Member
0 Kudos

Hi Ravi,

Can you please give some more details on the same and how to do procedure if possible with the code lines.

This is an urgent and much awaited requirement.

Thanks,

Krishna

RaviTejaGuptha
Active Participant
0 Kudos

Hi Krishna,

In the above method get the node reference and use the method clear.

Thanks,

Ravi