Problem in CFL
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,
Madhavi
hi,
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
Similar Messages
-
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 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 -
B1DE / CFL / Event Handling ..
Had problems with CFL's in an application i'm developing so i've created a real simple demo of my problem in the hope someone can help me ..
In the sample i have a simple screen designed with the painter with a static text field, an edit box and a button . In the .srf I have defined a CFL with multi selection = false, object type=2 and a unique ID = 'CFL_1' and i have attached it to the button via within the .srf .
I then have a simple before / after event handlers attached to my button to catch the before/after choose from list events
When i push the button the before event fires and my little message is displayed (correctly) . The event returns true (bubbleevent ..) BUT no list appears and no after event is fired .. The routine is trivial but i can't see any reason for the non appearance of my list .. Can anyone shed any light on my problem ? I'm on SAP2007A PL 15 and using B1DE to generate my initial app (using C#) .. I've tried generating the code inline (creating CFL in code) and attaching it to the button but the result is the same - before event fires and no list ... If i run one of the SDK examples (ChooseFromLists) which uses this list then it runs without problem .. I've been on with this for a couple of days now and it's really frustrating .. I've added the event handlers - but these are essentially the vanilla ones generated by B1DE. Is it anything to do with how B1DE registers the event handlers ?
public Button__CFL1__btLookup() {
FormType = "CFL1";
ItemUID = "btLookup";
[B1Listener(BoEventTypes.et_CHOOSE_FROM_LIST, true)]
public virtual bool OnBeforeChooseFromList(ItemEvent pVal) {
Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
Item item = form.Items.Item("btLookup");
Button button = ((Button)(item.Specific));
// ADD YOUR ACTION CODE HERE ...
B1Connections.theAppl.MessageBox("Choose from list button (before) ", 0, "Ok", null, null);
return true;
[B1Listener(BoEventTypes.et_CHOOSE_FROM_LIST, false)]
public virtual void OnAfterChooseFromList(ItemEvent pVal) {
bool ActionSuccess = pVal.ActionSuccess;
Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
Item item = form.Items.Item("btLookup");
Button button = ((Button)(item.Specific));
// ADD YOUR ACTION CODE HERE ...
B1Connections.theAppl.MessageBox("Choose from list button (after) ", 0, "Ok", null, null);
" Help me Obi Wan .. you're my only hope ... "
ThanksHi Noor , I think i found my problem .. I created this using the screen painter in PL 7 .. I created a similar screen by hand , saved both and compare XML .. Screen painter added a 'MODE=0' tag , manual one created using parameters had 'Mode='1' .. Changed mode on screen painter code to mode='1' and everything worked ! .. Couldn't see anywhere on screen painter how to explicitly set this keyword , only ones saying -1 represents all modes .. Anyway , thanks again for you interest and contributions .
-
Object Type 10 donu00B4t showed in CFL
Hi all,
I have a problem with cfl over OCRG (object type 10)
My code in .srf file is the following:
<userdatasources>
<action type="add">
<datasource uid="udsCliente" type="9" size="254"></datasource>
<datasource uid="udsCadena" type="1"></datasource>
</action>
</userdatasources>
<item uid="txCliente" ....>
<AutoManagedAttribute></AutoManagedAttribute>
<specific TabOrder="0" ChooseFromListUID="cflOCRD"
ChooseFromListAlias="CardName">
<databind databound="1" table="" alias="udsCliente"></databind>
</specific>
</item>
<item uid="txCadena" type="16" ....>
<AutoManagedAttribute></AutoManagedAttribute>
<specific TabOrder="1" ChooseFromListUID="cflOCRG"
ChooseFromListAlias="GroupCode">
<databind databound="1" table="" alias="udsCadena"></databind>
</specific>
</item>
<ChooseFromListCollection><action type="add">
<ChooseFromList UniqueID="cflOCRD" ObjectType="2" MultiSelection="0" IsSystem="0"></ChooseFromList>
<ChooseFromList UniqueID="cflOCRG" ObjectType="10" MultiSelection="0" IsSystem="0"></ChooseFromList>
</action>
</ChooseFromListCollection>
Note: In txcliente a cfl works fine (over bussinessPartners), however in txCadena (over BussinesPartner Groups not showed)
What I´m wrong? (It´s seems a type of udsCadena... i´m trying with several types but still wrong)
Thanks in advanced and Kinds RegardsHi Alejandro,
I have tried to give it a try and cannot make it work.
As this object is new maybe there is something missing on it that blocks the CFL from working.
Please create a message for support asking for it. And if you can share your findings in here.
Best Regards
Trinidad. -
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 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 -
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 -
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: -
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
-
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") -
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
Maybe you are looking for
-
Dates for Interaction records and other Business Activities in IC (CRM2007)
Hello, I noticed that for interaction records or follow up business activities the dates are not displayed at all in the IC. Is there a way make the configured dates (in date profile) visible in the IC? Thanks, Patrick
-
Im triggering an idoc IDOC_OUTPUT_ORDERS immediately when i create/change the PO However the idoc is getting generated when i change only certain fields. When i change other fields it does not get triggered. Why? -Dexter
-
Can't download music bought from within iPhones iTunes?
I've been trying to buy some songs directly from iTunes on my iPhone (3GS, ios 5.1.1). I can buy it alright (and I get charged...), but the downloads never works. The progress bar fills up and then there is an error messages saying the song couldn't
-
Sumup the quantities of 'Materials' which contains movement types 101, 102
hi Iam extracting 'Materials' ,'Material Movement Types'and its 'Quantities' from MSEG table. I want Sum Up The Quantities of particular Materials based on Movment Types=101,102. So how can i do this one in transfer rules . Please let me know kumar
-
Downgrade Front Row to 1.3 under Leopard...
If you guys like Leopard, but hate the new Front Row...then just downgrade Front Row. Move 'front row.app' away from the /System/Library/CoreServices/ (to a safe folder if you want to go back) Download: http://www.apple.com/support/downloads/frontrow