on 06-05-2008 10:20 AM
How would you modify a database field with a value you obtain from a form using the update object? I have tried:
dbItem.ItemCode = code;
dbItem.ItemName = reg;
dbItem.SWW = make;
dbItem.ForeignName = model;
int x;
x = dbItem.Update();
if (x == 0)
{
SBO_Application.MessageBox("Vehicle details updated!", 1, "Ok", "", "");
}
else
{
SBO_Application.MessageBox("Error, failed to update vehicle details!!", 1, "Ok", "", "");
}
where code, reg, make and model are string variables but it is not updating. Should i specify the actual row in the database that i want to update?
Hi Duncan,
your code looks good, but you have to "fetch" the item before
dbItem.GetByKey(code);
also be aware that you can only change the itemcode if the item isn't used in a document before.
lg David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey thanx man the 'GetByKey' totaly solved the issue!! I have another unrelated question about activating the navigation buttons in sap so that i could use them with the form. This is how am trying to do it:
oForm.DataBrowser.BrowseBy = code;
where code is a string variable. Is this the way it is done?
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.