This page is created to clarify the logic behind Version Control in SRM.
In SRM system it is possible to activate Version Control, which means that if a user makes changes for a legal business document (e.g.: Contract, Purchase Order, Rfx) system will create a new version of that document and preserves the previous ones.
You can activate Version Control for each document type in the following customizing path (SPRO): SAP Implementation Guide -> SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Switch On Version Control for Purchasing Documents.
The standard behavior of versioning can be changed using BADI BBP_VERSION_CONTROL.
The behavior of the standard Version Control can differ in systems, because the standard design was changed due to many confusions of the original behavior. The change was introduced by SAP Note 1765961. On this page, I will describe both behaviors. If you have already applied SAP Note 1765961, you have the new behavior. If the note was not applied, please refer to the table below to decide which design is relevant for your system version:
|SRM Version||Support Package||Behavior|
|SRM 700||SP01 - SP14||original|
|SRM 700||SP15 -||new|
|SRM 701||SP01 - SP09||original|
|SRM 701||SP10 -||new|
|SRM 702||SP01 - SP07||original|
|SRM 702||SP08 -||new|
|SRM 703||SP01 -||new|
In the original behavior the version numbering in BBP_PD and on the Web matches. So the active version number in BBP_PD is the same as the active version on the Web. If you create a new document the version numbering will look like this.
As you can see the current active version number is 2. The reason behind this is that when a new version is created the system always creates a historical version automatically. This historical version is the copy of the active version and the purpose of creating this version is that in this way the old versions and their data can be preserved. After you create another version of this document the version numbering will look like this.
Again the version numbering is the same for the active version in BBP_PD and on the Web. The reason why the numbering skips the second version is that the second version is the copy of the new active version, so it is the same as version 3. Therefore system won't display it, as it didn't display the first historical version either when only one version was created (previous scenario). If you create more versions the behavior will be the same and the version number will always skip the second last number (e.g.: 1, 2, 4 or 1, 2, 3, 5).
The logic behind the new design is to avoid skipping the second last number in version numbering. This was achieved by modifying the display of the versions. Because of this reason the active version number in BBP_PD and on the Web doesn't match.
The version number of the active version is 2, but during displaying it on the Web system reduces this value by 1, so that the first version has number 1. In BBP_PD version 1 is the historical version, which is always created when a new version is created. This historical version is the copy of the active version and the purpose of creating this version is that in this way the old versions and their data can be preserved. If you create a new version of the document the version numbering will look like this.
Again the numbers of the active versions are different in BBP_PD and in the Version Overview table as the version number of the active version is reduced by 1 during displaying the versions on the web, so that the versions of the document doesn't skip any numbers. If you create more versions the behavior will be the same and the version number will be in order without any missing numbers (e.g.: 1, 2, 3 or 1, 2, 3, 4).
Inactive Version Control
If the version control for a given document type is switched off, change versions will still be created in the system. It influences the historical versions (Type No. H) of documents, not the change versions (Type No. C). C1, C2, etc. versions will still be created in the system.
For the application logic of Version Handling, refer to Wiki page Version handling - Debugging Guide.
Related SAP Notes/KBAs
SAP Note: 2079296 - Creation Date of Historical Version later than Change Date
SAP Note: 1998425 - Change Document Date and Time is wrong
SAP Note: 1835055 - Timestamp of change documents for SRM business objects
SAP Note: 1765961 - All changes in document listed in last active version
KBA: 2475199 - Change Version is created even though versioning is inactive
KBA: 2165652 - No new version is created for Business Document
KBA: 2143034 - Time Difference in Version Overview and Change Documents
KBA: 2130599 - Active version has an earlier creation date than the Historical version
KBA: 2023990 - Version Number starts at 2 and not all versions are visible on tab Tracking