Skip to Content
0
Former Member
Nov 25, 2009 at 08:42 AM

Date Picker value is not pasted in EditText

262 Views

Hi all,

I have upgraded my Addon to SAP to 2007 A (PL: 05). I have a date EditText binded to a User Datasource in Service Contract form. When Addon is running (through vb.net), i click on date picker icon, i choose date but the date i choose does not get pasted in the EditText. I use the code from SDK samples.

Try
            oForm.DataSources.UserDataSources.Add("UDDate", SAPbouiCOM.BoDataType.dt_DATE)
            oItem = oForm.Items.Add("txtDate", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oItem.Top = oForm.Height - 100
            oItem.Height = 14
            oItem.FromPane = 7
            oItem.ToPane = 7
            oEdit = oItem.Specific
            'bind the text edit item to the defined used data source
             oEdit.DataBind.SetBound(True, "", "UDDate")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try


'In ItemEvent
If pVal.FormType = 60126 Then
            If pVal.EventType = SAPbouiCOM.BoEventTypes.et_PICKER_CLICKED Then
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(60126, pVal.FormTypeCount)
                oItem = oForm.Items.Item(pVal.ItemUID)
                oEdit = oItem.Specific
                SBO_Application.StatusBar.SetText("Picker Clicked of type " & oEdit.PickerType.ToString,
 SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
            End If
End If

Kind Regards,

Lena Apostolou