Skip to Content
0
Former Member
Dec 20, 2005 at 11:01 PM

Delete line items using UDO

153 Views

Hey All,

I have searched on the forums and found people with a similiar problem using the UDO in SBO 2004. How do I properly delete a document line item from a matrix and have that reflected back in the database? I get an error message and the records are not deleted

I am using the following code (I get a database error stating the usertable has already been modifed):

case "v33Add":
			oQuotationForm.DataSources.DBDataSources.Item("@PQUOTEVENDORS").Clear();
       OMatrix.AddRow(1,OMatrix.RowCount);
//							oQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE;
						case "v33Remove":
			oQuotationForm.DataSources.DBDataSources.Item("@PQUOTEVENDORS").Clear();
int selectedRowIndex = OMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder);
								if (selectedRowIndex > -1)
								{							OMatrix.DeleteRow(selectedRowIndex);
							}
//								if (oQuotationForm.Mode != SAPbouiCOM.BoFormMode.fm_ADD_MODE)
//							oQuotationForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE;