04-14-2014 7:39 AM
Hello,
we have a small table which continuously being read and seldom modified. Based on this assumptions we would like to fully buffer this table, using the standard SAP buffering.
Our problem comes with the synchronization mechanism. In this case the changes must be propagated to all instances immediately and not with the regular interval defined in rdisp/bufreftime. So once the change is done, the buffer for that table must be invalidated.
Since I know from where is this table modified, I would like to know if there is an ABAP FM or mechanism to trigger the invalidation of an specific table buffer. I have found FM SBUF_GENERIC_RESET, but I would appreciate any previous experience with this, or any other module, to perform this task.
Many thanks in advance.
Javier
04-14-2014 1:07 PM
Do not worry, SAP themselves use this FM so a simple
DATA: lt_server_list TYPE TABLE OF msxxlist.
DATA: lv_message type c length 100.
FIELD-SYMBOLS: <server> TYPE msxxlist.
* get list of all application servers
CALL FUNCTION 'TH_SERVER_LIST'
TABLES
list = lt_server_list
EXCEPTIONS
no_server_list = 1
OTHERS = 2.
* immediately synchronize the buffers
LOOP AT lt_server_list ASSIGNING <server>.
CALL FUNCTION 'SBUF_GENERIC_RESET'
DESTINATION <server>-name
EXPORTING
tabname = 'ZZZZZZZZZZZZ' " put your table name here
sync = 'X'
EXCEPTIONS
system_failure = 1 MESSAGE lv_message
communication_failure = 2 MESSAGE lv_message
c_func_error = 3
OTHERS = 4.
ENDLOOP.
will do the job.
Regards,
Raymond