Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

How to clear in FAILED_OBJECTS from Transaction Manager

$
0
0

Hi,

 

I have a Table view. I have created a new row and saved. but it failed in Genil API SAVE class during validations. so the FAILED_OBJECTS got updated with this failed entity in Transaction Manager.

 

Here is my SAVE method event handler:

EH_ONSAVE method. 

  DATA: lr_core     TYPE REF TO cl_crm_bol_core,

             lr_tx        TYPE REF TO if_bol_transaction_context,

 

* Get Transaction:

  lr_tx  = lr_core->get_transaction( ).

 

  if lr_tx->check_save_needed( ) = abap_true.

    if lr_tx->check_save_possible( ) = abap_true.

**    Save

      lv_success = lr_tx->save( ).

**    Check success

      if lv_success = abap_true.

**       Display success message

      else.

**       Display error message

**       lr_tx->rollback( ).

      endif.

    endif.

  endif.

endmethod.

 

If there are errors in SAVE, I have corrected the validation errors and hit the SAVE button again. This time it got saved in the backed end table. But as the Transaction Manager (CL_CRM_BOL_TX_MANAGER), still has the earlier Failed object  in FAILED_OBJECTS table, Its setting SAVE Sucess flag to abap_false.

 

If I add lr_tx->rollback( ) in case of save failure, its removing the failed entry from the table.

 

Is there any alternative way to clear the FAILED_OBJECTS from Transaction Manager. Please let me know.

 

Thanks

Anji


Viewing all articles
Browse latest Browse all 4552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>