Skip to Content
avatar image
Former Member

UI oForms Item Edit with search

Hi All,

I haven't found anything on search to a related Field....

I add a Field

oItem = oForm.Items.Add("LCardCode", SAPbouiCOM.BoFormItemTypes.it_EDIT);

oItem.Left = 10 + StatWidth;

oItem.Width = StatWidth;

oItem.Top = 40;

oItem.Height = StatHight;

oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));

oEdit.DataBind.SetBound(true, "@MyUserTable", "U_SCardCode");

then add a linked Button

oItem = oForm.Items.Add("CardCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);

oLinkBtn = (SAPbouiCOM.LinkedButton)oForm.Items.Item("CardCode").Specific;

oLinkBtn.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner;

oItem.Left = StatWidth - 10;

oItem.Top = 40;

oItem.LinkTo = "LCardCode";

Like the CardCode Filed in BusinessPartner...

Any Ideas?

Best Regards

Oliver

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 28, 2015 at 01:36 PM

    Ok I Found the solution in ChoosfromList.

    Know I don't know the correct way of setting the Value back to my Form.

    oItem = oForm.Items.Add("LCardCode", SAPbouiCOM.BoFormItemTypes.it_EDIT);

    oItem.Left = 10 + StatWidth;

    oItem.Width = StatWidth;

    oItem.Top = 40;

    oItem.Height = StatHight;

    oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));

    oEdit.DataBind.SetBound(true, "@MyUserTable", "U_SCardCode");

    oEdit.ChooseFromListUID = "List";

    oEdit.ChooseFromListAlias = "CardCode";

    I Add an EventHandler

    and I try to set the EditItem

    SAPbouiCOM.EditText EditText = null;

    EditText = (SAPbouiCOM.EditText)oForm.Items.Item("LCardCode").Specific;

    EditText.Value = val;

    but I get an Exeption, no Focus for this Object...

    and writing to DB at this time is not the best Idea...

    What its the best way of doing this?

    Regards

    Oliver

    Add comment
    10|10000 characters needed characters exceeded