System forms

hi kings
i m trying to change the system opportunity forms. i just add one folder the folder contain matrix... i take the example programs(system manipulation)..the folder added.. the matrix also added.. but unfortunately the matrix not allow to enter the data and how to save the data .... here i pasted full codings....please any one help me...
Code....
Public Class SystemForm
    Private WithEvents SBO_Application As SAPbouiCOM.Application
    Private oOrderForm As SAPbouiCOM.Form
    Private oNewItem As SAPbouiCOM.Item
    Private oItem As SAPbouiCOM.Item
    Private oFolderItem As SAPbouiCOM.Folder
    Private oOptionBtn As SAPbouiCOM.OptionBtn
    Private oCheckBox As SAPbouiCOM.CheckBox
    Private oMatrix As SAPbouiCOM.Matrix
    Private oColumns As SAPbouiCOM.Columns
    Private oColumn As SAPbouiCOM.Column
    Private i As Integer '// to be used as a counter
    Private Sub SetApplication()
        Dim SboGuiApi As SAPbouiCOM.SboGuiApi
        Dim sConnectionString As String
        SboGuiApi = New SAPbouiCOM.SboGuiApi()
        sConnectionString = Command
        SboGuiApi.Connect(sConnectionString)
        '// get an initialized application object
        SBO_Application = SboGuiApi.GetApplication()
    End Sub
    Private Sub AddItemsToOrderForm()
        oOrderForm.DataSources.UserDataSources.Add("OpBtnDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
        oOrderForm.DataSources.UserDataSources.Add("CheckDS1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
        oOrderForm.DataSources.UserDataSources.Add("CheckDS2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
        oOrderForm.DataSources.UserDataSources.Add("CheckDS3", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
        oItem = oOrderForm.Items.Item("7")
        For i = 1 To 3
            oNewItem = oOrderForm.Items.Add("CheckBox" & i, SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oNewItem.Left = oItem.Left
            oNewItem.Width = 100
            oNewItem.Top = oItem.Top + (i - 1) * 19
            oNewItem.Height = 19
            oNewItem.Visible = False
            oNewItem.FromPane = 5
            oNewItem.ToPane = 5
            oCheckBox = oNewItem.Specific
            '// set the caption
            oCheckBox.Caption = "Check Box" & i
            '// binding the Check box with a data source
            oCheckBox.DataBind.SetBound(True, "", "CheckDS" & i)
        Next i
        '// Adding Option button items
        '// use an existing item to place youe item on the form
        'oItem = oOrderForm.Items.Item("44")
        For i = 1 To 3
            oNewItem = oOrderForm.Items.Add("OpBtn" & i, SAPbouiCOM.BoFormItemTypes.it_OPTION_BUTTON)
            oNewItem.Left = oItem.Left
            oNewItem.Width = 100
            oNewItem.Top = oItem.Top + (i - 1) * 25
            oNewItem.Height = 19
            oNewItem.Visible = False
            '// set the Item's Pane Level.
            '// this value will determine the Items visibility
            '// according to the Form's pane level
            oNewItem.FromPane = 9
            oNewItem.ToPane = 9
            oOptionBtn = oNewItem.Specific
            '// set the caption
            oOptionBtn.Caption = "Option Button" & i
            If i > 1 Then
                oOptionBtn.GroupWith("OpBtn" & i - 1)
            End If
            oOptionBtn.DataBind.SetBound(True, "", "OpBtnDS")
        Next i
    End Sub
    Private Sub AddMatrixToForm()
        '// we will use the following object to add items to our form
        Dim oItem As SAPbouiCOM.Item
        '// we will use the following object to set a linked button
        Dim oLink As SAPbouiCOM.LinkedButton
        '// Adding a Matrix item
        oItem = oOrderForm.Items.Item("7")
        oItem = oOrderForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
        oItem.Left = 35
        oItem.Width = 400
        oItem.Top = oItem.Top + (i - 1) * 60
        oItem.Height = 125
        oMatrix = oItem.Specific
        oColumns = oMatrix.Columns
        oItem.FromPane = 9
        oItem.ToPane = 9
        '// Adding Culomn items to the matrix
        oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "#"
        oColumn.Width = 30
        oColumn.Editable = False
        '// Add a column for BP Card Code
        oColumn = oColumns.Add("DSCardCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
        oColumn.TitleObject.Caption = "Item Code"
        oColumn.Width = 150
        oColumn.Editable = True
        '// Link the column to the BP master data system form
        oLink = oColumn.ExtendedObject
        oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
        '// Add a column for BP Card Name
        oColumn = oColumns.Add("DSCardName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Description"
        oColumn.Width = 150
        oColumn.Editable = True
        'oColumn.DataBind.SetBound(true, "TableName", "U_ItemNo")
        '// Add a column for BP Card Phone
        oColumn = oColumns.Add("DSPhone", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Quantity"
        oColumn.Width = 70
        oColumn.Editable = True
    End Sub
    Public Sub New()
        MyBase.New()
        SetApplication()
    End Sub
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        If ((pVal.FormType = 320 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
            '// get the event sending form
            oOrderForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
            If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                '// add a new folder item to the form
                oNewItem = oOrderForm.Items.Add("UserFolder", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
                oItem = oOrderForm.Items.Item("7")
                oNewItem.Top = oItem.Top
                oNewItem.Height = oItem.Height
                oNewItem.Width = oItem.Width
                oNewItem.Left = oItem.Left + oItem.Width
                oFolderItem = oNewItem.Specific
                oFolderItem.Caption = "User Folder"
                '// group the folder with the desired folder item
                oFolderItem.GroupWith("7")
                '// add your own items to the form
                AddItemsToOrderForm()
                AddMatrixToForm()
                oOrderForm.PaneLevel = 1
            End If
            If pVal.ItemUID = "UserFolder" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.Before_Action = True Then
                oOrderForm.PaneLevel = 9
            End If
        End If
    End Sub
    Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes)
        Select Case EventType
            Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown
                '// Take care of terminating your AddOn application
                SBO_Application.MessageBox("A Shut Down Event has been caught" & _
                    vbNewLine & "Terminating 'Order Form Manipulation' Add On...")
                End
        End Select
    End Sub
End Class
Thanks & Best Regards
B.Lakshmi Narayanan

Events Part
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        If ((pVal.FormType = 320 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
            '// get the event sending form
            oOrderForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
            If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                '// add a new folder item to the form
                oNewItem = oOrderForm.Items.Add("UserFolder", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
                '// use an existing folder item for grouping and setting the
                '// items properties (such as location properties)
                '// use the 'Display Debug Information' option (under 'Tools')
                '// in the application to acquire the UID of the desired folder
                oItem = oOrderForm.Items.Item("7")
                oNewItem.Top = oItem.Top
                oNewItem.Height = oItem.Height
                oNewItem.Width = oItem.Width
                oNewItem.Left = oItem.Left + oItem.Width
                oFolderItem = oNewItem.Specific
                oFolderItem.Caption = "User Folder"
                '// group the folder with the desired folder item
                oFolderItem.GroupWith("7")
                '// add your own items to the form
                AddItemsToOrderForm()
                AddMatrixToForm()
                oOrderForm.PaneLevel = 1
            End If
            'If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.Before_Action = True Then
            'oOrderForm.PaneLevel = 5
            'End If
            If pVal.ItemUID = "UserFolder" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.Before_Action = True Then
                '// when the new folder is clicked change the form's pane level
                '// by doing so your items will apear on the new folder
                '// assuming they were placed correctly and their pane level
                '// was also set accordingly
                oOrderForm.PaneLevel = 9
            End If
        End If
    End Sub
Thanks & Best Regards
B.Lakshmi Narayanan

Similar Messages

  • Problem with AddRow() in custom matrix on System Form

    Hello all,
    I'm trying to add 1 row to a custom matrix on a system form (Sales Quotation).
    However I always get a RPC_E_SERVERFAULT exception when calling pMatrix.AddRow() and SBO crashes...
    My code is simple:
            [B1Listener(BoEventTypes.et_CLICK, false)]
            public virtual void OnAfterClick(ItemEvent pVal)
                Form pForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                // Add matrix line
                Matrix pMatrix = (Matrix) pForm.Items.Item("MATRIX").Specific;
                pMatrix.AddRow();
                // Set matrix line data
    The matrix shows ok in the system form, inside a new folder.
    What is the problem with my code?
    Is there any way to add rows to a custom matrix in a system form?
    This code runs ok if executed in a custom form...
    Thanks!
    Manuel Dias

    hi.
    R u facing any problem ...
    actually add row and del row both are same.
    in normal customization form and system form matrx...
    Any problem are u facing...

  • How to Refresh System Form in Run Time

    Dear All,
    Please give me idea for Refresh System Document in Run Time using DI,basically I am using  system columns for update for some scenarios.
    So please give solution that how should refresh system form.
    Thanks a lot.
    Ashish Singh.

    Hi,
    Please post above discussion in SDK forum.
    Thanks & Regards,
    Nagarajan

  • How to create add-on of a system form in sap b1 9.0?

    Hi all,
    I have a problem related to the creation of a system form add-on of sap b1 9.0.
    I can develop some projects in visual basic, but about sap b1 add-on, I know how to package files of to install (.ard and .exe files) and I also know how to register .ard file in sap b1 9.0, So I tried to register all projects found in SDK sample folder that was correct.
    I tried to do an example of project found in SDK Help Center.
    But the problem I have to day related to the creation of system form add-on.
    The steps I tried to do are:
    1. I opened SAP B1 Studio for Microsoft Visual Studio
    2. Right click my project and add the system form (Employee Master Data)
    3 Connection string I used in Command line arguments   0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056
    4. I added one field (CFL of BPCode) to Employee Master Data.  I did n't add any reference because when I add UI API Vission 9.0 to system form or user form of sap b1 it gives errors in Menu.vb. I do know why.
    5. I converted in 32 bit and build my project
    6. I re_opened new visual studio 2010 for creating new project with SAP B1 AddOnInstaller.NET Wizard
    7. From here I did every thing according to the video of Bryan Gomez
    Creating and Registering SAP Add-on - YouTube
    8. I registered my .ard file
    9. But when I start my add-on it gives error (Add-on connection timed out)
    The questions I want to ask,
    1. If you are creating the add-on of system form Is there any other thing needed to do more than the above  I explained?.
    2. Is it necessary to go in SDK code when you are using the system form like that?.
    3. If it is necessary to add reference of UI API  in project, how to handle error occurs when we add that the reference to the project which is using a system form?.
    Please anyone who has an idea he/she can help me.

    Hi pallavi p,
    That's good but as I said above when I add the reference of UI API Version 9.0 in the project which has the system form or user form of sap b1 it exactly gives errors in menu.vb of the project.
    So let me give you the way you can try.
    1. Open new project/ visual basic/ sap business one/ sap business one add-on project. and save it any where
    2. Right click on your project
    3. Add new item
    4. Sap Business One
    5. System form (Employee master data) or user form
    6. Add
    And then if your form is opened
    7. Go to add the reference of UI API Version 9.0
    8. Check errors found in menu.vb (or in OutPut)
    So if it's possible try to solve that problem.
    Please anyone can help me.

  • !0.5.8 How do I copy the 'system' form one internal Hard drive to an other (BY CD Packed up) Thank you

    !0.5.8 How do I copy the 'system' form one internal Hard drive to an other (BY CD Packed up)  I have tried but it will no show 'live' system folder - do and how can I bless it ? Thank you

    Carbon Copy Cloner will allow you to de-select directory trees, so you could use it to copy over everything EXCEPT the /Users directory tree.
    Mac OS X is NOT just the System Folder.  If you do not copy over the rest of Mac OS X, it will not boot.  So better to exclude Users and take everything else, then it is to try and pick and choose.
    The other approach is to install a New Mac OS X, and then copy over the stuff you want from the home folder(s) and reinstall any apps you want.

  • How to register add-on of edited system form in sap b1 9.0?.

    Hi all,
    I have a problem in SAP b1 9.0.
    Actually I added one field of BPCode to Employee master data, so I want to register an add-on of that system form in SAP b1 9.0.
    When I create file of .ard as we watch it in video of 
    Bryan Gomez
    Creating and Registering SAP Add-on - YouTube     it will be created correctly, But the problem is when I register that the file of .ard it gives error (Cannot create a file when that file already exists). Again when I create a file of .ard of any other User form it gives the same error (Cannot create a file when that file already exists).
    But when I create and register the add-on of Hello World in Sample folder of SDK it will be registered correctly.
    How can I solve that problem.
    Anyone can help me please.

    Hi pallavi p,
    That's good but as I said above when I add the reference of UI API Version 9.0 in the project which has the system form or user form of sap b1 it exactly gives errors in menu.vb of the project.
    So let me give you the way you can try.
    1. Open new project/ visual basic/ sap business one/ sap business one add-on project. and save it any where
    2. Right click on your project
    3. Add new item
    4. Sap Business One
    5. System form (Employee master data) or user form
    6. Add
    And then if your form is opened
    7. Go to add the reference of UI API Version 9.0
    8. Check errors found in menu.vb (or in OutPut)
    So if it's possible try to solve that problem.
    Please anyone can help me.

  • How to add new fields to the system form (Ex.expenses to a/r invoice form)

    hi
    can any one tell me how to add new fields to the system form (Ex.expenses to a/r invoice form)
    i want to add expenses field to system a/r invoice form and connect data base also.
    i used the code of samples\11.system form manipulation(vb.net) but i'm not able to get it....so can any one help with code or concepts.
    reply soon plz..
    thankQ

    If I understood you correctly, you are just trying to add new fields to the invoice form and then use them in your form. you should first go and add the field to your tables, which you would do by going to Tool --> User Defined Fields --> Manage User Fields. There are different documents or categories given. For ex. for invoices, Sales Orders you would add your field under the Marketing Documents. If you want the field to be just one per invoice, add it to the Title, otherwise if you want a field per invoice or Sales Order line, add it to the Rows section. Once you have done that then you can just create a edit box or drop down to represent the field and set the datasource for that to your field. If you want example code to do that, let me know.

  • Updating a user text field in sap system form in Find Mode

    Dear All,
                    I created a Edit text field in Sap System form [FormType :149] -Sales Quotation. I want to update a value to the text while clicking OK button in Find Mode. the code is given below.
    If pVal.ItemUID = "1" And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_FIND_MODE And (Not pVal.Before_Action) And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then
            oForm = SBO_App.Forms.Item(FormUID)
            oForm.Freeze(True)
            oItem = oForm.Items.Item("txtUID") 
            oEdit = oItem.Specific
            oRS = ConSBOdb.Execute("Select * from BG_CAMPAIGNSHDR where CMIDENT ='" & Trim(oEdit.Value) & "'")
            oItem = oForm.Items.Item("txtCampgn")         ' //  User created field
            oItem.Enabled = False
            oEdit = oItem.Specific
            If oRS.EOF = False Then
                oEdit.Value = oRS.Fields("CMNAME").Value
            Else
                oEdit.Value = ""
            End If
    end if
    while clicking the OK button, Based on the value fetched on the screen, I have to open a recordset and get the value.  But, the screen loads the value to the system textboxes. I could not get those value to run the Sql  in the event. it returns empty. Could any one help please how to solve this ?
    Thanks in advance.
    Manikandan.

    Hi,
    Try This..
    If pVal.FormType = 149 And pVal.ItemUID = "1" Then
                If pVal.FormMode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
                    If pVal.Before_Action = False Then
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                            Try
                                oForm = SBO_App.Forms.Item(FormUID)
                                oForm.Freeze(True)
                                oItem = oForm.Items.Item("txtUID")
                                oEdit = oItem.Specific
                                oRS = ConSBOdb.Execute("Select * from BG_CAMPAIGNSHDR where CMIDENT ='" & Trim(oEdit.Value) & "'")
                                oItem = oForm.Items.Item("txtCampgn") ' // User created field
                                oItem.Enabled = False
                                oEdit = oItem.Specific
                                If oRS.EOF = False Then
                                    oEdit.Value = oRS.Fields("CMNAME").Value
                                Else
                                    oEdit.Value = ""
                                End If
                            Catch ex As Exception
                                SBO_application.MessageBox(ex.Message)
                            End Try
                        End If
                    End If
                End If
            End If
    Best Regards,
    Mahendra

  • Form Settings getting cleared for system form

    Hi All,
    I have added the code for setting editable=false for the following items in Updatemode and Ok mode.Then in add mode,i made the columns to editable = true .First time it is working fine.
    the next time, I got the error message as "item is not a user defined item" on ItemCodeCol.editable = true.Then i check the form settings, the Active field for the itemcode cleared.When i set to Active as checked and run my code,it is working fine.How to solve the issue and how to avoid the setting of the fields.
    This is my code :
    If oSalesQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                    oSQItemCodeCol.Editable = True
                    oSQItemNameCol.Editable = True
                    oSQQtyCol.Editable = True
                    oSQWhsCodeCol.Editable = True
                ElseIf oSalesQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Or      oSalesQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then
                    oSQItemCodeCol.Editable = False
                    oSQItemNameCol.Editable = False
                    oSQQtyCol.Editable = False
                    oSQWhsCodeCol.Editable = False
                End If
    Thanx in advance
    Regards
    Mohana
    Edited by: Mohana Annadurai on Feb 20, 2009 5:28 AM

    Hi,
    This is not UDF in system form.That is , the itemcode,itemname,qty,warehouse field in the content tab of the sales quotation form.when i change the field to editable and noneditable,
    1)it is allowing to set the editable property to false and true for the first time.
    2) After adding the record,i navigate the record to check ,at that time,as per my code,in update mode,it is not allowing to edit.
    3)When i click add menu,and i chose customer, at that time it is not allowing to add a itemcode,becoz the itemcode field is disabled.
    4)when i check in form settings, in Table format, Active gets unchecked for the above fields.
    5)I want to avoid this changing of active in form settings.How to to this...
    Regards
    Mohana

  • Is it possible to get System form Matrix Data in DI API?

    HI,
       i would like to use DI API to get the System Form Matrix ( like Sale Order ) . Is it possible?
       i know that using UI API is most easier way. However, UI API cause extermemly slow perfomance.
       no matter i use Form.Freeze or not. Please Advise
    Thanks
    Gordon
    Edited by: Gordon Ho on May 7, 2009 7:03 AM

    Hi,
    U can access the Sales Order rows using the DI only if its added to the system. U can use the DOCUMENT object and Document.Lines and access the row data. Please check the SDK help file for more information.
    From SDK Help
    Document_Lines is a child object of Documents object and represents the line entries of a document in the Marketing Documents and Receipts module and the Inventory and Production module.
    Vasu Natari.

  • Opening a System-Form with selected Data

    Hi,
    i´m looking for a way to open a System-Form, e.g. Orders with
    selected Data.
    In the moment i do the following:
         application.ActivateMenuItem("2050");  // orders
         SAPbouiCOM.Form belegForm = application.Forms.ActiveForm;
         belegForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
         SAPbouiCOM.EditText edDocNum = (SAPbouiCOM.EditText)belegForm.Items.Item("8").Specific;
         edDocNum.Value = "4711";
         belegForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
    This works, but the screen is blinking, because first the form ist opened and shown with
    empty values and then filled.
    Is there a way to activate the form and do the search-Operation and afterwards show it ?
    I think ist must be possible, because when clicking on the link-Button near CardCode, the Contacts-Form
    is opened in this way.
    regards Matthias

    Hi Ibai,
    i have tested both: freeze and form.visible = false in
    the form_load-Event. It doesn´t work here.
    Also neither the call
       application.ActivateMenuItem("1281");  // find
    nor the call
       oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
    work in the form_load-Event.
    After the form-Load-Event the et_FORM_ACTIVATE-Event is called.
    Here the functions work, but here the screen is already visible.
    regards Matthias

  • Simple problem with popup message before adding document on system form

    Hi all,
    We have an AddOn that validates price lines on system Sales Order form matrix, so that if prices fall below a certain value, a popup is show to ask to continue or not, when user presses ADD button.
    The problem is that if he chooses yes (to continue), the Sales Order is not added since the button ADD keeps being selected ....
    Here is my code:
            [B1Listener(BoEventTypes.et_CLICK, true)]
            public virtual bool OnBeforeClick(ItemEvent pVal)
                int iResult = B1Connections.theAppl.MessageBox("Price lines fall bellow minimum! Continue?", 1, "NO", "YES", "");
                if (iResult == 1) // NO
                    // Show error
                    B1Connections.theAppl.StatusBar.SetText("OK", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    return false;
                // YES: Continue to add Sales Order
                return true;
    The problem is somehow related with the popup message being shown: if user says YES to continue, the system form does not continue with the standard process of adding the Sales Order (when I move the cursor above the ADD button is shows it already pressed...).
    Do I have to do anything more to force the process to continue, when the user says YES?
    Regards,
    Manuel Dias

    Thtas known problem. The solution for this is declare global variable as boolean, when user selects Yes, then set this variable to true and emulate click to add button again where before the message box check if its varaible sets to true - in this case dont show message box, only set variable to false.
    The concept of code will be
    dim continue as boolean = false
    in item event
    if continue = false then
        x = messagebox...
      if x = 1 then
        continue = true
         items.item("1").click
    end if
    else
    continue = false
    end if

  • How to add a link button in system form?

    how to add a link button in system form in the edit text?

    HI
    see the following code
    This creates an item "55" caption, and exittext ("550") and creates linked button "51" linked to "550"
            oItem = otmpform.Items.Add("55", SAPbouiCOM.BoFormItemTypes.it_STATIC)
            With oItem
                .Top = 315 + 30 + 15
                .Left = 12
                .Width = 100
                .Specific.Caption = "Többlet"
            End With
            otmpform.DataSources.UserDataSources.Add("550", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
            oItem = otmpform.Items.Add("550", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            With oItem
                .Top = 315 + 30 + 15
                .Left = 120
                .Width = 100
                .Specific.DataBind.SetBound(True, "", "550")
                .AffectsFormMode = True
                .Description = otmpform.Items.Item("55").Specific.Caption
                .DisplayDesc = True
            End With
            oItem = otmpform.Items.Add("551", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
            With oItem
                .Top = 316 + 30 + 15
                .Left = 120 - 14
                .Width = 13
                .LinkTo = "550"
                .Specific.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_GLAccounts
            End With
    Regards,
    J.

  • Combo box in the system form

    HI
    We r assuming  " freezing = Absent"
    When we select " freezing" in the combo box in the system form, "Absent" should be displayed in the matrix for the particular  row in the user form.
    Freezing should be displayed as Absent
    Working should be  displayed as Present
    what is the coding for this process . can anyone help me...
    Regards
    Bhuvana
    Edited by: bhuvana eshwari on Jul 30, 2008 6:45 AM

    Hi Bhuvana,
    In the combo Select Event, get the user form and then get the matrix then set the value. The code sample is as follows.
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
                                If oCmbBox.Selected.Value = Freezing Then
                                     oForm = getForm("UserFormID")      
                                     objMatrix = oForm.Items.Item("UID").Specific
                                       objedit = objMatrix.Columns.Item("V_14").Cells.Item(pVal.Row).Specific
    ObjEdit.String = Absent
    ElseIF oCmbBox.Selected.Value = Working
               'Use same logic
    EndIF
    Reward with points if helpful.
    Regards,
    Vasu Natari.

  • System form UDF

    i want to catch an event on click on udf in a system form.
    how i will catch...
    how i will get item id for udf in system form.
    oForm = SBO_Application.Forms.ActiveForm
                     oedit2 = oForm.Items.Item("U_EmpCode").Specific()  <---- Error
    or simply i want to assign value in udf... but i got error.
    Regard,
    Avijit

    If pVal.FormType = "-60100" And pVal.BeforeAction = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
                Try
                    Dim oedit2 As SAPbouiCOM.EditText
                    oForm = SBO_Application.Forms.ActiveForm
                    oedit2 = oForm.Items.Item("U_EmpCode").Specific() <----
                Catch ex As Exception
                    MsgBox(ex.Message)
                End Try
                '  oedit2 = oForm.Items.Item("U_EmpCode").Specific()
            End If
    petr ,
    i have udf in employee master date.
    but still it is through error....

  • New Matrices on System Forms

    Is it possible to create an additional matrix on a system form?  If so, how?  I would greatly appreciate a code sample for doing this.  Thank you.

    hello Scott,
    You need to catch the et_Form_Load event of your form, and then you can add the matrix the same way you add matrix on user form.
    Public Sub Handle_SBO_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
    If pVal.BeforeAction = False Then
      If pVal.FormTypeEx="FormType of the system form" then
        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
          Dim oFom as SAPbouiCOM.Form
          oForm = oApplication.Forms.Item(FormUID)
          Dim oItem As SAPbouiCOM.Item
          Dim oMatrix As SAPbouiCOM.Matrix
          Dim oColumns As SAPbouiCOM.Columns
          Dim oColumn As SAPbouiCOM.Column
          oItem = oForm.Items.Add("UMatrix", it_Matrix)
          oItem.Top=100
          oItem.Left=100
          oMatrix = oItem.Specific
          oColumns = oMatrix.Columns
          oColumn = oColumns.Add("#", it_EDIT)
          oColumn.TitleObject.Caption = "#"
          oColumn = oColumns.Add("A", it_EDIT)
          oColumn.TitleObject.Caption = "A"
          oColumn = oColumns.Add("B", it_EDIT)
          oColumn.TitleObject.Caption = "B"
        End if
      End if
    end if
    End Sub

Maybe you are looking for