Skip to Content
0
May 14, 2008 at 09:46 AM

chose from list use by screen painter?

71 Views

hi all

we are using same thing that is use in sample file(chose from list) but difference is screen pinter.

whne i have selected value from chose from list no value is showing in editbox......

Dim oedit As SAPbouiCOM.EditText

oedit = oForm.Items.Item("kk").Specific

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then

Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent

oCFLEvento = pVal

Dim sCFL_ID As String

sCFL_ID = oCFLEvento.ChooseFromListUID

Dim oForm As SAPbouiCOM.Form

oForm = SBO_Application.Forms.Item(FormUID)

Dim oCFL As SAPbouiCOM.ChooseFromList

oCFL = oForm.ChooseFromLists.Item(sCFL_ID)

If oCFLEvento.BeforeAction = False Then

Dim oDataTable As SAPbouiCOM.DataTable

oDataTable = oCFLEvento.SelectedObjects

Dim val As String

Try

val = oDataTable.GetValue(0, 0)

Catch ex As Exception

End Try

If (pVal.ItemUID = "kk") Or (pVal.ItemUID = "an") Then

oedit.Value = val ''''''''''''''''''''''''''''''''''''''''''''''''''''' i think here is mistake''''''''''''''''''''''''''''''

End If

End If

End If

If (FormUID = "FBLK") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) Then

Windows.Forms.Application.Exit()

End If

End Sub

Private Sub AddChooseFromList()

Try

Dim oCFLs As SAPbouiCOM.ChooseFromListCollection

Dim oCons As SAPbouiCOM.Conditions

Dim oCon As SAPbouiCOM.Condition

oCFLs = oForm.ChooseFromLists

Dim oCFL As SAPbouiCOM.ChooseFromList

Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams

oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)

' Adding 2 CFL, one for the button and one for the edit text.

oCFLCreationParams.MultiSelection = False

oCFLCreationParams.ObjectType = "2"

oCFLCreationParams.UniqueID = "CFL_2"

oCFL = oCFLs.Add(oCFLCreationParams)

' Adding Conditions to CFL1

oCons = oCFL.GetConditions()

oCon = oCons.Add()

oCon.Alias = "CardType"

oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL

oCon.CondVal = "C"

oCFL.SetConditions(oCons)

oCFLCreationParams.UniqueID = "CFL_3"

oCFL = oCFLs.Add(oCFLCreationParams)

Catch

MsgBox(Err.Description)

End Try

End Sub

plz could u help me????