ALE Change Pointers

Applications which write change documents will also try to write change pointers for ALE operations. These are log entries to remember all modified data records relevant for ALE.Most applications write change documents. These are primarily log entries in the tables CDHDR and CDPOS.

Change documents remember the modified fields made to the database by an application. They also remember the user name and the time when the modification took place.The decision whether a field modification is relevant for a change document is triggered by a flag of the modified field’s data element. You can set the flag with SE11 by modifying the data element.

For the purpose of distributing data via ALE to other systems, you may want to choose other fields, which shall be regarded relevant for triggering a distribution.Therefore R/3 introduced the concept of change pointers, which are nothing else than a second log file specially designed for writing the change pointers which are meant to trigger IDoc distribution via ALE.So the change pointers will remember the key of the document every time when a relevant field has changed.

Change pointers are then evaluated by an ABAP which calls the IDoc creation, for every modified document found in the change pointers.The Change pointers are written from the routine CHANGEDOCUMENT_CLOSE when saving the generated change document. So change pointers are automatically written when a relevant document changes.

The following function is called from within CHANGEDOCUMENT_CLOSE in order to write the change pointers.

CALL FUNCTION 'CHANGE_POINTERS_CREATE'
EXPORTING
change_document_header = cdhdr
TABLES
change_document_position = ins_cdpos.

Activation of change pointer update :

Change pointers are log entries to table BDCP which are written every time a transaction modifies certain fields. The change pointers are designed for ALE distribution and written by the function CHANGE_DOCUMENT_CLOSE.

Change pointers are written for use with ALE. There are ABAPs like RBDMIDOC which can read the change pointers and trigger an IDoc for ALE distribution.The change pointers are mainly the same as change documents. They however can be set up differently, so fields which trigger change documents are not necessarily the same that cause change pointers to be written.

In order to work with change pointers there are two steps to be performed

1) Turn on change pointer update generally

2) Decide which message types shall be included for change pointer update R3 allows to activate or deactivate the change pointer update. For this purpose it maintains a table TBDA1. The decision whether the change pointer update is active is done with a Function Ale_Component_Check

This check does nothing else than to check, if this table has an entry or not. If there is an entry in TBDA1, the ALE change pointers are generally active. If this table is empty, change pointers are turned off for everybody and everything, regardless of the other settings.

The two points read like you had the choice between turning it on generally or selectively. This is not the case: you always turn them on selectively. The switch to turn on generally is meant to activate or deactivate the whole mechanism.The change pointers which have not been processed yet, can be read with a function module.

Call Function 'CHANGE_POINTERS_READ'

The ABAP RBDMIDOC will process all open change pointers and distribute the matching IDocs.When you want to send out an IDoc unconditionally every time a transaction updates, you better use the workflow from the change documents.

RELATED POSTS

No comments :

Post a Comment