cancel
Showing results for 
Search instead for 
Did you mean: 

Deletion of UDO

Former Member
0 Kudos

Hello All,

While uninstalling the addon i want to delete the respective UDO's and UDT.'s. How can i solve this problem?

Thank u,

Shraddha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shraddha......

Go to Tools > Customization Tools> Unregister.

You have to unregister All the UDTs from here and then go to User Defined Tables in Tools and delete one by one.

This will solve your Problem......

Regards,

Rahul

Former Member
0 Kudos

@Rahul

thanks for your time. The method/steps want to have said is manual process i want this process should be done through addon or programmatic how can i do that?

I mean while uninstalling the addon all related UDO's and UDT's should be deleted automatically.

Regards

Shraddha

Former Member
0 Kudos

Hi Shraddha....

I'm not a technical person so I can not give you exact codes but I can suggest you the best possible way if you can do it.

Can you not incorporate Back end delete table function so that while uninstallation this function should get triggered and the UDO, UDTs would be deleted?

Regards,

Rahul

Former Member
0 Kudos

@Rahul

I was trying the same way what you have suggested. But while uninstalling it through an error saying 'Interop.SAPbouiCOM.dll' file not found and i am unable to understand where i am wrong!

Regards,

Shraddha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Shraddha,

You may check this:

Thanks,

Gordon

Former Member
0 Kudos

@Gordon,

Thanks for your time. I m able to generate the setup of addon successfully and it works great!. But my problem is when user uninstall the addon, the UDO's and UDT's will be not removed from database. I know this can be achieved by manual process but i want know is there any method by which we can make it automatic?

Regards,

Shraddha

Former Member
0 Kudos

Hello

There is no automatic method for this. What you can do: program the same steps when you created/Registered the UDO

Possible scenario would be:

1. Unregister UDO by oUserObjectsMD.Remove method (of course here you must first use the GetBekey method to receive the installed UDO)

2. Right now, you have the tables only in the database, all logic has been unregistered. Now you make backup of the data (if necessary) then remore the table oUserTables.Remove() method. (also getbykey is needed before removal),

You can try....

regards

János

Former Member
0 Kudos

@Janos,

Thanks for your time. I have done the coding for removal of UDO's and UDT's as

Dim MyUDO As SAPbobsCOM.UserObjectsMD = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD), SAPbobsCOM.UserObjectsMD)

Dim RevVal As Integer

Dim errmsg As String

Try

MyUDO.GetByKey("IS_RESOURCES")

RevVal = MyUDO.Remove()

If RevVal <> 0 Then

oCompany.GetLastError(RevVal, errmsg)

MessageBox.Show("Failed to remove Resource UDO")

End If

Catch ex As Exception

End Try

Similarly for the UDT also. But my problem is when to call this removal method?because i can't call this method in my addon project so i tried to call this method in setup project(the one which will be generated while doing setup of addon). If i run that project in debug mode it work correctly but if i make an .exe and then run it gives an error 'Interop.SAPbouiCOM.dll not found'.

Please correct me where am i wrong!

Regards

Shraddha

Edited by: Shraddha P on Nov 18, 2010 2:13 PM

Edited by: Shraddha P on Nov 18, 2010 2:26 PM