cancel
Showing results for 
Search instead for 
Did you mean: 

Choose From List - Is it possible to populate CFL by using a query?

Former Member
0 Kudos

Hi Experts,

I need to fill the CFL based on a transaction where there are 10 to 15 items.

But Item master contains more that 1000 items.

Is it possible to populate / fill the Choose from list by using a query or a recordset?

I cannot use any condition there as the filtering is based on items in another transaction.

Please help.

Thanks in advance.

Regards,

Toms

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Toms,

Offcource its possible to filter CFL by query

On et_CHOOSE_FROM_LIST And pVal.Before_Action = True try the code as

.....
.....
oCondition.Alias = "ItmsGrpCod"
oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
Dim strSQL As String
rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
strSQL = "Select ItmsGrpCod,ItmsGrpNam From OITB WHERE U_CompoCat = '" & strCondition & "'"
rs.DoQuery(strSQL)
oCondition.CondVal = rs.Fields.Item("ItmsGrpCod").Value
oChooseFromList.SetConditions(oConditions)

Thanks,

Mahesh

Edited by: Mahesh on Sep 3, 2010 5:06 PM

Former Member
0 Kudos

Dear Mahesh,

Thanks for ur reply.

how can I set conditions if the query returns 100 rows?

Here is the scenario:

We have a Sales estimation transaction in which there are more than 10 items used.

I want those 10 items as CFL in another transaction.

In this case, how can I set the condition?

Is there any 'IN' clause available like SAPbouiCOM.BoConditionOperation.co_EQUAL ?

Regards,

Toms

Former Member
0 Kudos

Hi,

Please mention exact senario about the transactions.

Thanks,

Mahesh

Former Member
0 Kudos

Dear Tom,

Is this Sales estimation transaction a sales quotation or a sales forecast?

Thanks,

Gordon

Former Member
0 Kudos

Hi Mahesh,

I tried your code with some other query.

Query returns 12 rows when I run it in SQL Server, but in CFL it shows only one record.

What shall I do to show all 12 rows in CFL output?

Regards,

Amrut Sabnis

Former Member
0 Kudos

Hi All,

Got the solution.

Regards,

Amrut Sabnis