cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Work Manager: Force user's complex table refresh

Marçal_Oliveras
Active Contributor
0 Kudos

Hi,

I would like to know if there is a way to completely invalidate a user's complex table in the Agentry client.

My real scenario is that the user can be assigned to a different planning plant at any point of time, after doing that the Functional Location complex table (and others like Equipment) should be completely refreshed. The problem is that the exchange mechanism does not work in this situation, because FL didn't change in the back end, is the filter condition what changed.

So I would like to trigger some kind of event in ABAP when user's planning plant is modified, to force a list of complex tables to be refreshed.

Any idea on how to do that?

Thanks in advance for your input.

Marçal

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Marcal,

You have to either create a new BAPI or enhance product BAPI  /SYCLO/CORE_MDW_PARAMETER_GET.

The BAPI returns ET_PARAMETER_LIST table which contains TABLE_REFRESH parameter that you configured in config panel for the CT.

Now all you have to do is when the User Profile Parameter for Planning Plant has changed in SAP you override the content of the ET_PARAMETER_LIST and update TABLE_REFRESH=0 (i.e. refresh table). Agentry will automatically reset data in CT on client.

To figure out if the User Profile Parameter has been changed since last transmit

1) you can send a transaction with UserProfile Object from Agentry - with subAction in Transmit Action

2) Maintain a Z-table to keep track of old values and update during the transmit.

Instead of hardcoding the table names you can maintain a list in Config Panel Client Globals and use that here. That way it is completely configurable going forward.

If you plan to create Z-BAPI then you must change the JavaBE,ini to invoke the Z-BAPI instead of Product BAPI.

Hope this helps.

thanks,

Chandra

Marçal_Oliveras
Active Contributor
0 Kudos

Hi Chandra,

Awesome answer! I will try to implement an enhancement to /SYCLO/CORE_MDW_PARAMETER_GET

There is only one more thing to consider. This function module is called several times during the synchronization process. My break point stopped 7 times, and I don't understand exactly why.

It is important to know this, because once my enhancement is executed forcing the refresh, I should update the table that indicates the user planning plant was changed. I'm not sure how to identify which of these 7 calls is the one that Agentry client uses to store the TABLE_REFRESH value yet.

0 Kudos

I would recommend to send ALL CT override values in EVERY call during the FIRST Transmit after change of User Profile. The subsequent Transmit should not have override parameter and should be normal.

Alternatively you have to pass the value in IS_BAPI_INPUT (DO_ID) to figure out and only override specific Table.

thanks

Chandra

Marçal_Oliveras
Active Contributor
0 Kudos

The problem is that I don't know when is the last call of the first transmit and when are subsequents. But I guess I can set some flag during the transmit action to identify that.

Thanks again.

Answers (0)