cancel
Showing results for 
Search instead for 
Did you mean: 

Don't save all transaction in EH_ONFORWARDCALL

Former Member
0 Kudos

Hi,

In standard SAP, the end button on WEBIc save all object. I want to eject just some object of this save.

I enhance the EH_ONFOWARD_CALL like :

  DATA: lr_core           TYPE REF TO cl_crm_bol_core,       

             lr_transx         TYPE REF TO if_bol_transaction_context.

lr_core ?= cl_crm_bol_core=>get_instance( ).

lr_transx ?= lr_core->get_transaction( ).

Can you help me to loop on the transaction_tab attribut to check the type of objet (BTOrder)?

Thank's a lot

Carole

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Jotsaroop,

Your solution is good but with the DO_NOT_SAVE exception, the end process is stopped. The system stay in the Order in modification. My process call the method ON_INTERACTION_END_REQUEST of class CL_CRM_IC_INTERACTION_MGR_UIU and this method check if save is possible:

if me->is_bol_save_possible( ) = abap_true and

   me->registry_end_request->process_callbacks( ) = no_veto_raised and

   cl_crm_uiu_bt_partner_popup=>get_quick_create_status( ) = abap_false.

    me->process_interaction_end( ).

endif.

And with exception DO_NOT_SAVE, the condition is false so the end process in process_interaction_end (event InteractionEnded and InteractionAfterEnd) doesn't call! And I want that if they are BtOrder process type 1 (for exemple) in modification, do nothing, don't save and quit. So I continue to search `:)

Best Regards

Carole

jotsaroop_singh
Active Participant
0 Kudos

Hi Carole,

Nice to know that you have figured out your solution.

Regards,

Jotsaroop Singh

Former Member
0 Kudos

Thank's a lot for your solution,

But in my case, I don't want save BTOrder when I come from the END button of WEBIc, and save when I come from SAVE event. That why I search a solution in the event EH_ONFOWARD_CALL of CRMCMP_IC_FRAME/HiddenView.

Regards

Carole

jotsaroop_singh
Active Participant
0 Kudos

Hi Carole,

I do not have much expeience with interaction centre. However your requirement can be acheived by setting a static variable at the end_button event. In order_save badi check If that variable is set.

If variable is set that means it is the end event who has triggered it and then you can raise the exception  otherwise not.

Note: Please do not forgot to clear the static variable after you read it in you condition clause.

There may be better ways to acheive this however if you donot get any other solution then you always have the one

Regards,

Jotsaroop Singh

former_member188098
Active Contributor
0 Kudos

hi Carole,

Use order_save badi to implement any kind of validation on transactions you dont want to save as also mentioned by Jotsaroop .it is the right and efficent way to put validations on transactions.

Regards

jotsaroop_singh
Active Participant
0 Kudos

Hi Carole,

Why do you want to do so. I would suggest you to check the data in order_save badi rather than trying to play with transaction_context. In order_save badi you can check for the object type and decide for youself wheather you want to save the record or not.

If you do not want to save raise the exception "DO_NOT_SAVE".

In Case, if you still want to use transaction_context. Please share us the component and view details, we will check and try to help you.

Regards,

Jotsaroop Singh