cancel
Showing results for 
Search instead for 
Did you mean: 

Execute "History Back" automatically after order is saved

juergenbaur
Active Participant
0 Kudos

Hi Guy's,

I want to execute "history back" automatically after button save is pressed and order is saved sucessfully.

Where do I have to set a break-point to debug "History Back"?

best regards

Jürgen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The methods under Breadcrumbs and Messages are related to history state of the view.

Place a break point in method IF_BSP_WD_HISTORY_STATE_DESCR~GET_STATE_DESCRIPTION .

Regards,

Nithish

juergenbaur
Active Participant
0 Kudos

OK,

I found the solution:

Coding for execute BACK after SAVE:

data: lr_core type ref to cl_crm_bol_core,

lr_entity type ref to cl_crm_bol_entity,

lr_tx type ref to if_bol_transaction_context.

*-------save

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

lr_tx ?= lr_entity->get_transaction( ).

if lr_tx is not bound.

lr_core = cl_crm_bol_core=>get_instance( ).

lr_tx = lr_core->begin_transaction( ).

else.

if lr_tx->check_save_possible( ) = abap_true.

check lr_tx->save( ) eq abap_true.

lr_tx->commit( ).

endif.

endif.

me->view_group_context->reset( ).

*-------go back automatically.

data: history type ref to if_bsp_wd_history_manager_disp.

history = view_manager->get_history_manager_display( ).

call method history->go_back.

Edited by: juergen71 on Feb 6, 2012 11:00 AM

Edited by: juergen71 on Feb 6, 2012 11:02 AM

Answers (0)