Skip to Content
avatar image
Former Member

Update and combobox

Hi all!

I have a problem that i to reach impasse.There fore,Can you help me?

i am writting code for your's form ,This Form have one datagrid to display datagrid ,I used 1 Combobox to select values for sex(nam,nu), Ok button ,cancel button and new button.


I used code for ok button and update button but it only request command ok but not run update when i changes value of column name child ="nguyen van Huynh"

oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)

oItem.Left = 700

oItem.Width = 65

oItem.Top = 330

oItem.Height = 19

oItem.AffectsFormMode = True

oBtn = oItem.Specific

oBtn.Caption = "&Ok"

Can you help me rewrite code for update button?


I used 1 Combobox to select values for sex(nam,nu) in datagrid.i dont know to write code for combobox in this case.

Can you help me rewrite code for update button?">[IMG][/IMG]>

Thank you !

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 20, 2008 at 03:15 AM

    Hello Huynh,

    As I mentioned before, the simplest solution for your requirement is UDO, therefore you don't need to rewrite the code of update, people here rarely rewrite the update logic of the form, instead just reuse the default implemenation of update in B1. The only magic is databind in your form. You can use UDO Form Generator in B1DE to create the form for you. Form/DataBind has been done. Then the browse, update function has been done by B1.

    Also think about the flexibility of design, what if the employee has more than 5 children.

    1. Create your own UDT and UDO instead of UDFs in OHEM, thus you can use UDO, you don't need to do with Add, Update.

    Example: your UDT can be like this

    AMI_OHEM : U_EmpID (This field works a link to EmpID in OHEM, just forget the UDFs in OHEM)

    AMI_HEM1: U_Child, U_DateOB, U_Sex (Child Table, a matrix of children, support as many as children, just set the valid values for U_Sex, then it will be generated as comobox in UDO form by UDO Form Generator, by the way the children grid view will be generated as matrix, not grid in the udo form generator.)

    2. Use UDO Form Generater in B1DE to generate the form.

    3. Open this UDO form when click the view children button in employee master data form.

    This is the right way. Hope it is clear

    Kind Regards


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 18, 2008 at 11:02 AM

    Hi Huynh Nguyen ,

    which form are you using?

    form created through coding or SRF(screen painter)

    SRF means define your OK button unique id as 1. cancel as 2 then check,

    1.all of your columns are binded correctly to your UDT

    2.check your UDO s..

    if everything correct the form behave like normal SAP Form..

    No need do change form mode manually..


    Ganesh k

    Add comment
    10|10000 characters needed characters exceeded