Skip to Content

Execute "History Back" automatically after order is saved

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2012 at 10:31 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.