on 10-15-2007 10:31 AM
Hi all,
Can we Update any sales order by the code?
hi Deepak,
ya we can update sales order. When we are doing code to update anything in database, we are changing table at database level. There is various method to do it.
it doesn't have any problem...
hope this will guide u.
Regards
Nirdesh Panwar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Deepak,
Try this u have to write this in DataFormEvent in add and update mode
If (BusinessObjectInfo.FormTypeEx.Equals("141")) And ((BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Or (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE)) And (BusinessObjectInfo.ActionSuccess = True) Then
Try
BubbleEvent = False
Dim Doc As SAPbobsCOM.Documents
Doc = com.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
Doc.Browser.GetByKeys(BusinessObjectInfo.ObjectKey)
Doc.UserFields.Fields.Item("U_Gpno").Value = CStr(API_Frm.DataSources.UserDataSources.Item("grno").Value)
Doc.Update()
If API_Frm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
Api.Setdefault()
End If
BubbleEvent = True
Catch ex As Exception
app.MessageBox(ex.Message)
End Try
End If
in this u have to change instead of opurchaseinvoice u change to coresponding form name.
Regards,
Anitha
Hi Deepak,
You can update Sales Order By using BusinessObject.
Ex:
Dim oOA As SAPbobsCOM.Documents
oOA = cmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
oOA.Browser.GetByKeys(BusinessObjectInfo.ObjectKey)
oOA.UserFields.Fields.Item("U_pono").Value = OA_Form.DataSources.UserDataSources.Item("OA_pono").ValueEx
oOA.Update()
Hope its helpfull for you, And give me reward points,
Regards,
Suresh.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
S we can........ Wht u want exactly?
Regards,
Anitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
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.