Hi Abdul,
You need to use breadcrumbs for this. First, you have to code in WD_DESTROY of your View here
do the following coding
RAISE EVENT history_trigger.
CALL METHOD super->wd_destroy.
Now Do coding in State_store and State_restore method, These two Methods are called only if you do History Trigger in WD_DESTROY, While navigating to a new view State_store is called and While coming back State_restore is called
method IF_BSP_WD_HISTORY_STATE~STATE_STORE.
DATA:
lr_ent TYPE REF TO cl_crm_bol_dquery_service.
* Before Navigating to next pageStore the search criteria into state container
lr_ent ?= me->search->collection_wrapper->get_first( ).
IF lr_ent IS BOUND.
state_container->add_item( im_name = 'SearchView'
im_value = lr_ent ).
ENDIF.
endmethod.
After State_store is Done, we need to Restore it, for this do coding in STATE_RESTORE
method IF_BSP_WD_HISTORY_STATE~STATE_RESTORE.
DATA:
l_ref_ent TYPE REF TO cl_crm_bol_dquery_service.
* Get previously stored data from state container
state_container->get_item( EXPORTING im_name = 'SearchView'
IMPORTING ex_value = l_ref_ent
EXCEPTIONS OTHERS = 0 ).
IF l_ref_ent IS BOUND.
* add it to the node
me->search->collection_wrapper->add( iv_entity = l_ref_ent
iv_set_focus = abap_true ).
ENDIF.
endmethod.
Thanks and Regards
Pratheek