cancel
Showing results for 
Search instead for 
Did you mean: 

Can we update sales order

Former Member
0 Kudos

Hi all,

Can we Update any sales order by the code?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

thanks nirdesh ...

i gived you 10 points...

once again thanks

Former Member
0 Kudos

hi nirdesh...

yar your code is not working..

is this right code..

Former Member
0 Kudos

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

Former Member
0 Kudos

thnks yar my problem is solved?

actaually that was my fault ?

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

i am using SAPBO 8.8 and VS2010, i can even get this BusinessObjectInfo, could you please show me how to do update sales order via API?

Thanks

Former Member
0 Kudos

S we can........ Wht u want exactly?

Regards,

Anitha