Are You Properly Managing Your SAP Change Pointers Part 3 – Using Change Pointer Data Forensics



Your batch job analysis shows that you are currently running the change pointer processing program RBDMIDOC,
and the change pointer cleanup program RBDCPCLR; but you notice that the size of your change pointer tables
continues to increase.

Now, it is time to analyze the change pointer data directly.  Here are some targets that I pursue:

1.  Count.
How many change pointer records are in your tables – thousands, hundreds of thousands, millions, billions?
This simple statistic alone reveals an interesting story.

While I typically try to use transaction SE11 to count the number of records in table BDCP, I have found,
on occasion, that this method would time out due to an excessively large number of records in this table.
In this case, you can write a simple ABAP which can be scheduled to run in background.

2.  Age and status.
Using the view BDCPV, determine the age and the status of your change pointer records.  The age of a change
pointer record is indicated by the field BDCPV-CRETIME, and the status of a change pointer record is indicated
by the field BDCPV-PROCESS.

In general, are the change pointer records days, weeks, months, or years old?
Are different ancient records found to be in both the ‘processed’ and ‘unprocessed’ status?
Are different recent records found to be in both the ‘processed’ and ‘unprocessed’ status?

3.  Message type and status.
Using the BDCPV view, determine the message type and status of your change pointer records.
The message type of a change pointer record is indicated by the field BDCPV-MESTYPE.

Are there different change pointer records for some message types that are never found in the ‘processed’ state?
Are there different change pointer records for a particular message type that are in both the ‘processed’ and the ‘unprocessed’ status?

Custom Reporting
For a more sohpisticated data analysis, you might consider writing an ABAP program to categorize your
change pointer records into ageing buckets, message types, and by status.  The cross-tab report shown here
is one that I use to analyze change pointer records.   It contains three sections -
Unprocessed Change Pointers by Message Type Within Ageing Category,
Processed Change Pointers by Message Type Within Ageing Category,
and a Grand Totals Summary.

crosstab report

Example Scenario Leading to Runaway Change Pointer Records
Of course, there are many reasons why you might observe some of the scenarios described above.  Here is one example:

Many years ago, your company’s business processes required the daily distribution of material master
data additions and changes to a remote plant.  Your functional analysts correctly configured the
change pointers and the ALE process for message type MATMAS to send this data to your remote plant.
RBDMIDOC and RBDCPCLR were both running daily for the material master data message type
MATMAS.   Change pointer records for material master data were created whenever users added
or changed certain data fields, IDOCs were created and sent, the change pointer records were marked
as ‘processed’, and were then purged – all on a daily basis.

Last year, business process changed, and your remote plant no longer required the distribution of
material master data changes.  The batch jobs running RBDMIDOC and RBDCPCLR for the material
master data message type MATMAS were cancelled, so that IDOCs would no longer be sent to the plant,
and because there was no need to clean up after these IDOCs for this message type.

But…

No one remembered to turn off the creation of change pointers in configuration for the material master
data message type MATMAS.  So, every time a user added or changed a material, new change pointer
records were still being created, causing the change pointer tables to needlessly increase in size.
And the status of these change pointer records will forever remain ‘unprocessed’.

 

Do you have custom code that is creating change pointer records?
There is another source of runaway change pointer table size that I would like to discuss here.    In some SAP systems that I have worked on, I have found that change pointer records were being created via custom ABAP programs.  This was done to support a custom process, having nothing to do with the SAP intended use of the change pointer records – the support of ALE distribution of master data.  Unfortunately, the system designers also forgot to write a custom program to either clean up their “custom-purposed” change pointer records, or to allow these records to be recognized by the SAP cleanup program.

Next Steps
So, now that we have discovered unnecessary change pointer records cluttering up our SAP database,
what do we do next?
What is the recovery cleanup process?
How do we stop the creation of change pointer records that are no longer needed?

This will be discussed in my next post.

ALE 101 – Part 1: Partner Profiles

Even though this blog will primarily be about SAP XI/PI, I would be remiss if I didn’t mention other SAP integration topics. So, my first technical blog will be about my single biggest gripe regarding the broader field of SAP integration. Namely, the perils of IDOC immediate processing!

I discovered both SAP ALE (which stands for Application Link Enabling and pronounced by its individual letters– “A, L, E”) and the golden beverage of the same name in 1998. I was in college at the time. One of my collegiate peers was dabbling in ALE (the drink, not the SAP technology) and had a knowledge on the topic vastly superior to mine. One night, he brought home a variety of ales from a local brewpub. Over time, I got to know ale very well (maybe a little too well?) and have been hooked ever since.

My introduction to SAP ALE was similar. I was in college and a colleague of mine introduced me to ALE. He was on the master data distribution team on a very large SAP implementation. His job was to ensure that the SAP ALE settings were correct in the entire SAP landscape. He taught me the basics of ALE in a few hours. Over time, as I learned more about SAP ALE, I developed a fondness for it that rivaled my fondness for it alcoholic counterpart.

ALE and ale are a lot like. Neither take a large up front investment (a few transactions for ALE, a few bucks for ale), but both require a fair amount of learning appreciate fully. To truly understand ALE, you need to understand all its parts: water, malt, hops, and yeast, and how they interact. Like SAP ALE, too much ale will leave one’s head swimming.


And just like you wouldn’t want to drink mass quantities of ale and immediately take a $150,000 Ferrari out for a spin, you don’t to immediately process mass quantities of IDOCs on your productive SAP instance. The number one problem I see at clients using ALE/IDOCs is setting the partner profile to process the IDOC immediately.

The trouble with immediate IDOC processing comes when a large number IDOCs are received at the same time. What constitutes a “large number of IDOCs?” Well, that depends on your SAP system. Problems usually occur when more IDOCs come in than you have foreground work processes. When more IDOCs arrive than your system has resources not only can you affect the system’s online users (hey, there are only so man foreground work processes to go around), you also run the risk of having some of the inbound IDOCs fall into the dreaded “double 64″ status. IDOCs that cannot be processed due to limited resources are given an additional 64 status record and are left unprocessed by the system. The only way to handle these IDOCs is to process them manually (via BD87 or BD20) or by a background job (RBDAPP01).

much better way to handle IDOC processing IDOCs is to collect the IDOCs and then process via a background job (RSEOUT00 for outbound IDOCs, RBDAPP01 for inbound IDOCs). This greatly reduces the load on the system and won’t cause your system to bite the dust in high-load situations. Moreover, there are performance tuning options available on RSEOUT00 and RBDAPP01 that will allow your IDOC processing to really sing! I will probably cover advanced settings for those programs in later blogs. I know–you can hardly wait!

In short ALE is great technology, but it is an asynchronous (i.e. batch) technology. There is very little reason why immediate IDOC processing is ever acceptable. In most cases an RBDAPP01 job that is scheduled every 5 of 10 minutes is more than fast enough for the business. If a 5 minute maximum (remember only the IDOCs that came in right after the prior job wait 5 minutes, the average wait time is 2:30) lag is not acceptable, a synchronous interface, based on BAPIs, RFCs, or web services should be considered.

SAP Interface Design

By: Timothy Yates

Description:

While there are many different ways to approach SAP system integration design, there is no right or wrong way
necessarily, but success usually lies in the attention to details.  The following document outlines a possible
approach to an SAP integration project.  Previous integration knowledge in a particular functional area is
beneficial however overall integration experience is more critical.  The more hours spent in general on SAP
integration the better.  Integration technology is continuously changing and adapting therefore continuous
learning and training is required to be effective at integration design.

SAP Interface Design

The 10 Golden Rules of ALE Optimization

By: Timothy Yates and Thomas Nittmann

  1. Interference With Other Interfaces \ System Load
  2. Archiving (IDOC, Workflow, Change Points, Message
    Control)
  3. Inefficient User Exit Code
  4. Workflow Error Handling
  5. Automatic tRFC Batch Retry Switched ON
  6. Using Immediate Processing
  7. Using Single Processing Instead of Parallel
    Processing
  8. Improper Sized Packets
  9. Hardware and Basis Configuration
  10. Standardization Without Interface Specific
    Considerations

SAP ALE Optimization Presentation