cancel
Showing results for 
Search instead for 
Did you mean: 

Adding user defined fields

Former Member
0 Kudos

Hey Guys,

I know I have seen this asked before in the forum but I have not seen any good replies to this question.

What is the most efficient or standard way of adding any required user defined fields, tables, etc.. when deploying an addon? (SBO 2004) I am using the meta data objects to create the fields I need now but that seems like a lot of code to create a few user defined fields and tables.

Is there a better approach?

Accepted Solutions (1)

Accepted Solutions (1)

barend_morkel2
Active Contributor
0 Kudos

Hi Laura,

Using Metadata Objects is the suggested (and best) way to add user defiend tables and fields. This is basically the "scripting" of your additional SQL structure. But other tahn using the SQL scripting tool - you script your structure using the Metadata Objects. You have perfect control over table and field creation and don't rely on users that may mess the configuration up :).

What you can do to minimise your efforts is to create 2 generic routines that you can include in your code and call when you create tables and fields:

1. Create Table

-Generic routine to create a table and you pass it the

TableName

TableDesc

TableType

2. Create Field

-Generic routine to create a field and you pass it the

TableName

FieldName

FieldDesc

FieldType

FieldSize

FieldPos (to check if it's there)

(Default Value if need be)

Former Member
0 Kudos

Thanks a lot Barend. That is what I have done now, it just gets a little messy when you add a number of fields with different configurations etc...

Former Member
0 Kudos

Try using BODE, the wizard will create the code for generating the User fields you need, and other interesting stuff.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1fe00c0a-0701-0010-1e9d-a15...

Regards,

Ibai Peñ

Answers (0)