/// <summary>
        /// function to create tab against Version Window
        /// </summary>
        /// <param name="tab">Object of MTab</param>
        /// <param name="ver_AD_Window_ID">Version Window ID</param>
        /// <param name="Ver_AD_Table_ID">Version Table ID</param>
        /// <returns>int (Version Tab ID)</returns>
        private int CreateVerTab(MTab tab, int ver_AD_Window_ID, int Ver_AD_Table_ID)
        {
            MTab verTab = new MTab(GetCtx(), 0, Get_TrxName());

            // copy Master table tab to Version tab
            tab.CopyTo(verTab);
            verTab.SetAD_Window_ID(ver_AD_Window_ID);
            verTab.SetAD_Table_ID(Ver_AD_Table_ID);
            verTab.SetIsReadOnly(false);
            verTab.SetIsInsertRecord(false);
            verTab.SetIsSingleRow(true);
            verTab.SetWhereClause(null);
            verTab.SetSeqNo(10);
            verTab.SetAD_Column_ID(0);
            verTab.SetTabLevel(0);
            verTab.SetExport_ID(null);
            verTab.SetDescription("Version tab for " + tab.GetName());
            verTab.SetHelp("Version tab for " + tab.GetName() + ", to display versions for current record");
            // set order by on Version Window's tab on "Version Valid From column"
            verTab.SetOrderByClause("VersionValidFrom DESC, RecordVersion DESC");
            if (!verTab.Save())
            {
                ValueNamePair vnp   = VLogger.RetrieveError();
                string        error = "";
                if (vnp != null)
                {
                    error = vnp.GetName();
                    if (error == "" && vnp.GetValue() != null)
                    {
                        error = vnp.GetValue();
                    }
                }
                if (error == "")
                {
                    error = "Error in creating Version Tab";
                }
                log.Log(Level.SEVERE, "Version Tab not Created :: " + tab.GetName() + " :: " + error);
                Get_TrxName().Rollback();
                return(0);
            }
            else
            {
                CreateVerTabPanel(verTab);
            }

            return(verTab.GetAD_Tab_ID());
        }