Skip to Content
author's profile photo Former Member
Former Member

Right Click Menu

Hai To All,

I have created the User defined Screen in UDO. My aim is that on that screen i entered 2 rows by default i set the third row as empty.

Now if i want to delete that empty row it should not. This is same in SAP screen.If we are in last row on that right click i enable delete row option the last row should not be delete.

Does anyone have idea.........Reply me




Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2007 at 09:07 AM

    Try this one


    Item event-----

    Here u give ur menu id------

    Dim oMenuItem As SAPbouiCOM.MenuItem

    Dim oMenus As SAPbouiCOM.Menus


    Dim oCreationPackage As SAPbouiCOM.MenuCreationParams

    oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)

    oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING

    oCreationPackage.UniqueID = "delrow"

    oCreationPackage.String = "Delete Row"

    oCreationPackage.Enabled = True

    oMenuItem = SBO_Application.Menus.Item("1280") 'Data'

    oMenus = oMenuItem.SubMenus


    Catch ex As Exception



    End Try


    Catch ex As Exception

    End Try


    menu event---

    If pVal.MenuUID = "delrow" And pVal.BeforeAction = False Then

    Dim omatrix As SAPbouiCOM.Matrix

    QBOM = SBO_Application.Forms.ActiveForm()

    Dim oit As SAPbouiCOM.Item

    oit = QBOM.Items.Item("")

    omatrix = oit.Specific


    If QBOM.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then

    QBOM.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE

    End If

    Dim oColumns_dup As SAPbouiCOM.Columns

    Dim oColumndup As SAPbouiCOM.Column

    oColumns_dup = omatrix.Columns

    Dim oTxt As SAPbouiCOM.EditText

    oColumndup = oColumns_dup.Item("") 'specifies itemno column

    oTxt = oColumndup.Cells.Item(omatrix.RowCount).Specific 'specefies row

    oTxt.Value = 0

    End If

    Add comment
    10|10000 characters needed characters exceeded