on 08-05-2020 7:56 AM
Hello
I'm beginner SAP SDK programming and i can't seem to find a way to pass value to UDF in Goods Issue.
UDF field : U_CardCode 'OIGE'
Any kind of help will be appreciated.
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST)
{
IChooseFromListEvent oCFLEvento = null;
oCFLEvento = ((IChooseFromListEvent)(pVal));
string sCFL_ID = null;
sCFL_ID = oCFLEvento.ChooseFromListUID;
Form oForm = null;
oForm = SAPbouiCOM.Framework.Application.SBO_Application.Forms.Item(FormUID);
SAPbouiCOM.ChooseFromList oCFL = null;
oCFL = oForm.ChooseFromLists.Item(sCFL_ID);
if (oCFLEvento.BeforeAction == false)
{
SAPbouiCOM.DataTable oDataTable = null;
oDataTable = oCFLEvento.SelectedObjects;
string val = null;
string val1 = null;
try
{
val = Convert.ToString(oDataTable.GetValue(0, 0));
val1 = Convert.ToString(oDataTable.GetValue(1, 0));
}
catch (Exception ex)
{
}
if ((pVal.ItemUID == "BPCode"))
{
oForm.DataSources.UserDataSources.Item("UD_BPCode").Value = val;
oForm.DataSources.UserDataSources.Item("UD_BPName").Value = val1; HERE I WANNA SET THE FIELD USING VAL.
}
}
}
Fixed by adding one more line:
try
{
oEdit.Value = val;
}
catch (Exception ex)
{
oEdit.Value = val;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.