on 10-16-2008 9:39 AM
Hi
in an application i have to use tab functionality to select a query.
that query should retrieve the GRPO number which are opened and whose vendor code is equal to value in the text box of my form..
how to pass the value in text box to the query
is there any posibility
Hi
You need to add to your CFL (tab functionality) the Condition object.
Search Condition Object for details in UI API Objects Reference of SDK Help.
Some examples
-
To get value of ItemCode in your edit text box:
sValue = oForm.Items.Item("eITEMCODE").Specific.Value
This is only an example how it can be used on an form based on matrix.
Private Sub Form_Matrix_SetConditions(ByRef oForm As SAPbouiCOM.Form)
Dim oMatrix As SAPbouiCOM.Matrix
Dim oConditions As SAPbouiCOM.Conditions
Dim oCondition As SAPbouiCOM.Condition
Try
oMatrix = oForm.Items.Item("mtx00").Specific
If oMatrix Is Nothing Then Throw New Exception("ERROR: matrix object is nothing.")
oConditions = SBO_Application.CreateObject(BoCreatableObjectType.cot_Conditions)
' ++++++++++++++++++++++++++++++++++++++++++++
' From/To ItemCode
' ++++++++++++++++++++++++++++++++++++++++++++
If Not glo_sArti1.Equals("") And Not glo_sArti2.Equals("") Then
'// AND (P.U_CodArti BETWEEN '" & s1.Trim & "' AND '" & s2.Trim & "')"
oCondition = oConditions.Add
oCondition.BracketOpenNum = 1
oCondition.Alias = "U_CodArti"
oCondition.Operation = co_BETWEEN
oCondition.CondVal = glo_sArti1
oCondition.CondEndVal = glo_sArti2
oCondition.BracketCloseNum = 1
Else
If Not glo_sArti1.Equals("") Then
'// AND P.U_CodArti = '" & s1.Trim & "'"
oCondition = oConditions.Add
oCondition.Alias = "U_CodArti"
oCondition.Operation = co_EQUAL
oCondition.CondVal = glo_sArti1.Trim
End If
If Not glo_sArti2.Equals("") Then
'// AND P.U_CodArti = '" & s1.Trim & "'"
oCondition = oConditions.Add
oCondition.Alias = "U_CodArti"
oCondition.Operation = co_EQUAL
oCondition.CondVal = glo_sArti2.Trim
End If
End If
' ... other conditions ...
'// Execute the query with the conditions collection
oForm.DataSources.DBDataSources.Item("@MY_TABLE").Query(oConditions)
oMatrix.LoadFromDataSource()
oMatrix.SelectionMode = BoMatrixSelect.ms_Single
Catch ex As Exception
Dim s As String = ex.Message
Finally
System.GC.Collect()
End Try
End Sub
Regards
Sierdna S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahendra
How r u doing this by Choose form the list method or formatted search
What is GRPO ?
Regards,
Pavana Punja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.