Choose From List Condition
Dear Experts,
i want to select Items in Sales Quotation Screen which is from Particular Group, I'm using following code
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.BeforeAction = True Then
If pVal.FormTye = "149" And pVal.ItemUID = "38" And (pVal.ColUID = "1" Or pVal.ColUID = "3") Then
Try
oForm = SBO_Application.Forms.ActiveForm
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent = pVal
Dim sCFL_ID As String = oCFLEvento.ChooseFromListUID
Dim oCFL As SAPbouiCOM.ChooseFromList = Nothing
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
oCons = Nothing
oCon = Nothing
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "ItmsGrpCod"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "100"
oCFL.SetConditions(oCons)
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
End If
First time Its working fine. but i'm selecting the next time in next row or same row its not showing any item. it opens only empty Choose from list. what is the prblm
Mathi
The problem is that when this event is called again, the Conditions object still has the conditions from the last call :
oConditions = oCFL.GetConditions(); // this has all the previous set conditions
So the conditions set before are also taken into consideration. What you need to do is :
oCFL.SetConditions(null);
oConditions = oCFL.GetConditions();
This way the Conditions object will be empty. There is no method to remove a Condition from a Conditions collection, so you have to make it null.
Similar Messages
-
Choose from List Condition - SAP 9.0 visual studio 2010
Hi,
How to set condition for CFL. I am using SAP 9.0 Patch Level 12, Visual Studio 2010. I could find the event, ChooseFromListBefore event. I tried coding as below,but its not working:Got error like "Public member 'GetConditions' on type 'SBOItemEventArgClass' not found."
Private Sub ChooseFromListBefore(sboObject As System.Object, pVal As SAPbouiCOM.SBOItemEventArg, ByRef BubbleEvent As System.Boolean) Handles EditText0.ChooseFromListBefore.
Dim pCFL As SAPbouiCOM.ISBOChooseFromListEventArg = pVal
Dim oCond As SAPbouiCOM.Condition
Dim oconds As SAPbouiCOM.Conditions
' Adding Conditions to CFL1
oconds = pCFL.GetConditions() --Getting error in this line.
oCond = oconds.Add()
oCond.Alias = AliasName
oCond.Operation = Operation
oCond.CondVal = CondVal
pCFL.SetConditions(oconds)
end sub
Any help is appreciated.
Thanks in advance.
Parvatha Solai.NHi Parvatha,
The conditions should get from the CFL object it self, not the CFL Event object.
Dim oCFL = oForm.ChooseFromLists.Item("cflUID");
oConds = oCFL.GetConditions();
Regards
Edy -
Choose From List Condition Problem In Matrix
Hi,
I kept CFL for Vendor listing in matrix but if i press tab in the vendor column the BP form Apperas but both the customer record and Vendor records are coming i want only the vendor records to be listed in the CFL of BP so plz tell me the solution for this.
MadhaviHi,
Use following query...
Select CardCode,CardName,cardType from OCRD Where CardType='S'
CardType : S for Vendor,C for Customer,L for LEAD
Regards
Sanjay -
Choose From List Condition on Detail table field rather than Master table
Dear All,
I have a master detail udo having udts @master @detail
I need to filter my cfl object on bases of field in @detail table.
Can you tell how do I do this.Try
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
oform = sbo_app.Forms.Item("formuid")
oCFLs = oform.ChooseFromLists
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLCreationParams = sbo_app.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
' Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "yourobjectname"
oCFLCreationParams.UniqueID = "CFL1"
oCFL = oCFLs.Add(oCFLCreationParams)
' Adding Conditions to CFL1
oCons = oCFL.GetConditions()
oCon = oCons.Add()
'here which field u want to filter
oCon.Alias = "CardType"
'here condition
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCFL.SetConditions(oCons)
' oCFLCreationParams.UniqueID = "CFL2"
'oCFL = oCFLs.Add(oCFLCreationParams)
Catch
MsgBox(Err.Description)
End Try -
Multiple Values For one Condition in Choose From List
I have used one Business Partner Choose From List in my form but i want to give condition in that choose from list on GroupCode .But the condition will have multiple values like 100,102,104 then how i will write the code to incorporate multiple values for one single condition.
Hi,
Check this thread
How to set a Multiple condition in a single CFL
Hope that helps,
Vasu Natari. -
Choose from list - data display with condition
Hi,
I 've developed a form using screen painter, I ' ve attached a choose from list to fill GRPo Number. In the choose from list the GRPo no. should not display again which once I have selected and saved.
Let me have a good solution please and it would be appreciated.
Thanks & Regards,
Venkatesan G.Hi suresh,
where did you put this code?....In the choose_from_list event handler?..I've tried a similar solution, before reading your post, but it doesn't work because if i dynamically set the condition for the choose from list i got an empty table.
i've tried to put my code when beforeaction=true and i have this kind of problem. The difference is that i need to set the filter starting with the value i've entered on the field connected to the choose from list. I put code here, so it's more clear
If (pVal.Before_Action = True) And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST) Then
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim sItemCode As String
oEditText = oMatrix.Columns.Item("V_ItemCode").Cells.Item(pVal.Row).Specific
sItemCode = oEditText.Value.ToString
oCFL = oForm.ChooseFromLists.Item("CFL_Item")
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "ItemCode"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_START
oCon.CondVal = sItemCode
oCFL.SetConditions(oCons)
End If
My situation is that i type something in V_ItemCode column and after that i press the tab key to open the choose from list.
Would be ok if i get the SAP standard beahviour too, that doesn't open the choose from list, but fills the field with the first code starting with what you type.
Thanks in advance -
Delete/Edit/Update CFL Conditions - Choose From List
Hi All,
I have a Choose From List of which the conditions are set depending on a ComboBox.Selected.Value
oCon.CondVal = comboboxBranch.Selected.Value
So the Conditions are set when the "OnAfterComboSelect" event is trigered.
How do I reset the Condition when the user "RESELECTS" another ValidValue on that ComboBox???
At the moment, on the Reselection on the Combobox, the CFL is returning EMPTY.....
ThanksHi Michael,
Thanks for the speedy reply. Its workin.
Here's my code for the adding/editing of the Conditions from within the an Event Handler if any1 needs it.
In the OnAfterFormLoad Event Handler:
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
' Adding CFL3 for Line GL Account Name.
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "1"
oCFLCreationParams.UniqueID = "CFL3"
oCFL = oCFLs.Add(oCFLCreationParams)
In the 1st TabOrder Item's OnGotFocus Event Handler:
oColumn = oColumns.Item("AcctCode")
oColumn.ChooseFromListUID = "CFL3"
oColumn.ChooseFromListAlias = "FormatCode"
In the OnAfterComboSelect Event Handler:
oCFLs = form.ChooseFromLists
oCFL = oCFLs.Item("CFL3")
oCons = oCFL.GetConditions()
If oCons.Count = 0 Then
oCon = oCons.Add()
oCon.BracketOpenNum = 2
oCon.Alias = "GroupMask"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "7"
oCon.BracketCloseNum = 1
oCon.Relationship = BoConditionRelationship.cr_AND
oCon = oCons.Add()
oCon.BracketOpenNum = 1
oCon.Alias = "Postable"
oCon.Operation = BoConditionOperation.co_EQUAL
oCon.CondVal = "Y"
oCon.BracketCloseNum = 1
oCon.Relationship = BoConditionRelationship.cr_AND
oCon = oCons.Add()
oCon.BracketOpenNum = 1
oCon.Alias = "Segment_1"
oCon.Operation = BoConditionOperation.co_EQUAL
oCon.CondVal = comboboxBranch.Selected.Value
oCon.BracketCloseNum = 2
oCFL.SetConditions(oCons)
Else
oCon = oCons.Item(2)
oCon.CondVal = comboboxBranch.Selected.Value
oCFL.SetConditions(oCons)
End If -
Removing Duplicates from a choose from list
Hi All,
I have a choose from list of obj 73 )Catalog Numbers (Table OSCN)
I also added conditions in the CFL that it only shows the Substitute for the CardType = 'S' (Supllier) Business Partners.
But I want to remove all the duplicate Substitutes from the CFL so that only distinct Catalog Numbers shows in the CFL.
// Adding 2 CFL, one for the button and one for the edit text.
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "73";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add(oCFLCreationParams);
//Adding Conditions to CFL1
oCons = oCFL.GetConditions();
oCon = oCons.Add();
oCon.Alias = "Substitute";
SAPbobsCOM.Recordset oSuppliers = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
oSuppliers.DoQuery("Select Distinct t1.Substitute From OSCN t1 Join OCRD t2 on t1.CardCode = t2.CardCode Where t2.CardType = 'S' Group By t1.Substitute");
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
while (!oSuppliers.EoF)
oCon.CondVal = oSuppliers.Fields.Item(0).Value.ToString();
oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
oCon = oCons.Add();
oCon.Alias = "Substitute";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oSuppliers.MoveNext();
oCFL.SetConditions(oCons);
Please advise....
Kind Regards,
Brenden DraperHi Brenden,
what you are trying to archieve won't work. Simply because CFL is getting all row data from OSCN and ItemCode or CardCode can differ for a specific substitute.
For example.
ItemCode,CardCode,Substitute
ItemA,BP1,sub1
ItemA,BP2,sub1
Would be 2 resultlines both with sub1 as substitute.
SQL equivalent :
Select Distinct t0.* from oscn t0 inner join OCRD t1 on t0.CardCode = t1.CardCode where t1.CardType = 'S'
My advise would be to open a simple form with a grid and datatable bound.
Some lines of coding and you get all you need.
regards,
Maik -
Choose From List Cancel Button Throws Exception
Hi all,
When I click the "Cancel" Button on my CFL, I get an error....
EXCEPTION: Matrix__EBS_FRM_CRDCLM__64.OnAfterChooseFromList raised
No matching records found (ODBC -2028)
Any ideas???Hi
in your choose from list event add this condition
If Not pval.SelectedObjects Is Nothing Then
'write your code in this if condition
end if
hope it will help u.
Regards,
Mithun. -
Choose From List and Golden arrow link in System Matrix UDF column
I'm wondering if there is a way through the SDK to create a 'Choose From List' and Golden arrow linked button in a System Matrix UDF column?
For example the Item Code in a sales order matrix does both.Hi,
Try this code for adding CFL.
SAPbouiCOM.ChooseFromListCollection oCFLs = null;
SAPbouiCOM.Conditions oCons = null;
SAPbouiCOM.Condition oCon = null;
oCFLs = oForm.ChooseFromLists;
SAPbouiCOM.ChooseFromList oCFL = null;
SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "object id ";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add( oCFLCreationParams );
oColumn.ChooseFromListUID = "CFL1";
//where oColumn is the instance of that column.
Hope u will get help....
Thanks and Regards,
Lalit -
Choose from list in the system
Hi
I want to create the Choose from list in the System form (Employee Master Data) in the edit box. what is the coding for this ? can anyone help me ...
Regards
Bhuvana
Edited by: bhuvana eshwari on Aug 7, 2008 8:23 AMHi
i am adding three fields in Employe Master Data under Adminstration folder and fourth field in Employe Master Data,
Choose from list is added in the fourth field. please see this coding...
Public Class class1
Public WithEvents oApplication As SAPbouiCOM.Application
Private oOrderForm As SAPbouiCOM.Form
Private oNewItem As SAPbouiCOM.Item
Private oItem As SAPbouiCOM.Item
Private oFolderItem As SAPbouiCOM.Folder
Private oOptionBtn As SAPbouiCOM.OptionBtn
Private oCheckBox As SAPbouiCOM.CheckBox
Dim ostatic As SAPbouiCOM.StaticText
Dim ocombo As SAPbouiCOM.ComboBox
Dim oCompany As SAPbobsCOM.Company
Dim oRecordSet, rs1, rs2 As SAPbobsCOM.Recordset
Dim oSboGuiApi As SAPbouiCOM.SboGuiApi
Dim nerr As Long
Dim oedit, oedit1, oedit2 As SAPbouiCOM.EditText
Dim obutton As SAPbouiCOM.Button
Dim oform As SAPbouiCOM.Form
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
Public Sub setapplication()
Dim Cookie, EncryptedCookie, Connstring As String
Dim nerr As Long
oCompany = New SAPbobsCOM.Company
Connstring = Environment.GetCommandLineArgs.GetValue(1)
oSboGuiApi = New SAPbouiCOM.SboGuiApi
oSboGuiApi.Connect(Connstring)
oApplication = oSboGuiApi.GetApplication
oApplication.MessageBox("hi u r connected to the application")
Cookie = oCompany.GetContextCookie
EncryptedCookie = oApplication.Company.GetConnectionContext(Cookie)
nerr = oCompany.SetSboLoginContext(EncryptedCookie)
oApplication.MessageBox("single sign on worked")
If oCompany.Connected = False Then
nerr = oCompany.Connect
If nerr <> 0 Then
Else
oApplication.MessageBox("Company got connected successfully")
End If
End If
End Sub
Private Sub AddItemsToOrderForm()
oItem = oOrderForm.Items.Item("90")
oNewItem = oOrderForm.Items.Add("s1", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "Referal Name"
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oItem = oOrderForm.Items.Item("81")
oNewItem = oOrderForm.Items.Add("e1", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
oedit = oNewItem.Specific
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oedit.DataBind.SetBound(True, "OHEM", "U_rename")
oItem = oOrderForm.Items.Item("s1")
oNewItem = oOrderForm.Items.Add("s2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "ReferalEmp No "
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oItem = oOrderForm.Items.Item("e1")
oNewItem = oOrderForm.Items.Add("e2", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
oedit = oNewItem.Specific
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oedit.DataBind.SetBound(True, "OHEM", "U_reid")
oItem = oOrderForm.Items.Item("s2")
oNewItem = oOrderForm.Items.Add("s3", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "Floor"
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oItem = oOrderForm.Items.Item("e2")
oNewItem = oOrderForm.Items.Add("e3", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ocombo = oNewItem.Specific
ocombo.ValidValues.Add("", "")
ocombo.ValidValues.Add("FLOOR1", 0)
ocombo.ValidValues.Add("FLOOR2", 1)
ocombo.ValidValues.Add("FLOOR3", 2)
ocombo.ValidValues.Add("FLOOR4", 3)
ocombo.ValidValues.Add("FLOOR5", 4)
oNewItem.FromPane = 3
oNewItem.ToPane = 3
ocombo.DataBind.SetBound(True, "OHEM", "U_refl")
oItem = oOrderForm.Items.Item("3")
oNewItem = oOrderForm.Items.Add("s4", SAPbouiCOM.BoFormItemTypes.it_STATIC)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
ostatic = oNewItem.Specific
ostatic.Caption = "Referal Details"
oNewItem.FromPane = 0
oNewItem.ToPane = 0
oItem = oOrderForm.Items.Item("33")
oNewItem = oOrderForm.Items.Add("e4", SAPbouiCOM.BoFormItemTypes.it_EDIT)
oNewItem.Left = oItem.Left
oNewItem.Top = oItem.Top + 18
oNewItem.Width = oItem.Width
oNewItem.Height = oItem.Height
oNewItem.Visible = True
oedit = oNewItem.Specific
oNewItem.FromPane = 0
oNewItem.ToPane = 0
addcfl()
oedit.DataBind.SetBound(True, "OHEM", "U_refer")
oedit.ChooseFromListUID = "cfl_1"
oedit.ChooseFromListAlias = "firstName"
End Sub
Public Sub New()
MyBase.New()
setapplication()
End Sub
Private Sub LoadFromXML(ByRef FN As String)
Dim oXmlDoc As Xml.XmlDocument = New Xml.XmlDocument
Dim sPath As String
sPath = IO.Directory.GetParent(Application.StartupPath).ToString
oXmlDoc.Load(sPath & "\" & FN)
oApplication.LoadBatchActions(oXmlDoc.InnerXml)
End Sub
Public Sub oApplication_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
If pVal.FormType = "60100" Then
If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
oOrderForm = oApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
AddItemsToOrderForm()
End If
End If
If pVal.FormTypeEx = "60100" And pVal.ItemUID = "e4" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.InnerEvent = False Then
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
If oCFLEvento.Before_Action = True Then
oform = oApplication.Forms.ActiveForm
Try
oCFL = oform.ChooseFromLists.Item("cfl_1")
Dim oDataTable As SAPbouiCOM.DataTable
Dim oEdit As SAPbouiCOM.EditText
Dim Name As String
oform = oApplication.Forms.Item("60100")
oDataTable = oCFLEvento.SelectedObjects
oEdit = oform.Items.Item("e4").Specific
Name = oDataTable.GetValue("firstName", 0)
oEdit.String = Name
Catch ex As Exception
oApplication.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_None)
End Try
End If
End If
If oedit.Value = "firstName" Then
LoadFromXML("new.srf")
oform = oApplication.Forms.Item("re_form")
oform.Visible = True
oedit = oform.Items.Item("cf1").Specific
End If
End Sub
Private Sub addcfl()
Dim ocflcreation As SAPbouiCOM.IChooseFromListCollection
ocflcreation = oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
ocflcreation.MultiSelection = True
ocflcreation.ObjectType = "171"
ocflcreation.UniqueID = "cfl_1"
oCFLs = oform.ChooseFromLists
oCFL = oCFLs.Add(ocflcreation)
End Sub
End Class
Regards
Bhuvana -
Choose From list in Matrix UDF
i create a UDF in Sales Order Row, I want to assign choose From list in the Matrix for the UDF once user click on tab button.
How can i assign the Choose from list for the UDF column?Hi,
Try this code for adding CFL.
SAPbouiCOM.ChooseFromListCollection oCFLs = null;
SAPbouiCOM.Conditions oCons = null;
SAPbouiCOM.Condition oCon = null;
oCFLs = oForm.ChooseFromLists;
SAPbouiCOM.ChooseFromList oCFL = null;
SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams = null;
oCFLCreationParams = ( ( SAPbouiCOM.ChooseFromListCreationParams )( SBO_Application.CreateObject( SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams ) ) );
oCFLCreationParams.MultiSelection = false;
oCFLCreationParams.ObjectType = "object id ";
oCFLCreationParams.UniqueID = "CFL1";
oCFL = oCFLs.Add( oCFLCreationParams );
oColumn.ChooseFromListUID = "CFL1";
//where oColumn is the instance of that column.
Hope u will get help....
Thanks and Regards,
Lalit -
Choose from list for purchase Item
Dear Experts,
i have created Choose from list in matrix using Screen Painter. its working properly but i want to display only Purchase Items in CFL.
For Customer we are using
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "CardType"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCFL.SetConditions(oCons)
Like this, How to set condition for Purchase items thru coding or Screen painter
MathiHi Mathi,
Try this and tell me if it worked.
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "PrchseItem"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "Y"
oCFL.SetConditions(oCons)
If this works dont forget to reward points..
Regards,
Vasu Natari.
Edited by: vasu natari on Jul 29, 2008 12:37 PM -
Add Choose From List to a Matrix
Hi,
Need help on how to add a choose from list to a matrix column?
Thanks!Hi,
Step1 :First step is to create the CFL as below
Private Sub AddChooseFromListToWorkOrder()
'Choose From List Collection object to store the collection
Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
'Conditions object to set the conditons
Dim oCons As SAPbouiCOM.Conditions
'Condition object to set the conditons
Dim oCon As SAPbouiCOM.Condition
'Getting the Form Choose From Lists
oCFLs = oForm.ChooseFromLists
'Choose From List object to store the ChooseFromList
Dim oCFL As SAPbouiCOM.ChooseFromList
'ChooseFromListCreationParams to create the parameters for the CFL
Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
oCFLCreationParams = oSBOApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCFLCreationParams.MultiSelection = False
oCFLCreationParams.ObjectType = "4"
oCFLCreationParams.UniqueID = "UDCFL1"
oCFL = oCFLs.Add(oCFLCreationParams)
' Adding Conditions to CFL
oCons = oCFL.GetConditions()
oCon = oCons.Add()
oCon.Alias = "U_HasPSC"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "Y"
oCFL.SetConditions(oCons)
End Sub
Step2: Then add this cfl in form load
AddChooseFromListToWorkOrder()
oMatrix = oForm.Items.Item("matItems").Specific
oColumns = oMatrix.Columns
oColumn = oColumns.Item("colItem")
oColumn.ChooseFromListUID = "UDCFL1"
oColumn.ChooseFromListAlias = "ItemCode"
Step 3: catch the CFL Event in Item events of the form
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
oForm = oSBOApplication.Forms.Item("IS_WKORDER")
Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
oCFLEvento = pVal
Dim sCFL_ID As String
sCFL_ID = oCFLEvento.ChooseFromListUID
Dim oCFL As SAPbouiCOM.ChooseFromList
oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
If oCFLEvento.BeforeAction = False Then
Dim oDataTable As SAPbouiCOM.DataTable = oCFLEvento.SelectedObjects
'oForm.DataSources.DBDataSources.Add("@IS_WKO_ROWS")
Try
If pVal.ItemUID = "matItems" And pVal.ColUID = "colItem" And oCFL.UniqueID = "UDCFL1" Then
oMatrix = oForm.Items.Item("matItems").Specific
oEdit = oMatrix.Columns.Item(2).Cells.Item(pVal.Row).Specific
oEdit.Value = oDataTable.GetValue(1, 0).ToString()
oEdit = oMatrix.Columns.Item(4).Cells.Item(pVal.Row).Specific
oEdit.Value = strUOM
oEdit = oMatrix.Columns.Item(5).Cells.Item(pVal.Row).Specific
oEdit.Value = strPSCode
oEdit = oMatrix.Columns.Item(1).Cells.Item(pVal.Row).Specific
oEdit.Value = oDataTable.GetValue(0, 0).ToString()
End If
Catch ex As Exception
End Try
End If
End If
Hope This helps
Regards,
Noor
Edited by: noor_023 on Mar 31, 2010 10:55 AM -
This should be obvious, but I can't find it anywhere in Automator's documentation. I'm trying to create a workflow using the "Choose from List" action, whose input is supposed to be a (text) list of items. So I'm trying to send it a list of items using the "Get Specified Text" action.
However, all the items in my text list always appear as a single line in the list selection box. I've tried separating the text items with commas, semicolons, returns, etc with no luck getting multiple items in the list. Is there some secret delimiter character I don't know about?
I'm new to Mac, so maybe it's just one of those things I haven't learned about yet.Hi Vitor,
Thanks for the answer but I have my form in a XML since the beginning and it works fine until I use that patch.
In the bneginning I thoug tha my XML was corrupted but I recreate it and put the condition from the code but the Choose is always empty, I gonna check the conditions again but if someone knows anything please let me know.
Thanks.
Maybe you are looking for
-
What are the steps to send sales order custom field from CRM to ECC
Hi Xperts, We have created a custom field in sales order [ VBAK] and successfully replicate its value from ECC to CRM. But while doing the enhancement to replicate the field value from CRM to ECC [ When the SO is created in CRM ] we are not able to
-
Milestone payment for vendor in project system
Dear sapient As per our client requirement vendor payment is based on the basis of milestone i.e activity based. As per the contract agreement payment is made on the basis of certain percentage as mention below. 1st payment 5% of total order value (w
-
Preflight Panel. Could this be DONE?
Hello. I'm fairly new with creating custom panel for Photoshop CS4/CS5 and I'm just wondering if creating a mini Preflight panel that reports details about an active document is possible. Similar to the screenshot below. Thanks.
-
Hi all, Been a Linux user for 4 years and decided to install Arch. Must say, I'm very impressed! But a few things have got me puzzled and the main one is that Gnome doesn't seen to be remembering my settings nor do I have the "shutdown" menu under "S
-
I essentially have one large pdf document (1,050 total pages) that consists of 525 individual 2-page letters. I have a second pdf document that is just 1 page, but needs to be inserted 525 times so that it is incorporated into each of the 525 individ