cancel
Showing results for 
Search instead for 
Did you mean: 

User-DefinedTable fields

Former Member
0 Kudos

Hi every one,

i would like to create a user-defined table in SDK, but i've seen that when you create a UDT into the database the system will create by default two fields "Code" and "Name"; is there a way to create a table without these two fields and to define other fields and use them as keys?

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

it's not possible to create a user defined table without those fields.

a user defined table is a particular table in SAP B1 that can be created not only using the sdk but also from the sap b1 client.

and more, the client can manage it with a auto created form, accessible from a menu item.

as far as i know if you want you can create a table inside sap b1 company database, but it will never be managed automatically by the client, you would have to manage it yourself writing code.

if you need to manage it inside other sap b1 forms i suggest to use a sap standard UDT.

if you need this table to support queries / views / expose data to other systems well the choice is your, create it as you wish ( but sap b1 client will never be able to manage it directly )

good luck!

Answers (3)

Answers (3)

edy_simon
Active Contributor
0 Kudos

Hi Michele,

UDT of type 'No Object' and 'Master Data' will have this Code and Name field.

UDT of type 'Document' will have DocEntry and DocNumber field.

Creating UDT without the two pairs is not possible. But as Pedro pointed out, you can always create another key columns and set it as UNIQUE Key.


As for the Code/Name you can work around it by using a Formatted Search to automatically keep increasing the value on screen,

or if inserting via code is involved, you need to increase this value using your code.

Regards
Edy

pedro_magueija
Active Contributor
0 Kudos

Hi Michele,

Everything has already been said except that you can define keys (both regular, composite and unique) for your UDT (just not the primary one).


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Former Member
0 Kudos

There's no way to do that. Those fields are primary key.

Regards,

Bry

Blog: http://www.sap-tips-tricks.com/