You are on page 1of 7

Suppose if I create a custome idoc type and custom message type with the required fields, where/how can

I populate those fields? I mean to ask do we have any user exit or badi ? How can I ensure that it will get triggred when Customer is changed? Also I need the data like "Changed time" " User name" " New Value " "Old Value" which I need to grab from CDHDR or CDPOS. A Check out the configuration in BD60. You can create a new message type and put it there. You can copy function module 'MASTERIDOC_CREATE_SMD_DEBMAS' to your Z function module and populate all the fields you want there. Change pointer will run periodically. if you set a background job to run every 1 minute. it will grab anything create/change/delete during that time and generate IDOC. If you need real time less than 1 minute, you may need to consider other option. All CDHDR data you can get from function module 'CHANGE_POINTERS_READ' in 'MASTERIDOC_CREATE_SMD_DEBMAS' then you can populate the field you want. ** what are change pointers and table bcdp a Change Pointers in simple terminolgy, For example you are sending 100 materials from system A to system B (say matnr - 1 - 100 ), and in system B already some materials with the same Matnr exists, so you get error when you transfer these materials, saying the material already exists, to avoid these kind of errors, we use Change Pointer concept wherein we update the Materials with the same Matnr, the table BCDP is used to record the changes. Change pointers are the mechanism through which you can send data to external system if there is a change happening to specific fields of master data. BDCP is the table in which the change pointers are stored. Change pointers can be reffered in similar way, tables related to the same are: BDCP, BDCP2, BDCPS. Acessing change documents from tables CDHDR and CDPOS can be time taking where using change pointers we can quickly refer/access the same by maintaining/archiving the processes change pointers regularly. Change pointers are used to keep track the changes made to the key documents of SAP. For example vendor master or customer master details will change sometime in business ( not full information only some info like address or code ) at that time no need to transfer whole data instead of tht we can transfer only those info which got changed. at this time we come across or go for Change pointers. CDHDR table is used to info of change pointes With respect to Dictionary Change pointers means all the changes done to dictionary objects. All the change logs with respect to tables are stored in CDHDR and CDPOS table Change Pointers in broad sense are used with respect to IDOC Change Pointers & Reduction of IDOCs. 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. Following Steps must be followed in case of Change Pointer. 1) Goto Transaction BD60. Note down the Details of the Message Type for which change pointer has to activate. Details like Function Module, Classification Object, ALE object Type etc. E.g. ZDEBP3 2) Next step is goto transaction BD53 Click on change button. First select the segment for which the fields has to modified (either remove or add ). It will show the fields in a pop-up window where the user can select, deselect the respective fields. Save the settings for the Message type. Dont forget to activate the change pointers by clicking Activate Change pointers button on the main screen. 3) Once the activation is done system will reset the settings for the Message type in Change pointers (BD60). Maintained the old settings for the Message type. Maintain change-relevant fields for message type Use BD52 transaction code . I did check CDHDR & CDPOS ..there is entry But I could not find entry in BDCP2. What could be probelm? Changes are stored as change documents in the CDHDR (header) and CDPOS tables (details). The contents of the change document are passed from the change document system to the SMD Tool. For each document the system checks that the modified field and the table are assigned to a message type. If this is the case then a change pointer is created. Change pointers are basically the key fields of the table that contains the changed field Change pointers are stored in tables BDCP and BDCPS For performance reasons these tables should be as small as possible (not a lot of records).

Change Pointer (Master Data Distribution) Purpose If you want to distribute master data changes with the SMD tool (Shared Master Data), changes to the master data objects are flagged for distribution by change pointers ( Master Data Distribution). 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. You can increase the rate of processing by using the Analyze Change Pointer and Reorganize Change Pointer functions. Prerequisites You have created change pointers. Activities Checklist to keep the change pointer tables as small as possible: 1. Do you really need change pointers? You need change pointers to distribute changes with the ALE SMD tool. If you do not use this tool, you do not need to write change pointers. You can deactivate change pointers and activate them again with the transaction BD61. 2. Do you really need to activate change pointers for this messages type? If some messages types are no longer to be distributed by change pointers, you can deactivate change pointers for this messages type. You can deactivate change pointers for the message type and reactivate them again. For reduced message types, deactivate the change pointer with the Reduction tool (transaction BD53). From Basis Release 6.10, you can restrict the creation of change pointers in customer exits. This functionality is provided in advance in the Note 'Reducing the amount of data for change pointers' (0420562). 3. Are there still too many change pointers to be processed? The change pointers are analyzed with the transaction BD21 or the report RBDMIDOC in ALE and flagged as processed. If the change pointers are created periodically, this report should also run periodically. See also: Analyze change pointers. 4. Are no longer required change pointers reorganized in time? The report RBDCPCLR (transaction BD22) to reorganize the change pointer should run periodically. Depending on how many change pointers are created or processed, you can schedule the background job hourly, daily or weekly. You should delete all obsolete and processed change pointers. You can also use this report for specified message types. --Change pointers are R/3 objects that mark changes to SAP master data. Change pointers are managed by mechanisms in a Shared Master Data (SMD) tool and are based on Change Document (CD) objects. CD objects record the changes occurring to master data at a field level. These changes are stored in tables CDHDR (header table) and CDPOS (detail table). ALE configuration provides a link between CD objects and change pointers. Internal mechanisms update tables BDCP and BDCPS, which host the change pointers. While CD objects are application-data-specific, the processing status of change pointers is message-type-specific. Also, the ALE change pointers are activated first at a general level and then at the message-type level. ALE provides powerful capabilities to capture changes occurring to master data and to distribute them via the IDOC interface. This feature can be used to keep two or more systems synchronized with respect to master data. Steps to configure change Pointers: 1.Activate the change pointers globally(BD61) 2.Activate the change pointers for individual message types(BD50) 3.Schedule the program RBDMIDOC to run periodically on the sending system. To Delete Change pointers use transaction BD22 and the standard program is RBDCPCLR Remember You can see a check box in Further characteristics tab of the data element ( se11-->enter data element-->Further characteristics tab) for change document. This check box is to bo checked to trigger change pointers. --Change Pointers in simple terminolgy, For example you are sending 100 materials from system A to system B (say matnr - 1 - 100 ), and in system B already some materials with the same Matnr exists, so you get error when you transfer these materials, saying the material already exists, to avoid these kind of errors, we use Change Pointer concept wherein we update the Materials with the same Matnr, the table BCDP is used to record the changes do the following steps for Change pointers :: 1) Tcode BD61---> check the change pointers activated check box save and goback.

2) Tcode BD50---> check the MATMAS check box save and comeback. 3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback. 4) Tcode BD52---> give message type : matmas press ok button. select all what ever you want and delete remaining fields. save & come back. 5) 5) go to Tcode MM02 select one material and try to change the description and save it it will effects the target systems material desciption will also changes 6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute give Message type : MATMAS and Executte

Distributing Master Data with the SMD Tool


Changes to master data objects are managed using the Shared Master Data (SMD) tool. The SMD tool distributes master data changes to the decentralized systems. The SMD tool groups changes together according to their content and the time they were changed: Firstly, if several changes to a master data object have been made by different SAP transactions and stored in different tables, they are combined into one single change to the master data object. Secondly, if several changes are made in close succession, they are also combined into a single change and distributed as one change.

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.

Change Pointer (Master Data Distribution)


Purpose
If you want to distribute master data changes with the SMD tool (Shared Master Data), changes to the master data objects are flagged for distribution by change pointers ( Master Data Distribution). 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. You can increase the rate of processing by using the Analyze Change Pointer and Reorganize Change Pointer functions.

Prerequisites
You have created change pointers.

Activities
Checklist to keep the change pointer tables as small as possible: 1. Do you really need change pointers? You need change pointers to distribute changes with the ALE SMD tool. If you do not use this tool, you do not need to write change pointers. You can deactivate change pointers and activate them again with the transaction BD61. 2. Do you really need to activate change pointers for this messages type? If some messages types are no longer to be distributed by change pointers, you can deactivate change pointers for this messages type. You can deactivate change pointers for the message type and reactivate them again. For reduced message types, deactivate the change pointer with the Reduction tool (transaction BD53). From Basis Release 6.10, you can restrict the creation of change pointers in customer exits. This functionality is provided in advance in the Note 'Reducing the amount of data for change pointers' (0420562). 3. Are there still too many change pointers to be processed?

The change pointers are analyzed with the transaction BD21 or the report RBDMIDOC in ALE and flagged as processed. If the change pointers are created periodically, this report should also run periodically. See also: Analyze change pointers. 4. Are no longer required change pointers reorganized in time? The report RBDCPCLR (transaction BD22) to reorganize the change pointer should run periodically. Depending on how many change pointers are created or processed, you can schedule the background job hourly, daily or weekly. You should delete all obsolete and processed change pointers. You can also use this report for specified message types. See also: Reorganize change pointers.

Analyze Change Pointers


Use
You can create IDocs from change pointers with the report RBDMIDOC.

Features
The report creates IDocs for the specified message type from the change pointers, sends them to the recipient systems, and flags the change pointers for this message type as processed. The recipient systems are determined from the distribution model for this message type. The report tells you how many master andcommunication IDocs have been created.

Activities
Choose SAP Menu Tools IDoc Interface/ALE Administration Services Change Pointers Analyze (BD21). 2. Specify a message type and run the report. 1. If you die create change pointers periodically, schedule the report periodically (see: Periodic tasks).

Periodic Tasks
Use
Some IDoc Administration functions are performed periodically, and should therefore be scheduled in background jobs. These are: Outgoing IDoc Create IDoc from Change pointers (1) Reorganize change pointers (2) Serial distribution by message type (3) Send collected IDocs (4)

Communication check (tRFC) and IDoc status conversion (5)

Repeat RFCs (6) IDoc Inbox Post IDocs in recipient system (7) Post IDocs with errors (8) IDoc confirmation in recipient system (9) Active IDoc monitoring with workflow connection (10)

Prerequisites
You have maintained at least one variant for the function in the IMG.

Procedure
1. ...

1.

1. Maintain at least one variant for the function(s) in the IMG (Implementation Guide), if you have not already done so: SAP Web Application Server IDoc Interface/ALE Modeling and Implementing Business Processes Configure Master Data Distribution Set-up replication of changed data (1,2) Set-up serialization of sent and received data Serialization by Message Type Serialized Distribution by Message Type (3) Set-Up System Monitoring IDoc processing (4,7,8) Set-Up IDoc Confirmation in Recipient System (ALE Audit) Confirm Audit Data (9) Communication check (tRFC) and IDoc status conversion (5) Repeat RFCs (6) IDoc monitoring with workflow connection (10)

2.

2.

Schedule the variant(s) as background job.

Choose SAP menu Tools IDoc Interface/ALE Administration Services Periodic Outgoing/Incoming, and the function, to schedule the variant.

Reorganizing Change Pointers


Use
The report RBDCPCLR deletes processed and/or obsolete change pointers.

Features
This report deletes change pointer entries from the database tables. In Test mode, only a list of the selected entries is output. Entries are only physically deleted from the database when the test flag is not set. You can select obsolete and/or processed change pointers, or select by date and time.

Obsolete change pointers are those created before a specified date and time. If this flag is set, the obsolete change pointers are reorganized, whether or not they have already been processed. Processed change pointers are those which were processed within a specified period (date and time). If this flag is set, the processed change pointers are reorganized.

The report outputs the number of change pointers deleted, or, in test mode, selected.

Activities
1. Choose SAP Menu Tools IDoc Interface/ALE Administration Services Change Pointers Reorganize (BD22). 2. Select Test if you only want to display the selection result. 3. Specify a message type. 4. Specify whether you want to reorganize obsolete and/or processed change pointers, and run the report. 5. As this report should run periodically, schedule a job (see Periodic Tasks).

You might also like