Skip to Content

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

*Add the text field and binding data for that text field !*

Hi all,

I have a scenario :

In the module HR -> Employee Master Data, I want to add a text field (That textfield is equal to a new field in OHEM Table)and binding data from OHEM table for that text field.

This code is:

Public Sub ItemEvenHanlderEmployee(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, _

ByRef BubbleEvent As Boolean) Handles oApp.ItemEvent

If "60100" = pVal.FormType And pVal.Before_Action = False Then

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then

Dim oItem As SAPbouiCOM.Item = Nothing

Dim oForm As SAPbouiCOM.Form = oApp.Forms.Item(FormUID)

Dim oItems As SAPbouiCOM.Items = oForm.Items

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

oItem = oForm.Items.Add("Emp_No", SAPbouiCOM.BoFormItemTypes.it_EDIT) 'Add(Textfields)

oItem.Top = oItems.Item("1").Top

oItem.Left = oItems.Item("2").Left + oItems.Item("2").Width + 10

oItem.Width = 70

oItem.Height = 14

'Dim sndButton As SAPbouiCOM.Button = oItem.Specific

Dim sndButton1 As SAPbouiCOM.Cell = oItem.Specific 'Add TextFields

' Binding data

Dim oDS As SAPbouiCOM.DBDataSource

oDS = oApp.Forms.Item(FormUID).DataSources.DBDataSources.Item("OHEM")

End If

End If

End Sub

Plz tell me detail steps so I can add a text field and binding data from OHEM.

Many thks !

Former Member
Former Member replied

hi,

oEdit.DataBind.SetBound(True, "OHEM", "UserField")

mention user field as your table field name which starts with U_

regards,

varma

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question