Skip to Content
avatar image
Former Member

How show UDO menu item?

Hi,

I created UDO with all menu's properties valorized by sdk, but when I run the project the menu item doesn't show. To show it I need to re-choose the company, do someone know how show it immediatly?

Thank you

Gianni

Here my code:

var oUserObjectMD = (UserObjectsMD)Globals.GlobalCompany.GetBusinessObject(BoObjectTypes.oUserObjectsMD);

oUserObjectMD.ObjectType = BoUDOObjType.boud_MasterData;
oUserObjectMD.CanFind = BoYesNoEnum.tYES;
oUserObjectMD.Code = "TestCode";
oUserObjectMD.Name = "TestName";
oUserObjectMD.TableName = "TT_TableTest";

oUserObjectMD.CanCreateDefaultForm = BoYesNoEnum.tYES;
oUserObjectMD.EnableEnhancedForm = BoYesNoEnum.tYES;

oUserObjectMD.MenuCaption = "My UDO";
oUserObjectMD.FatherMenuID = 3328;
oUserObjectMD.Position = 1;
oUserObjectMD.MenuUID = "MyUDO";
oUserObjectMD.MenuItem = BoYesNoEnum.tYES;

oUserObjectMD.FormColumns.FormColumnAlias = "Code";
oUserObjectMD.FormColumns.FormColumnDescription = "Code";
oUserObjectMD.FormColumns.Add();

oUserObjectMD.FindColumns.ColumnAlias = "Code";
oUserObjectMD.FindColumns.ColumnDescription = "Color Code";
oUserObjectMD.FindColumns.Add();

var result = oUserObjectMD.Add() == 0;
Add comment
10|10000 characters needed characters exceeded

  • Former Member

    The result is true, the UDO is well created and if I disconnect and connect the company or close and open SAP client I view the menu Item.

    The issue is that I'd like to view the menu item immediately after adding the UDO.

    So, I don't know if I miss something or I have to re-connect the company by code (how?)

  • What was the result value?

  • Get RSS Feed

0 Answers