Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

only 1 chance to catch the event (form load)

Hi,

i'm using quiet simple code. After loading the form Production Order i wish to create a new tab on the system form.

But i got 2 problems:

1. when the system reach the code line where it gets the system form with getFormbyTypeandCount (here the last line of the procedure) something happens and the following code won't be read.

2. after getFormbyTypeandCount no event is fired anymore.

Does anybody have an idea whats going wrong?


    Private Sub moSBOApplication_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles moSBOApplication.ItemEvent

        'Events verarbeiten
        Select Case pVal.EventType

            Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD

                'Montageauftrag
                If pVal.FormType = 65211 And pVal.Before_Action = False Then
                    createTabDepend(pVal)
                End If

        End Select

    End Sub

#Region "design tab 'abhängige Aufträge'"
    Private Sub createTabDepend(ByRef pval As SAPbouiCOM.ItemEvent)
        Dim oRecSet As SAPbobsCOM.Recordset
        Dim oForm As SAPbouiCOM.Form

        Dim oItem As SAPbouiCOM.Item
        Dim oNewItem As SAPbouiCOM.Item
        Dim oBtn As SAPbouiCOM.Button
        Dim oFolder As SAPbouiCOM.Folder
        Dim oText As SAPbouiCOM.StaticText
        Dim oCheck As SAPbouiCOM.CheckBox

        Dim oMatrix As SAPbouiCOM.Matrix
        Dim oColumns As SAPbouiCOM.Columns
        Dim oColumn As SAPbouiCOM.Column

        Dim oDBDataSource As SAPbouiCOM.DBDataSource

        oForm = moSBOCompany.Forms.GetFormByTypeAndCount(pval.FormType, pval.FormTypeCount)

best regards

Markus

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question