Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Can we update sales order

Hi all,

Can we Update any sales order by the code?

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question