cancel
Showing results for 
Search instead for 
Did you mean: 

Error in user difined form -Form -Alredy Exist [66000-106]

Former Member
0 Kudos

Hi Experts ,

i have develop my screens through screen painter.

when i opn forms in sap as multiple time i have faced following errors:

*Form -Alredy Exist [66000-106]*

*The Choose From List unique ID already exists [66000-106]*

how can avoide this errors

please help me for this

Regards,

Pravin Baji

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi PravinBaji,

Refer This......

Link: [url]

Thanks

Shafi

former_member689126
Active Contributor
0 Kudos

Hi Pravin Baji

Try this code to load your form

Private Shared UIDPath As String = "Application/forms/action/form/@uid"
Private xmlDoc As XmlDocument


        Protected Sub LoadXml(ByVal xmlFile As String)
            xmlDoc = New XmlDocument()

            If Not System.IO.File.Exists(xmlFile) Then
                xmlFile = xmlFile.Insert(0, "..\")
            End If

            If System.IO.File.Exists(xmlFile) Then
                xmlDoc.Load(xmlFile)
                formUID = xmlDoc.SelectSingleNode(UIDPath).Value
            Else
                oApplication.MessageBox("ERROR: File " + xmlFile + " not found", -1, "", "", "")
            End If
        End Sub

Protected Sub LoadForm()
            If xmlDoc.HasChildNodes Then
                xmlDoc.SelectSingleNode(UIDPath).Value = formUID + System.Math.Max(System.Threading.Interlocked.Increment(counter), counter - 1)
                Dim xmlStr As String = xmlDoc.DocumentElement.OuterXml
                oApplication.LoadBatchActions(xmlStr)
                Dim oForm As Form = oApplication.Forms.ActiveForm
                Try
                    Dim oUDS As UserDataSource = oForm.DataSources.UserDataSources.Item("FolderDS")
                    If oUDS IsNot Nothing Then
                        oUDS.Value = "1"
                    End If
                Catch generatedExceptionName As Exception
                End Try
            Else
                oApplication.MessageBox("ERROR: XML File containing the form not found", -1, "", "", "")
            End If
        End Sub

Hope this will solve your problem

Regards

Arun

Former Member
0 Kudos

thanks all , i got solution

Former Member
0 Kudos

Hi Pravin Baji,

And Also u should change this step in ur coding


 xmldoc.Load(spath & "\" & "SubContract1.xml")

Thanks

Shafi

Former Member
0 Kudos

i got it Shafi bui i want to open multiple forms like System

Former Member
0 Kudos

Hi,

You should convert ur .srf file to .xml

Just remove .srf and replace it with .xml in ur startuppath

SubContract1.xml

Thanks

Shafi

Former Member
0 Kudos

i am facing this error

Could not find file 'E:\Pravin\Kandakure Development\Sub

Contracting\SubContracting 1 March

2011\SubConTransaction\SubConTransaction\bin\SubContract1.srf'.

Former Member
0 Kudos

Hi PravinBaji

Try This..........

While Loading ur form


 Private Sub loadxml()
        Try
            Dim xmldoc As New Xml.XmlDocument
            Dim spath As String
            spath = System.IO.Directory.GetParent(Application.StartupPath).ToString
            Dim found As Boolean = False
            Dim i As Integer
            For i = 0 To sbo_application.Forms.Count - 1
                If sbo_application.Forms.Item(i).UniqueID = "Frm_Emp" Then
                    found = True
                    Exit For
                End If
            Next
            If found = True Then
                sbo_application.Forms.Item("Frm_Emp").Select()
            Else
                xmldoc.Load(spath & "\" & "emp.xml")
                sbo_application.LoadBatchActions(xmldoc.InnerXml)
            End If
        Catch ex As Exception
            sbo_application.MessageBox(ex.Message)
        End Try
    End Sub

Thanks

Shafi