cancel
Showing results for 
Search instead for 
Did you mean: 

UDO Updating

Former Member
0 Kudos

Hi All,

I am using UDOu2019s. How to do Adding and Updating in single operation. When form is loading the records are filled in the matrix and by adding empty row at last. If I enter the value in empty row it has to be added, if I changed any value it has to be updated how to do it?

Thanks in Advance

Regards

SAI.K

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

if u use default form of master type object it can be done.

regards,

varma

Former Member
0 Kudos

Hi varma,

How to get default form of master type object by clicking the users define menu item

Regards

Sai.k

Former Member
0 Kudos

hi,

for eg:

create Table of type Master Data with necessary fields(eg:TableXYZ)

create UDO for the table @TableXYZ as UDOXYZ

write the code in the usermenu click to open the form

Rs = OCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

Rs.DoQuery("SELECT Code FROM oudo where candefform='Y' order by code")

For i = 1 To Rs.RecordCount

If Rs.EoF = False Then

If Rs.Fields.Item("Code").Value = "UDOXYZ" Then

menuuid = i + 47616

Exit For

End If

Rs.MoveNext()

End If

Next

SBO_Application.ActivateMenuItem(menuuid)

oForm = SBO_Application.Forms.ActiveForm

oForm.Visible = True

regards,

varma

Edited by: Varma on Oct 16, 2008 5:33 PM

Former Member
0 Kudos

Hi varma,

please explain the following..

menuuid = i + 47616

is it default (47616) for all kind of UDO's

Regards,

Ganesh K

Former Member
0 Kudos

Hi Varma,

i understood, 47616 is menuuid for default forms in tools-->user define objects -->default forms

Thank you,

Regards,

Ganesh K

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Venkat,

if you are using screen painter means(for form) , define a ADD button with with unique id =1 and cancel button as 2. this is general for all kind of forms. if all of your fields binded correctly and UDO registrations are correct means it behave like a normal SAP forms for add/update/ok modes.

if this is not your scenario means let me know in detail..

Regards

Ganesh K

Former Member
0 Kudos

Hi Ganesh K

Thanks for Reply. I am using the same scenario. But when form is in update mode then I what to add a new record or update old records at once it is possible?

In SAP forms same scenario is working (CURRENCIES form For Example)

Regards

sai.k

Former Member
0 Kudos

hi,

Two operations at a time is not possible.

either you can go on adding different records or

once if you have added a record since from then you can update the Document by placing new row data or existing row data.

you can do only one operation.

regards,

varma