SAP Change Pointer Overview with Tcodes, Tables, Function and BADi

SAP ABAP

SAP Change Pointer?allows to trigger change on SAP Master Data and distribute the change with ALE ( in IDoc for example).

The SMD tool is connected to the change document interface. If the master data changes are to be distributed, the application writes a change document. The contents of this are passed to the SMD tool. The tool writes change pointers, reads the application data and creates the master IDoc.

The master IDoc is then passed to the ALE layer, which sends it to all interested systems.

The change pointer tables (BDCP und BDCPS) should be as small as possible. Use as few change pointers as possible and delete change pointers which you no longer need. *?

SAP Change Pointer Tcodes

Use these SAP Tcodes if you want to customize the SAP Change Document :

  • BD61:?Activate Change Pointers – Generally
  • BD50 :?Activate Change Ptrs for Message Type
    • To activate Change tracking on Material, set MATMAS as active
  • BD51: Maintain function modules (inbound)
    • For Material, Set IDOC_INPUT_MATMAS01
  • BD52:?Activate change pointer per SAP Change Documen

SAP Change Pointer Tables

SAP Change Document Tables are:

  • BDCP: SAP?Change pointer Table
    • The key is?CPIDENT:?Change pointer ID
    • The fields of the SAP Change Pointer table is:
      • CPIDENT Change pointer ID
      • TABNAME Table Name
      • TABKEY Table Key for CDPOS in Character 254
      • FLDNAME Field Name
      • CRETIME Creation time of a change pointer
      • ACTTIME Activation time of a change pointer
      • USRNAME User name of the person responsible in change document
      • CDOBJCL Object class
      • CDOBJID Object value
      • CDCHGNO Document change number
      • CDCHGID Change type (U, I, E, D)
  • BDCP2 (BDCPS): is the?Aggregated Change Pointers (BDCP, BDCPS) Table
    • The keys for BDCP2 table is :
      • MESTYPE:?Message Type
      • CPIDENT:?Change pointer IDd
    • It contains the same fields as above.

SAP Change Pointer Filter

In order to filter which record must trigger, the BADI?BDCP_BEFORE_WRITE can be implemented.

The Method?FILTER_BDCPV_BEFORE_WRITE is?Filterin of Change Pointers Before Writing to Database. This Method allows to remove or Add additionnal Change Pointers.

For example, if the requirement is to trigger an Idoc whenever a customer is modified ( including Address ), you can set a new line in Change Pointer table with the address.

The signature of this method is:

  • VALUE( FLT_VAL ) TYPE EDI_MESTYP
    • Message type??( For example:?ADRMAS for Customer Addres
  • CHANGE_DOCUMENT_HEADER TYPE CDHDR
    • Change document header
  • CHANGE_DOCUMENT_POSITIONS TYPE BDI_CDPOST
    • Change Document items
  • CHANGE_POINTERS TYPE BDI_BDCPVT
    • Change Pointers To Be Filtered

An example of implementation for BDCP_BEDORE_WRITE can be found in the?CL_EXM_IM_BDCP_BEFORE_WRITE class.

SAP Change Document Functions

If you want to make change manually to Change Pointer, you can use the following functions modules:

Function Group: BD01 ALE: Shared Master Data Tools

  • CHANGE_POINTERS_DELETE
  • CHANGE_POINTERS_READ
  • CHANGE_POINTERS_READ_INFO_GET
  • CHANGE_POINTERS_READ_MODE_SET
  • CHANGE_POINTERS_STATUS_WRITE

Function Group SCP1 ALE: Creation of Change Pointers

  • CHANGE_POINTERS_CREATE
  • CHANGE_POINTERS_CREATE_DIRECT
  • CHANGE_POINTERS_CREATE_LONG

For example, CHANGE_POINTERS_READ: Read the existing SAP change Pointers. You can filter by Date, Class of Change Document or by Message Type .

* Source: help.sap.com