Hi Alok,
Thanks for your reply..I guess i am missing very small point here..I hope you will help me with this.
If I create transaction entities and populate in internal table like below.
DATA: lv_entity1 TYPE REF TO cl_crm_bol_entity,
lv_entity2 TYPE REF TO cl_crm_bol_entity,
lv_tx_ctxt TYPE REF TO if_bol_transaction_context.
...
lv_tx_ctxt = lv_entity1->get_transaction( ).
my_tx_context->add_tx_context( lv_tx_ctxt ).
lv_tx_ctxt = lv_entity2->get_transaction( ).
my_tx_context->add_tx_context( lv_tx_ctxt ).
How I will know how many time i have to add the entities to internal table. and how to revert back only particular entity like 'CURRENTBT'.
Currently i am using below code..
lr_bol_core ?= cl_crm_bol_core=>get_instance( ).
lr_transaction ?= lr_bol_core->get_transaction( ).
IF lr_transaction->check_save_needed( ) = abap_true. "Check if any unsaved object
lr_transaction->revert( ). "Revert all if not saved
ENDIF.
Here i am trying to revert back only CURRENTBT entity value. But it's reverting back all the transaction like Interaction record data as well.
Please find the attached pic for the related transactions it's reverting back.
Thanks,
Sanjana.