cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Genil handler class for a premise object while saving a premise.

former_member563396
Discoverer
0 Kudos

Hi experts

I am facing trouble in getting the premise id while saving a premise in a connection object in SAP CRM EHP4. Can I be helped with the Genil Handler class for premise.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member563396
Discoverer
0 Kudos

Hi Andre

We are having issue with premise id being generated and reflected in the view, where it is being displayed. we raised an OSS incident 405606.

To which SAP replied;

The root cause for this behavior is the following:

You are handling the save logic in your own Z coding, class ZL_IUICOBJ_SOTOOLBAR_IMPL. In the method EH_ONSAVE of this class, the coding performs the save of the entity, but does not refresh the data for the premise. You have to reread the premise entity bypassing the buffer after you did the saving. I would propose lines 173 following for this action (premise entity is stored in local variable entity). Once the premise entity is reread with the correct data there, it will also be displayed in the UI.

I tried handling it by the code snippet written below;

DATA:

lr_core TYPE REF TO cl_crm_bol_core,

lr_tx TYPE REF TO if_bol_transaction_context.

lr_core = cl_crm_bol_core=>get_instance( ).

IF lr_core IS BOUND. lr_tx = lr_core->get_transaction( ).

IF lr_tx IS BOUND.

lr_tx->revert( ).

ENDIF.

ENDIF.

entity->reread( ).

But the code is not working for me. So can this be achieved by calling the genil handler class.

anborck
Participant
0 Kudos

If you specify your question in detail, I might be able to help you...