Skip to Content

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

Error in creating userkey ---- UserKeysMD

Hi,

I am trying to add a primary key through UserKeysMD in a user defined table.But It is showing the invalid field name error,

Pls help me

Former Member
replied

Try the following... that work for me:

UserKeysMD keyMd = (UserKeysMD)SboCompany.GetBusinessObject(BoObjectTypes.oUserKeys);
keyMd.TableName = "TableName";
keyMd.KeyName = "KeyName";
keyMd.Elements.ColumnAlias = "Field"; 
keyMd.Unique = BoYesNoEnum.tYES;
keyMd.Add();

Message was edited by: Rasmus Jensen

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