Skip to Content
Author's profile photo Former Member

Increment of Version Number depend upon Custom Field

Requirement : The main objective is to customize Increment of Version Mangement in DMS .

As per Standard SAP the Version Management will be triggered only when there is any New Version for the Same Document Nomenclature which was existed in SAP.

The Business Requirement is for few specific document types such as policies, aggrements the Document Nomenclature will be in the Format of the nomencalture is  CCC-XXX-YYYYMMDD-00-0.

where   CCC   –  Company’s Initial , XXX   – Document  types ,YYYY-  Year of the document , MM   –  Month ,DD    – Month

For these type of document types we need’nt consider the Document Nomenclature as Key field for Version Mangement whereas the Increment depends upon the UNQIE Code in Custom field.

Procedure for the Requirement :

Configuration STEP : Goto OAC2 Transaction code and Select the Document Types for which the version management should be trigger depend upon the condition and mark the field Version Management as Customer exist option.


STEP-2 : Created a Custom Tab in CV01N (Create Documents) Transaction using a Screen exit – CV110001.

                Added a field in the CV110001 (Screen exit)  and follow the below steps.

>   EXIT_SAPLCV110_001 :  Double Click on INCLUDE ZXCV110U01 line and create new inculde file

     This exit is used to provide Title for new tab. For example 

     pfx_tab1 = Text-001 .”Text-001 : text symbole

>   EXIT_SAPLCV110_002 :  Double Click on   INCLUDE ZXCV110U02 line and create new inculde file

      This exit is used to Pass the custom field value (PS_DRAW) to standard table (DRAW) .


>     EXIT_SAPLCV110_003 : Double click on  INCLUDE ZXCV110U03   line and create new inculde file  :

       This exit is used to Pass the Standard Table (DRAW) to custom field table (PSX_DRAW) .


STEP-3 :BADI  Implementations  : DOCUMENT_MAIN01 , DOCUMENT_MAIN02

>>>>>>> DOCUMENT_MAIN02 – BADI  is used to validate the values in PBO and PAI for CV01N,CV02N,CV03N Transaction.

The interface of the Business Add-In DOCUMENT_MAIN02  includes the following method which are implemented

1. D100_BEFORE_PAI : Before the actual PAI of the screen 100.

This method is used to display Error message for which the version management triggers depend upon custom field .

2. D101_BEFORE_PAI : Before the actual PAI of the screen 101

This method is used  To navigate to custom screen where UNIQUE CODE is mandatory field to trigger version management when user press on ENTER for a specify document type.

>>>>>>> DOCUMENT_MAIN01 – BADI  is used to increment Version Management for satisifed condtion.

The interface of the Business Add-In DOCUMENT_MAIN01  includes the following method which are implemented

1. BEFORE_SAVE   : Before Saving the document

  This method is triggered when the User Clicks on SAVE Button it validates if the UNIQUE CODE is maintained then it will validate whether any of the entry is exist in SAP with the same UNIQUE CODE and then Version Mangement is triggered.

These Document Types where Version Mangement is customized the automatic Version Mangement is disabled and the Version Management is trigger only depend upon the same UNIQUE CODE maintained in the custom field.

According to this we can trigger Version Mangement depend upon the UNIQUE CODE mainatined.

Please let me know if the document have any corrections.

Thanks & Regards.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.