CFL Problem
hi,
i hav created a exe file for my project.......when i run my project in client machine,in the addon when i click * & press enter in the CFL the records are invisible but the s.no for the records is displaying.....can anyone pls help me for this problem....actually the data is there in CFL but it's invisible.
Dear dileep varma
While setting a column width to 0 - the column becomes unvisible
(regardless the value in the visible property).
For some columns, the value in the width field is 0 and as a result the
columns are invisible in the form.
Therefore, In order to be able to view those columns, the width should
be updated with the following code:
'change the width of all the visible items
For i = 0 To oColsPreferences.Count - 1
'check if the item is visible
If oColsPreferences.Item(i).VisibleInForm = BoYesNoEnum.tYES Then
'set the width of the item
oColsPreferences.Item(i).Width = 100
End If
Next
Similar Messages
-
hi all good morning.... i have one problem i assigned query cfl for matrix field. the value fetch based on header level.... the query fetch the data but its not show the CFL window..here i pasted my code
Case "matvariant"
Select Case pVal.ColUID
Case "Col_Colour"
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_GOT_FOCUS
Dim oForm As SAPbouiCOM.Form = gonAppApplication.Forms.Item("VARAINT")
Dim sQuery As String = "SELECT T1.[U_U_COLOR] FROM [dbo].[@ITEMCOLOR_DETAIL] T0 inner join [dbo].[@ITEMCOLOR_HEADER] T1 on t0.docentry=t1.docentry WHERE T0.[U_Itmcode] !='' and T0.[U_Avail] ='y' and T0.[U_Itmcode] = '" & oForm.Items.Item("txticode").Specific.Value & "'"
oGeneral.SetConditionToCFL1(oForm, "COLITEMCFL1", "U_ID", sQuery)
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
Dim bonCflEvents As SAPbouiCOM.ChooseFromListEvent
Dim bonDTTable As SAPbouiCOM.DataTable
Dim bonCflList As SAPbouiCOM.ChooseFromList
Dim bnnstrUID As String
bonCflEvents = pVal
bnnstrUID = bonCflEvents.ChooseFromListUID
bonDTTable = bonCflEvents.SelectedObjects
bonCflList = lonConvForm.ChooseFromLists.Item(bnnstrUID)
If Not (bonDTTable Is Nothing) Then
If bonCflList.UniqueID = "COLITEMCFL1" Then
gonMatConvMatrix.GetLineData(pVal.Row)
gonMatConvMatrix.GetLineData(pVal.Row)
lonDetailDatasource.SetValue("U_Col_COLOR", lonDetailDatasource.Offset, bonDTTable.GetValue("U_COLOR_NAME", 0))
gonMatConvMatrix.SetLineData(pVal.Row)
If pVal.Row = gonMatConvMatrix.VisualRowCount Then
lonDetailDatasource.SetValue("U_Col_COLOR", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("U_Col_LENGTH", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("U_Col_WIDTH", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("U_Col_THICK", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("U_Col_SIZE", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("U_Col_Desc", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("U_Col_Price", lonDetailDatasource.Offset, "")
lonDetailDatasource.SetValue("LineId", lonDetailDatasource.Offset, pVal.Row + 1)
gonMatConvMatrix.AddRow()
gonMatConvMatrix.SetLineData(pVal.Row + 1)
gonMatConvMatrix.FlushToDataSource()
End If
Else
End If
End If
End Select
End Select
Edited by: narain.balan on Oct 26, 2010 7:02 AMHi
Please post the function code oGeneral.SetConditionToCFL1(oForm, "COLITEMCFL1", "U_ID", sQuery)
I think the problem is with choose from list condition.
Regards
Arun -
Hello
I have a following problem:
I want to make one column in matrix editable and CFL(from OITM).
If I bind it with userdatasource, the chosen value cannot be changed later.
If I bind it with DBdatasource, when I choose the proper value in CFL, I get an error :Bad form Value.
I made very similar thing but not with columns(with form items) and then I could bind an item with EditText field and everything was cool. edittext1 = (SAPbouiCOM.EditText)oItem.Specific;
But now I cannot convert a column to EditText object
Anybody help me, please?Could you send me more code to look for the problem?
Regards,
J: -
Hi expert , cfl problem in matrix
Hi friend,
i am added two cfl in user form but first cfl working fine but when i using second cfl it bind same value in the seconf row also.
Regards
Rajkumar Guptathanks for reply
ElseIf (pVal.ItemUID = "38") And (pVal.ColUID = "ItemCode") And 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
If oDataTable Is Nothing Then
Exit Sub
End If
Dim Code As String = ""
Dim Name As String = ""
Dim cflValBefore As String = ""
Dim i As Integer = 0
Code = oDataTable.GetValue(0, 0)
Name = oDataTable.GetValue(1, 0)
Try
' If (pVal.ItemUID = "38") And (pVal.ColUID = "ItemCode") Then
oMatrix = oForm.Items.Item("38").Specific
For i = 0 To oDataTable.Rows.Count - 1
'cflValBefore = oForm.DataSources.DBDataSources.Item(0).GetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset)
oForm.DataSources.DBDataSources.Item(1).SetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("ItemCode", 0))
oForm.DataSources.DBDataSources.Item(1).SetValue("U_ItemDec", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue(1, 0))
'oForm.DataSources.DBDataSources.Item(1).SetValue("U_BOM", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("ItemCode", 0))
'oForm.DataSources.DBDataSources.Item(1).SetValue("U_ProdO", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("ItemCode", 0))
cflValBefore = oForm.DataSources.DBDataSources.Item(1).GetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset)
If oForm.Mode <> SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_itemCode", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_ItemDec", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
End If
''For Bom
If Trim(cflValBefore) <> "" Then
If CheckBOM(Trim(cflValBefore)) = True Then
oForm.DataSources.DBDataSources.Item(1).SetValue("U_BOM", oForm.DataSources.DBDataSources.Item(1).Offset, CStr(oDataTable.GetValue("ItemCode", 0)))
Else
oForm.DataSources.DBDataSources.Item(1).SetValue("U_BOM", oForm.DataSources.DBDataSources.Item(1).Offset, "")
ItemcodeProduction = cflValBefore
End If
End If
''For Production Order
If Trim(cflValBefore) <> "" And Docnum <> "" Then
Dim check As String = CheckPO(Trim(cflValBefore), Docnum)
If check <> "" Then
oForm.DataSources.DBDataSources.Item(1).SetValue("U_ProdO", oForm.DataSources.DBDataSources.Item(1).Offset, CStr(check))
Else
oForm.DataSources.DBDataSources.Item(1).SetValue("U_ProdO", oForm.DataSources.DBDataSources.Item(1).Offset, "")
ItemcodeProduction = cflValBefore
End If
End If
oMatrix.SetLineData(pVal.Row)
Next
' End If
' SetInitialDataWorkOrder()
Catch ex As Exception
'MsgBox(ex.Message)
ShowErrMsg(" Event Error et_CHOOSE_FROM_LIST: 38 matrix " & ex.Message)
End Try
End If ' BeforeAction
ElseIf (pVal.ItemUID = "38") And (pVal.ColUID = "LPO") And 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
If oDataTable Is Nothing Then
Exit Sub
End If
Dim Code As String = ""
Dim Name As String = ""
Dim cflValBefore As String = ""
Dim i As Integer = 0
Code = oDataTable.GetValue(0, 0)
' Name = oDataTable.GetValue(1, 0)
Try
' If (pVal.ItemUID = "38") And (pVal.ColUID = "ItemCode") Then
oMatrix = oForm.Items.Item("38").Specific
For i = 0 To oDataTable.Rows.Count - 1
cflValBefore = oForm.DataSources.DBDataSources.Item(1).GetValue("U_ProdO", oForm.DataSources.DBDataSources.Item(1).Offset)
oForm.DataSources.DBDataSources.Item(1).SetValue("U_ProdO", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("DocNum", 0))
oForm.DataSources.DBDataSources.Item(1).SetValue("U_OrderD", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("PostDate", 0))
'oForm.DataSources.DBDataSources.Item(1).SetValue("U_DueDate", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("DueDate", 0))
oForm.DataSources.DBDataSources.Item(1).SetValue("U_Status", oForm.DataSources.DBDataSources.Item(1).Offset, oDataTable.GetValue("Status", 0))
If oForm.Mode <> SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_ProdO", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_OrderD", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
' If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_DueDate", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
If cflValBefore <> oForm.DataSources.DBDataSources.Item(1).GetValue("U_Status", oForm.DataSources.DBDataSources.Item(1).Offset) Then oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
End If
oMatrix.SetLineData(pVal.Row)
Next
' End If
'SetInitialDataWorkOrder()
Catch ex As Exception
'MsgBox(ex.Message)
ShowErrMsg(" Event Error et_CHOOSE_FROM_LIST: 38 matrix LPO " & ex.Message)
End Try
End If ' BeforeAction
ElseIf pVal.ItemUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.BeforeAction = True Then 'And pVal.BeforeAction = False Then
Dim oQty As SAPbouiCOM.EditText
Dim oBOM As SAPbouiCOM.EditText
Dim oDueDate As SAPbouiCOM.EditText
Dim oLPO As SAPbouiCOM.EditText
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
oMatrix = oForm.Items.Item("38").Specific
If oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Or oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Or oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE Then
' If pVal.ActionSuccess = True Then
Dim ctr As Integer = 1
If oMatrix.VisualRowCount >= 1 Then
For ctr = 1 To oMatrix.VisualRowCount
oQty = colQtyWO.Cells.Item(ctr).Specific
oBOM = colLBOM.Cells.Item(ctr).Specific
oDueDate = colDueDate.Cells.Item(ctr).Specific
'Dim wo As SAPbouiCOM.EditText
'wo = oMatrix.Columns.Item("LPO").Cells.Item(ctr).Specific
'code for update the table uin number
oLPO = oMatrix.Columns.Item("LPO").Cells.Item(ctr).Specific
Dim proorder As String = ProductionOrder(oQty.Value, oBOM.Value, CDate(oDueDate.Value))
'oLPO.Value = ProductionOrder(oQty.Value, oBOM.Value, CDate(oDueDate.Value))
If proorder <> "" Then
'oLPO = oMatrix.Columns.Item("LPO").Cells.Item(pVal.Row).Specific
'oLPO.Value = ProductionOrder(oQty.Value, oBOM.Value, CDate(oDueDate.Value))
UpdateForm(proorder, Docnum)
ItemcodeProduction = ""
QtyProduction = ""
End If
Next
End If
'End If ' action close
End If 'mode close
'ProductionOrder(10, "A00001") -
My remotecontrol will not work !
1mdayton wrote:
My remotecontrol will not work !
Sorry to hear you are having a problem with your Comcast remote control. I would like to suggest a few things before having you exchange the remote control.
First, try changing the batteries in the remote control.
Another thing to try would be to unplug your cable box from the AC power outlet and then plug it back in again. That may straighten things out.
Sometimes there can also be interference with compact florescent light bulbs (CFLs) in the room (details below).
If you are still having a problem, you can exchange your Comcast remote control. Call us at 1-800-COMCAST and we can arrange to get a replacement remote control out to you.
Compact fluorescent lights and TV backlighting have both been known to interfere with commands from a TV remote control. There could be interference with CFL (compact fluorescent bulbs) or any IR (infrared light) coming from the actual TV set. If you have CFLs in the room, try turning them off and then trying the remote control to narrow down the issue.
Also, turn off the TV set and then use the remote on the cable box to see if the cable box is more responsive (watch the LED front panel display). That may indicate a setting with the TV backlighting that may need to be adjusted.
From wikipedia below: http://en.wikipedia.org/wiki/Compact_fluorescent_lamp
Infra-red signals Electronic devices operated by infra-red remote control can interpret the infra-red light emitted by CFLs as a signal, this limits the use of CFLs near televisions, radios, remote controls, or mobile phones. [85]
Also from Consumer Reports in 2007: http://news.consumerreports.org/home/2007/11/cfl-problems.html
A good resource on this topic here: http://forums.x10.com/index.php?topic=16475.0 -
Problem with configuration in my CFL
Hi,
I have a problem in my CFL that link with ObjectType = "2", and I want to add one more column in my CFL, I obtained this but in no-one row of this Column they exist data. What it can be happening?
I verified in my database if they exist data of this column and they are there.
How I decide this?
I do not obtain to make to appear them.Hi Frederico,
Have you tried typing the query in query manager and are you sure you've selected the correct column? You can check the column name if you switch system information on and verifying the values in the database for that column.
Hope it helps,
Adele -
Hi All,
I have a problem in the CFL.
1. I have set an object Type 20 ( oPurchaseDeliveryNotes) for getting a List of Goods Receipt details in the CFL in that for status column it shows the heading as Qty how to change Heading as status.
2. I have set an object Type 59 (oInventoryGenEntry) for this CFL i am getting the title as 'List of Goods Receipt' as same as for oPurchaseDeliveryNotes how to change the title for this.
Thanks in Advance,
MadhaviHi David,
I created a new object for the cfl form and gave the object no to the form but not getting the result. The code i used follows:
Private oFormCFL As SAPbouiCOM.Form
Inside the CFL Function:
oFormCFL = SBO_Application.Forms.Item("10058")
oFormCFL.Title = "List Of SubContract"
Madhavi -
Hi,
I have a problem in CFL. I am taking the GRN No in the CFL. If i choose the GRN No automatically vendor code and item code should display to the particular GRN No if i choose from the CFL its displaying correctly in the text fields. But instead of going to the CFL screen if i type the GRN No in the GRN No text and press tab its not taking the correct grn no.
For GRNNo i am setting the Docnum to that field so while choosing its mapping the docnum correctly to the GRN text field. if i type the GRN No and press tab means it is not mapping correctly.
for example:
I want to inspect for the GRN No 314 so i am typing it in the text and press tab. i want the record for docnum 314 but when i press the tab it changes to 4 and taking the details of docnum 4. For docnum 4 the docentry is 314. What happens is if i type docnum 314 and press tab its taking docentry 314 and gives the details for docnum 4.
What i want is if i type 314 docnum it should not change to 4 i want the details of 314 docnum itself how to solve this problem.
Regards,
Madhavihi,
I used the following code plz verify it and tell where i go wrong
val = oDataTable.GetValue(1, 0)
val1 = CDate(oDataTable.GetValue(10, 0)).ToString("yyyyMMdd")
If (pVal.ItemUID = "txtgrnno") Then
Dim oDS As SAPbouiCOM.DBDataSource
oDS = oForm.DataSources.DBDataSources.Item("@PSSIT_NQCHDR") 'add your dbdatasource here
oDS.SetValue("U_grnno", oDS.Offset, val) ' val1 is the value you are setting
oDS.SetValue("U_grndate", oDS.Offset, val1)
End If -
Hi All !!!!
I have created an user defined form and add a field which i have bound with a table column. The data type of that column is integer. Now when I am trying to bind that field from a CFL it is throwing the exception.
Is there any restriction in SDK that we cannot bind a CFL to a field bound with a numeric data type???Hi
Bind that field to an alphanumeric field and try
Regards
Arun -
Problem Occurs when CFL is added with User defined field
form-672-BOM
item-3-datagrid
U_EmpNo - user defined field column
if i will give following codes under form load event will CFL bound with U_EmpNo
or else plz suggest me with write codes
oForm = SBO_Application.Forms.Item("672")
oItem = oForm.Items.Item("3")
oClmn = oItem.Specific
oClmns = oClmn.Item("U_EmpNo")
oClmns.DataSources.UserDataSources.Add("U_EmpNo", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
MessageBox.Show("Did")
AddChooseFromList()
oClmns.DataBind.SetBound(True, "", "U_EmpNo")
oClmns.ChooseFromListUID = "CFL1"
oClmns.ChooseFromListAlias = "CardCode"hi
-
Hello every body
i am newbie in SAP BUSINESS ONE and my question is simple: how can I add choose from list in text field to choose a business partner .I can't find a clear answer please helpppp.hi,
To add choose from list to your form please review the following link :
http://wiki.scn.sap.com/wiki/display/B1/SAP+BusineUsing+Choose+from+List
After added the CFL to your form, do the following in item event:
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
Dim cfl As SAPbouiCOM.ChooseFromListEvent
Dim dt As SAPbouiCOM.DataTable
cfl = pVal
dt = cfl.SelectedObjects
If Not (dt Is Nothing) Then
Try
objform.DataSources.UserDataSources.Item("UD_2").ValueEx = dt.GetValue("CardName", 0)
Catch ex As Exception
End Try
objform.DataSources.UserDataSources.Item("UD_1").ValueEx = dt.GetValue("CardCode", 0)
End If
Note: If you are using user data source in alies, the above code should work. -
Hi
I made a combo box button and CFL button next to it. when I select and item in the CFL, I want to add it to the combo valid values.
It happens indeed, but:
-running the program it occurs that when I select this added value nothing displays in the combo - but the form reloads as it should
-when in CFL event I try to display val2(itemname) in another filed, SAP crashes (not my program)
- when I want to load some fields from tables appropriate to freshly added into combo value pressing OK in Add Mode, the program(form) freezes and stops working
when I try the same actions with combo values not added by CFL, it works
any ideas?
MichałHi Michal Stangie,
when u take the cfl values more than the first time reload the combo values.remove the combo values and reload it again
see this sample code
If (objCombo.ValidValues.Count > 0) Then
'MsgBox(objCombo.Selected.Description)
For inti = 0 To objCombo.ValidValues.Count - 1
objCombo.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index)
Next
End If
If (objCombo.ValidValues.Count <= 0) Then
objCombo.ValidValues.Add("-", "-")
For inti = 0 To objRecSet.RecordCount - 1
objCombo.ValidValues.Add(Convert.ToString(objRecSet.Fields.Item(0).Value),
Convert.ToString(objRecSet.Fields.Item(1).Value))
objRecSet.MoveNext()
Next
objCombo.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
Rgds
Micheal -
Hi all,
I have made one form for operation master.
I try to use this UDO as a CFL in another form call router.
I am trying to add CFL on the Matrix field in the Router form.
CFL is added perfectly. But when I try to press the tab on the Field. I got the following error.
Internal Error(-1003) occured Message [131-183]
I have checked the User define table and UDO length is less than eight character.
Kindly give me the solutions for the same.
Regards,
Gunjan Shukla.Hi,
There are a couple of reason why you're getting that error, but the most probable is that the CFL conditions are not correctly defined OR the ChooseFromListAlias is pointing to a field that does not exist. (example: You have ChooseFromListAlias = "U_Code" when it should be ChooseFromListAlias = "Code", or vice-versa).
Regards,
Vítor Vieira -
How to set the returned value of CFL in a matrix
dear all,
I got a matrix binded to a DataSource and two CFLs are in this matrix. The codes for handling AfterChooseFromList is as following. It works almost fine. But when a docoment containing more than two
rows in the matrix and I reselect the CFL cell values more than two times, an error occured sometimes, not everytime. The error message is "This entry already exists in the following tables @CYW_PRROW [Message 131-183]"
I have tried to find out what kind of situation to cause this error, but still in the mud.
Can anybody give me some suggestion? Thanks.
Public Sub OnAfterChooseFromList_Matrix(ByVal pVal As SAPbouiCOM.ItemEvent)
Dim ActionSuccess As Boolean = pVal.ActionSuccess
Dim oform As SAPbouiCOM.Form = SBO_Application.Forms.Item(pVal.FormUID)
Dim oitem As SAPbouiCOM.Item = oform.Items.Item("mtx_0")
Dim omatrix As SAPbouiCOM.Matrix = CType(oitem.Specific, SAPbouiCOM.Matrix)
Dim oDataTable As SAPbouiCOM.DataTable
oDataTable = pVal.SelectedObjects
Dim val As String
Try
val = oDataTable.GetValue(0, 0)
Catch ex As Exception
End Try
omatrix.GetLineData(pVal.Row)
oform.DataSources.DBDataSources.Item("@CYW_PRROW").Offset = pVal.Row - 1
If pVal.ColUID = "col_0" Then
Try
oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRItemCode", pVal.Row - 1, CStr(val))
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
Else
Try
oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRSupp", pVal.Row - 1, CStr(val))
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
omatrix.SetLineData(pVal.Row)
If pVal.FormMode = "1" Then
oform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
End If
End Sub
Another quesion, can I assign the returned value of CLF directly to the cell?Hello Chao-Yi Wu,
I don't have a real solution for you - just a few comments:
1. At
Try
val = oDataTable.GetValue(0, 0)
Catch ex As Exception
End Try
I would add
Try
if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
val = oDataTable.GetValue(0, 0)
Catch ex As Exception
End Try
2. At
If pVal.ColUID = "col_0" Then
I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
and the 2nd not with "Else" but with "Else If ....."
3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
I always do it the same way as you in principle - I don't really know what the problem is.
4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
Sorry - that's all for the moment.
Cheers,
Roland -
How to use CFL in Business Partners Master in Find Mode
Hi,
I have a problem in Business Partners Master Form. I need add conditions in Choose From List in Find Mode when I set an asterisk in the CardCode TextField for filtering the businnes partners list.
When I capture the et_CHOOSE_FROM_LIST itemEvent in BeforeAction, I can't get the ChooseFromList ID for adding the conditions in the ChooseFromList Object.
Sample Code:
Public Sub ItemEvent(ByVal FormUID As String, pVal As SAPbouiCOM.IItemEvent, BubbleEvent As Boolean)
Select Case pVal.EventType
Case et_CHOOSE_FROM_LIST:
Dim lcflE As SAPbouiCOM.ChooseFromListEvent
Dim id As String
Set lcflE = pVal
id = lcflE.ChooseFromListUID -> The ID is "-1"
End If
End Sub
Thank's in advance
Best RegardsHello Rafea,
if you can't get it via lcflE.ChooseFromListUID -> The ID is "-1",I guess you need to know choosefromlist UID by test one by one with oForm.ChooseFromLists.Item(i). Or you can save the fom as xml then chech the CFL UID.
If pVal.FormType = 139 And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
If pVal.ItemUID = "4" Then
If pVal.InnerEvent And pVal.Before_Action Then
BubbleEvent = False
Dim oForm As SAPbouiCOM.Form
oForm = SBO_Application.Forms.Item(FormUID)
Dim oCons As SAPbouiCOM.Conditions
Dim oCFL As SAPbouiCOM.ChooseFromList
'oCFL = oCFLs.Add(oCFLCreationParams)
oCFL = oForm.ChooseFromLists.Item("2")
oCons = oCFL.GetConditions()
'Note: Add the condition only once.
If 0 = oCons.Count Then
Dim oCon As SAPbouiCOM.Condition
oCon = oCons.Add()
oCon.Alias = "Cardcode"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C0001"
'Set your own condition here instead of the system conditions
oCFL.SetConditions(oCons)
End If
BubbleEvent = True
End If
End If
End If
Kind Regards
-Yatsea
Maybe you are looking for
-
Template Builder error(unable to load data)
Hi All. When I try to load xml data into my document the template builder throws up the follwoing error The macro cannot be found or has been disabled because of you macro security settings This message can appear if: The macro was deleted from the t
-
Finder freezes when accessing an external drive
I have been using WD 3TB green drives in docks for storage for years. For the last 6 months occasionally I will access one of the drives and the finder freezes up, I will then need to restart the computer. When I try to mount my drive I get a "The di
-
Transferring music from iPhone to computer/iTunes
hi there, my computer recently caught a virus and had to be rebooted meaning everything was removed from it. I had to reinstall iTunes but all my music was gone. I still have my music on my iphone but I don't want to download anymore incase it delete
-
My sound mix does not sound the same after using Compressor for DVD
Hi, Is there something I can do to maintain the sound mix of my original file when converting to the dolby in Compressor. It needs to be louder overall and sometimes the music goes way too low and the dialogue goes to soft. Sound effects were louder
-
I have 400 photos I wish to import into a book. The max pages pf a book is 100. I wish to design the pages and then import the phots in a pre arranged order to save time. Is this possible? have done the following. I have used autoflow and it does no