on 01-03-2014 5:31 AM
Error occur during set value on text box field from CFL .
if (oCFLEvent.BeforeAction == false)
{
SAPbouiCOM.DataTable oDataTable1 = oCFLEvent.SelectedObjects;
try
{
if (pVal.ItemUID == "edtxt2" && oCFL.UniqueID == "CFL_2")
{
string code = Convert.ToString(oDataTable1.GetValue("CardCode", 0));
oDBDataSource = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Add("OPOR");
oForm.Items.Item("edtxt2").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
oDBDataSource.SetValue("U_Vcode", 0, code);//Error Occur
}
Hi Mohammad,
Are you trying this on Purchase Order Form or on User Defined Form. ?
And can you please explain your scenario ?
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohammad,
Once you have added your EditText and CFL in that textbox successfully. Then why don't you simply try this:
// This code I used for Sales Order Form. You use it accordingly.
if (pVal.FormType == 139 && pVal.ItemUID == "Billing" && strUid == "Partners")
{
try
{
SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oform.Items.Item("Billing").Specific;
oEdit.Value = Convert.ToString(oDataTable.GetValue("CardCode", 0));
}
catch (Exception ex)
{
Program.oMainSAPDI.ShowMessage(ex.Message, BoStatusBarMessageType.smt_None);
}
finally
{
SAPbouiCOM.EditText oEditName = (SAPbouiCOM.EditText)oform.Items.Item("BillingN").Specific;
oEditName.Value = Convert.ToString(oDataTable.GetValue("CardName", 0));
}
}
Hope it helps.
Thanks & Regards
Ankit Chauhan
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.