cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh BOL Buffer

Former Member
0 Kudos

I'm currently using non-bol ways (ex. order maintain function modules) to update data in the object buffer. Obviously this has caused the object buffer and respective bol object to be out of sync :(((

Is there a way to programmatically to refresh the BOL object so that it has the latest data?

I have already tried CL_CRM_BOL_CORE's reread_entity method without much luck?

Has someone done this before?

Cheers

Kishan.

Accepted Solutions (1)

Accepted Solutions (1)

arunprakash_karuppanan
Active Contributor
0 Kudos

Hi BBT team,

I have encountered this problem myself. However my solution is not very 'elegant'. The core_modify method is the one responsible for syncing the BOL buffer with the API buffer. The catch is that it will attempt a sync only if there is a delta change registered in the BOL layer ( MY_MANAGER_ENTRY attribute of entities ). If you deal with the API layer directly, the changes will not be recorded in BOL layer and hance even if you call the method, it will do nothing. So, you create a necessity. In my case, I tried to create a dummy entity in the BOL layer and deleted it and called the core_modify method. This caused the sync to happen. Hope this helps.

Regards,

Arun Prakash

CarstenKasper
Active Contributor
0 Kudos

I noticed a flag MODE in the method cl_crm_bol_entity->get_related_entities(). This method is usually called in the ON_NEW_FOCUS() methods of the context nodes. Maybe you can try setting it to by_passing_buffer or short B and call whereever you need the sync.

I have not tried this myself, hope it works.

cheers Carsten

Former Member
0 Kudos

Carsten,

I tried using that earlier with no luck. However I have observed that this bypassing buffer only works if the update coding takes place before the SETTER methods.

Former Member
0 Kudos

Hi All.

Even im facing the same issue. The BYPASS_BUFFER also doesnot work. Arun can you please explain a little more when you say that you created a dummy entity in BOL Layer and deleted it.

Thanks,

Karthik

Former Member
0 Kudos

To create a dummy BOL entity a LOCK has to be established on the entity, if not BOL will try to establish the lock. By default if LOCK is tried to establish or in other words if the mode of the BOL is changed from display to edit it is going to refresh automatically. So if we try to introduce the delta change the BOL changes to edit mode.

The question is to sync the buffer data without changing the BOL mode.

Please correct me if im wrong.

The buffer can be cleared using CL_CRM_BOL_CORe->RESET( ) method, which could be a little risky because it clears all the buffer data so there is chance of losing unsaved data and breadcrumbs.

Thanks,

Karthik

Answers (1)

Answers (1)

former_member813607
Contributor
0 Kudos

Hi BBT Team,

May be you can try this, get the collection of the context and use clear_collection method. if it doesnt works use a blanc collection in the set_collection method.

Regards, Sudeep..