Showing results for 
Search instead for 
Did you mean: 

How to enter value in Inactive form Fields

Former Member
0 Kudos

Hi Experts

I have careated a form with three fields Item Code, Item Desc and Item Qty. I attached a Choose list with Item code. I want to enter both value (Item code and Item Desc) from choose list but It does not enter because the base form is inactive . It only enter item code.



Accepted Solutions (0)

Answers (1)

Answers (1)

Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Gorge,

You should work with DataSource instead of seting the value EditText.String = "***" directly.

Set the value this way: itemDescDataSource.Value = "***"

sample code:

If pVal.FormTypeEx = "SMC_OMOV" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
            If pVal.BeforeAction = False Then
                Dim oCFLevent As SAPbouiCOM.ChooseFromListEvent = CType(pVal, SAPbouiCOM.ChooseFromListEvent)
                Dim oDataTable As SAPbouiCOM.DataTable = oCFLevent.SelectedObjects
                Dim oForm As SAPbouiCOM.Form = oApp.Forms.Item(pVal.FormUID)
                'Dim oEditText As SAPbouiCOM.EditText = oForm.Items.Item("eMovieName").Specific
                'oEditText.String = oDataTable.GetValue(0, 0)
                oForm.DataSources.DBDataSources.Item("@SMC_OMOV").SetValue("Code", 0, oDataTable.GetValue(0, 0))
                oForm.DataSources.DBDataSources.Item("@SMC_OMOV").SetValue("Name", 0, oDataTable.GetValue(1, 0))
            End If
        End If

Regards, Yatsea