on 07-30-2010 12:35 PM
Hi there,
i have to translate the following sql-condition to a bone-condition:
select * from (OCRD) where 'Value' in ('Value', 'Value1', 'Value2')
Is that possible? If yes... how?
Kind Regards
Hi Thomas,
Please explain what do you mean by "Bone-Condition"?
Regards,
Vítor Vieira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vitor,
i mean the Condition Object from the UI API.
from SDK-Help:
Set oCondition = oConditions.Add
'// ((CardType = 'C') Or
oCondition.BracketOpenNum = 2
oCondition.Alias = "CardType"
oCondition.Operation = co_EQUAL
oCondition.CondVal = "C"
oCondition.BracketCloseNum = 1
oCondition.Relationship = cr_OR
Set oCondition = oConditions.Add
'// (CardType = 'S'))
oCondition.BracketOpenNum = 1
oCondition.Alias = "CardType"
oCondition.Operation = co_EQUAL
oCondition.CondVal = "S"
oCondition.BracketCloseNum = 2
Regards
Thomas Mandlmeier
Hi Thomas,
Yes, it possible.
Here's a sample
Dim oRS As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(BoRecordSet)
oRS.DoQuery("SELECT ItemCode FROM OITM")
If oRS.RecordCount > 0 Then
oConds = New SAPbouiCOM.Conditions
While Not oRS.EoF
oCond = oConds.Add
oCond.Alias = "Code"
oCond.Operation = BoConditionOperation.co_EQUAL
oCond.CondVal = oRS.Fields.Item(0).Value.ToString.Trim
oRS.MoveNext()
If Not oRS.EoF Then oCond.Relationship = BoConditionRelationship.cr_OR
End While
End If
Regards,
Vítor Vieira
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.