Generate iDocs Using Change Pointers in SAP

This post aims to illustrate how to create outbound iDocs for master data changes in SAP using Change Pointers mechanism. When master data such as Material Master, Vendor Master, Customer Master, etc. changes in SAP, we can capture the changes using Change Pointers mechanism. Change Pointers are useful when you want to communicate SAP master data changes to external systems using iDocs.

Before we start talking about Change Pointers mechanism, you need to understand iDoc configuration steps.

To illustrate how Change Pointers are enabled for master data changes in SAP, let’s assume we need to communicate sales pricing conditions to external system (POS) using COND_A iDoc. When price condition values are changed or conditions are created, change point mechanism should be activated and outbound COND_A iDocs in basic type should be generated.

 

Step by Step Guide on How to Activate Change Pointers for Price Conditions:

 

Step 1: Activate Change Pointer Globally – Transaction BD61.

Go to transaction BD61 and activate Change Pointers generally. This is a global setting which should be activated if you want to use Change Pointers in your SAP system.

Activate Change Pointers globally
Activate Change Pointers globally

 

Step 2: Activate Change Pointers for iDoc Message Type – Transaction BD50

Go to transaction BD50 and activate change pointers for Message Type COND_A.

Activate Change Pointers for Message Type COND_A
Activate Change Pointers for Message Type COND_A

 

Here we can decide for which Message Types Change Pointers should be activated. If you want to capture changes of Material Master activate Change Pointers for Message Type MATMAS or ARTMAS. If you want to distribute changes of Customer Master activate Change Pointers for CREMAS Message Type.

 

Step 3: Assign Change Point Items for Message Type – Transaction BD52

Go to transaction BD52 and select Message Type COND_A.

Field selection for COND_A message type
Field selection for COND_A message type

 

Assign table names and fields which change pointers should be activated for. Change pointers will be activated when values of these fields are changed and change log will be maintained in table BDCP2.

Assign table names and field names
Assign table names and field names

 

Step 4: Configure Partner Profile – Transaction WE20

Configure partner profile with outbound message type COND_A. In this example we are sending Price Condition changes to POS logical system.

configure partner profile in we20
Configure partner profile and assign message type in outbound parameters.

There are several other configuration steps to set up iDoc communication. Complete guide for iDoc configuration transactions can be found here.

 

Step 5: Configure ALE Distribution Model – Transaction Bd64

To distribute Master Data iDocs we need to configure Distribution Model using transaction BD64.

Create a Distribution Model View. Assign the Message Type, Sender SAP system name and receiver partner name using ‘Add Message Type’.

Create model view for COND_A outbound
Create new model view in BD64

 

Sender system is the Logical System name of the sender SAP system. Receiver is the name of the partner profile configured in the previous step using transaction we20.

Add new Message Type to Model View Bd64
Add new Message Type to Model View

 

Model View configuration completed - BD64
Model View configuration completed

 

Additionally, you can restrict iDocs being generated for certain Sales Organizations, Material Groups, Distribution Chains etc by creating Filter Groups. Double click on ‘filter set’ and create a filter group with filter criteria and values. Here I have restricted generation of iDocs only for US region.

Filter groups in distribution model bd64
Filter Groups in BD64

 

Step 6: Generate Outbound iDocs Using Standard Program RBDMIDOC – Transaction se38.

When you create or change conditions, change pointers mechanism will flag changes in table BDCP2. The program RBDMIDOC reads this table and creates master and communication iDocs. This program dynamically executes the Change Point read Function Module of Message Type selected in selection screen. Function Module for COND_A Message Type is MASTERIDOC_CREATE_SMD_COND_A.

 

RBDMIDOC  selection screen. Input Message Type
RBDMIDOC  selection screen. Input Message Type

 

RBDMIDOC program output.
RBDMIDOC program output.

In production system you can schedule this program to create outbound iDocs periodically.

 

Test Change Pointers:

To test change pointers, change condition values using transaction VK12.

VK12 - Change Condition values
VK12 – Change Condition values

 

Once you change values of conditions, changes will be flagged in table BDCP2. In older SAP versions change points were saved in tables BDCP and BDCPS, but in newer HANA versions data is aggregated to table BDCP2.

Change Pointers are initially created in null processed status in this table. Once you execute the program RBDMIDOC and iDocs are generated, processing status changes to ‘X’.

change pointers are flagged in table BDCP2. Ready to create iDocs BDCP, BDCPS
Change pointers ready to be processed

 

RBDMIDOC program output.
RBDMIDOC program output.

 

Using transaction we02, view the iDocs generated.

Master data iDoc generated from Change Pointers
Master data iDoc generated from Change Pointers

 

Change Pointers processing status updated.

Change Pointers table BDCP2 processing status updated. BDCP, BDCPS
Change Pointers table BDCP2 processing status updated.

 

Hope this guide will help you set up Change Pointers for master data changes in SAP. If you have any questions on creating outbound iDocs using change pointers, leave a comment below.

23 Comments

Add a Comment

Your email address will not be published. Required fields are marked *