Skip to Content
avatar image
Former Member

User-DefinedTable fields

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Oct 23, 2015 at 08:50 AM

    hi Former Member

    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!

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 09:29 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 23, 2015 at 08:19 AM

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

    Regards,

    Bry

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2015 at 01:05 AM

    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

    Add comment
    10|10000 characters needed characters exceeded