cancel
Showing results for 
Search instead for 
Did you mean: 

Add userfields to system table error!

Former Member
0 Kudos

hi,when I add userfields to system table such as "PDN1",it's fail.Code like bellow:

ufmd = (UserFieldsMD)diCompany.GetBusinessObject(BoObjectTypes.oUserFields) ;

ufmd.Name = "field1" ;

ufmd.TableName = "PDN1" ;

ufmd.Description = "descr" ;

ufmd.Type = ....;

.................

ufmd.Add() ;

..........................

When I assgin TableName "PDN1" to ufmd.TableName,the result is :ufmd.TableName = "@PDN1".SO when add userfield to the table,the error occur:the table "@PDN1" not exist.

When I add user fields in user table using the same code ,it's ok .

Anybody can tell me,how to add user fields to system table? thk!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I try the "ADO1","RDR1","DLN1","INV1",it's all ok .But when I try the "PDN1",the "@" symbol is occured。

So I guest,is the system think the "PDN1" table not the system table but the user table? or the "PDN1" table has some problem in it.

Former Member
0 Kudos

Hi Locust,

Did you solve this problem?

At the moment, I have a same problem.

I used Xml file to create UDF to System table.

I had no problem with other DB,

I think this is some kind of DB crash....

Please let me know how you are going on...

Former Member
0 Kudos

hi Louis De Gouveia,

I try the "OPDN" ,it's ok.After I assgined "OPDN" to ufmd.TableName,the result is "OPDN" not "@OPDN".But when I assigned "PDN1" to ufmd.TableName,the result is "@PDN1" not "PDN1".

why? I really need to add user field into "PDN1". How to do it? thk!

Former Member
0 Kudos

Code below works for me (V2005A P5)


    Set sboUserFieldsMD = sboCompany.GetBusinessObject(oUserFields)
    sboUserFieldsMD.TableName = "PDN1"
    sboUserFieldsMD.Name = "AZU_TEST"
    sboUserFieldsMD.Description = "Test"
    sboUserFieldsMD.Type = db_Alpha
    sboUserFieldsMD.EditSize = 10

    lngRetCode = sboUserFieldsMD.Add

If you are getting problems with "PDN1", try replacing it with any of "ADO1", "RDR1", "DLN1", "INV1" - adding a field to any of them has the same effect as they are all marketing document lines.

John.

Former Member
0 Kudos

The "@" symbol is added by SBO not me! So it bother me.

I give "PDN1" name to it ,the result is "@PDN1".

by the way,I use the sbo try version.

former_member184566
Active Contributor
0 Kudos

Hi locust

When you do it you must use it without the "@" symbol. You only use @ for user tables. It should work the way you are doing it. Have you tried opdn first to see if it works?