cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with check_save_needed( ) BOL

Former Member
0 Kudos
391

Hi,

We are facing a weird issue with the following code in the method IF_ICCMP_CUCOBT_BOL_TRANS~SAVE of class CL_ICCMP_CUCOBT_IMPL.

Line 61 :

TRY.

* preparation of save

       lr_transaction = lr_entity->get_transaction( ).

       IF lr_transaction->check_save_needed( ) EQ abap_true OR me->gv_save_needed EQ abap_true.

Whenever we click on save in WEB UI after some change, the service order is getting saved. However after the successful save if we click on save again the above code is getting through and save is happening again though we haven't made any change.

The above method is being called when we click on save button. I could trace one difference in our system that this behavior is reproducible for all service orders which doesn't have an Employee Responsible partner value in the partner's tab.

If Emp Res partner is maintained in the partner tab then after a successful save the above code gives false if we click save again without any change.

I have ignored all the custom component enhancement by setting the WCF_IGNORE_ENHANCEMT to confirm that this issue is not because of some custom BOL codes. After ignoring the enhancements also the same behavior exists in standard view.


Please provide your ideas to find the root cause.


If this issue could be because of some BADI implementation, please provide some BADI details that i should check. I have checked ORDER_SAVE, CRM_ORDER_STATUS, COM_PARTNER_BADI, CRM_PARTNER_BADI, CRM_ORDERADM_H_BADI.

Thanks,

Karthik

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karthik,


Sorry for the late response. Please check if you have used any of the lr_entity->set_property or any equivalent code like set_properties etc in do_prepare_output() do_validate_input() or in any setters where there is no check of  <nval> <> <oval>.

I ask you this because whenever we set any value using set_property or set_properties (even if old and new value are same) check_save_needed( ) will return true.

navn_metts
Active Participant
0 Kudos

Hi,

can you check like this.

Perform the save operation once and come out of the service order. And check if you are getting any popup to save the service order again.

Br,

Navn

Former Member
0 Kudos

Hi,

Thanks for your reply. We have data loss pop-up custom coding in back button which uses the same IF lr_transaction->check_save_needed( ) EQ abap_true logic. So when i perform save and click on back i get data loss pop-up.

If i ignore enhancement i am not getting any pop-up since data loss pop-up is being implemented.

regards,

Karthik

navn_metts
Active Participant
0 Kudos

Hi,

Then there are 2 possibilities in this case.

1. Either your transaction is not getting saved properly.

in this case check the order_save badi method check_before_save method for exception  raise do_not_save. if this exception is raised then the transaction will not be saved.

2. If the above case is not happening, then keep a break point in crm_order_maintain function module and check is it triggering. If this is triggered check the data which is being passed in this function module. why and where the data is changed.

Kindly let me know if this helps you.

Br,

Navn