on 11-22-2011 7:13 AM
Dear All,
I have a problem regarding a data-table. Generally when we write code for CFL for Item Code we write following code..
if (pVal.ItemUID == enControlName.mtxDetails & pVal.ColUID == enControlName.colItemCode & strUid == enCFL.cflItem)
{
SAPbouiCOM.Matrix oMatrix = default(SAPbouiCOM.Matrix);
oMatrix = (SAPbouiCOM.Matrix)this.m_SBO_Form.Items.Item(enControlName.mtxDetails).Specific;
SAPbouiCOM.EventFilters oldFilter = this.SBO_Application.GetFilter();
this.SBO_Application.SetFilter(new SAPbouiCOM.EventFilters());
this.m_SBO_Form.Freeze(true);
int Row = pVal.Row;
for (int i = 0; i <= oDataTable.Rows.Count - 1; i++)
{
try
{
oEdit = (SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colItemCode).Cells.Item(Row).Specific;
oEdit.Value = Convert.ToString(oDataTable.GetValue(0, i));
}
catch (Exception ex)
{
}
oEdit = (SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colItemName).Cells.Item(Row).Specific;
oEdit.Value = Convert.ToString(oDataTable.GetValue(1, i));
((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colQtyApp).Cells.Item(Row).Specific).Value = "1";
((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colInstock).Cells.Item(Row).Specific).Value = oDataTable.GetValue(11, i).ToString();
((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colCommited).Cells.Item(Row).Specific).Value = oDataTable.GetValue(12, i).ToString();
((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colOrder).Cells.Item(Row).Specific).Value = oDataTable.GetValue(13, i).ToString();
((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colUOM).Cells.Item(Row).Specific).Value = oDataTable.GetValue(20, i).ToString();
((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colRemarks).Cells.Item(Row).Specific).Value = oDataTable.GetValue(46, i).ToString();
I want to ask here that what 11,12,13, 20 & 46 describe in highlighted areas respectively ? On which bases we write these object columns...?
Plz. give ur precious replies......
Hi,
Those numbers represent Column number for item detail in marketing document.
Examples:
11 - Quantity
12 - UseBaseUN
13 - PackQty
You can get them from system info through the form.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
if you are using item choosefromlist then you can access the datatable values using the getvalue method oDataTable.GetValue(0, 0).ToString(); this will retrieve the selected rows itemcode value from item master table or you can get the value through this statement also oDataTable.GetValue("ItemCode", 0).ToString(); likewise you can access any columns from the item master table
Hope this helps
Regards
Arun
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 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.