Create a user defined table and creating bussiness entities

Hi
I am trying to create a bussiness entity which is mapped to table SAMPLE(NAME,Value)
I created metadata in UI
1) I created a _Impl.java
* @BusinessEntity
* (tableName = SAMPLE)
public class Sample_Impl
extends Sample_Gen{
2)XXXXCodeDescriptionQuery.java
* @EntityCodeDescriptionQuery
* (entity = sample, programName=Sample)
* @author One time generator
* @version $Revision: #1 $
public class SampleCodeDescriptionQuery
extends EntityCodeDescriptionQuery {
3)/**
@EntityListPageMaintenance ( service = CILTSAMP, modules={foundation}, entity = sample, program = SampleListMaintenance,
body = @DataElement (contents = { @FieldGroup (name = SRCH-CRITERIA,
contents = { @DataField (name = NAME)})
, @DataField (name = NAME)
, @ListField (name = NAME)}),
lists = { @List (name = NAME, size = 50, *program* = SampleListMaintenance, 
body = @DataElement (contents = { @RowField (includeRCopybook = false, entity = sample)}),
headerFields = { "NAME"})})
public class SampleListMaintenance
extends SampleListMaintenance_Gen{
and when I run the AG i am getting the error
2011-02-02 15:28:47,160 [main] ERROR (sourceparser.service.EntityCodeDescriptionProcessor) No such description property description on entity sample in entity code and description query com.splwg.base.domain.common.sample.SampleCodeDescriptionQuery
Am I doing wrong?
What more I need to do?
what is the program = SampleListMaintenance? what should this map to in SampleListMaintenance.java?
what is the programName=_Sample_? what should this map to in SampleCodeDescriptionQuery.java? when I remove this program or programName I am getting error that they are required

Hi ,
The problem is fixed, the link mentioned below might be use full for doing this.
http://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T457083.htm
regards
Srikkanth

Similar Messages

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • Attach User define tables and view table need add to database into my add-o

    Hi there,
    I want to deploy an addon, there are User define tables and view table need add to database.
    I need some advice on some issues..
    1. Can I attach User define tables and view table need add to database into my addon.
    2. I wonder which chance is properly to add them, if add these user define objects in time of install and I can't get the enough information that connect to SQL server
    Thanks for any help.

    Hi Weerachai,
    Here's an example of how to create a user-defined table in code. My suggestion would be to check if it exists when your add-on starts up and then if not, create the tables, fields and objects.
    'User Table
        Private Sub CreateTable(ByVal sTable As String, ByVal sDescription As String, ByVal oObjectType As SAPbobsCOM.BoUTBTableType)
            Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
            Dim iResult As Long
            Dim sMsg As String
            oUserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
            If Not oUserTablesMD.GetByKey(sTable) Then
                oUserTablesMD.TableName = sTable
                oUserTablesMD.TableDescription = sDescription
                oUserTablesMD.TableType = oObjectType
                iResult = oUserTablesMD.Add()
                If iResult <> 0 Then
                    oCompany.GetLastError(iResult, sMsg)
                    MessageBox.Show("Error Creating Table: " & sTable & " Error: " & sMsg)
                End If
            End If
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
        End Sub
    'User Field
        Private Sub CreateField(ByVal sTable As String, ByVal sName As String, ByVal sDescription As String, _
                                ByVal iSize As Integer, ByVal aFieldType As SAPbobsCOM.BoFieldTypes, _
                                ByVal aSubType As SAPbobsCOM.BoFldSubTypes, ByVal sLink As String, _
                                ByVal bMandatory As SAPbobsCOM.BoYesNoEnum)
            Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
            Dim oTable As SAPbobsCOM.UserTable
            Dim iResult As Long
            Dim sMsg As String
            Dim i As Integer
            Dim x As Integer
            Dim bFound As Boolean = False
            Dim oField As SAPbobsCOM.Field
            oTable = oCompany.UserTables.Item(sTable)
            For i = 0 To oTable.UserFields.Fields.Count - 1
                oField = oTable.UserFields.Fields.Item(i)
                'MessageBox.Show(oField.Name)
                If oField.Name = "U_" & sName Then
                    bFound = True
                End If
            Next
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oTable)
            If Not bFound Then
                oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                oUserFieldsMD.TableName = "@" & sTable
                oUserFieldsMD.Name = sName
                oUserFieldsMD.Description = sDescription
                oUserFieldsMD.Type = aFieldType
                If aFieldType = SAPbobsCOM.BoFieldTypes.db_Alpha Or aFieldType = SAPbobsCOM.BoFieldTypes.db_Numeric Then
                    oUserFieldsMD.EditSize = iSize
                Else
                    oUserFieldsMD.SubType = aSubType
                    oUserFieldsMD.Mandatory = bMandatory
                End If
                oUserFieldsMD.LinkedTable = sLink
                iResult = oUserFieldsMD.Add()
                If iResult <> 0 Then
                    oCompany.GetLastError(iResult, sMsg)
                    MessageBox.Show("Error Creating Field: " & sTable & "." & sName & " Error: " & sMsg)
                End If
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldsMD)
            End If
        End Sub
    If you want to create a View I think you would have to use the RecordSet object. This will ensure that you don't have to log in to the database again
    Hope it helps,
    Adele

  • User define table and store procedure install

    Hi there,
    I like to deploy an addon, there are User define tables and store procedure need add to database, I wonder which chance is properly to add them, if add these user define objects in time of install, we can not get the enough information that connect to SQL server, and also create UDT need DIAPI. if put create UDT and UDsp in addon program, the problem is which DIAPI funciton or object can execute create store procedure SQL string.
    Thanks for any help.
    Lanjun

    R. Schwachofer,
    Thank you very much,
    the way call isqlw.exe to run SQL script is a good way when install, but I confuse with two questions about this way. first, run isqlw.exe should provid loginid and password of SQL server, these two information need additional install dialog to get; second if use isqlw.exe the store procedure only create to the current company database, when create new compay DB the store procedure does not exist in new DB.
    so I still do not know which way is the proper way to create SP for addon.
    Thanks in advance.
    Lanjun

  • How to create a user defined trigger and execute my form

    Hi All,
    I am working with oracle Apps r12 and oracle forms 10g.
    I have created a custom form. So i need to create a special menu and when the user click the menu it need to open a new block and query it accordingly.
    I have followed this link
    http://egeapp.egeseramik.com:8000/pls/prod/fndgfm/fnd_help.get/us/fnd/@g_special#g_special
    and created a special menu in my custom form
    In PRE_FORM trigger i have coded this
    APP_SPECIAL.INSTANTIATE('SPECIAL3','&ACTION HISTORY DETAILS',NULL,TRUE,'LINE');
    and IN PRE_BLOCK i have coded this
    APP_SPECIAL.ENABLE('SPECIAL3',PROPERTY_ON);.
    Now the special menu is enabled when i press it shows error
    that frm-40700 no such trigger:special3.
    Now i came to know that we need to create a user defined trigger put the code and when we press special menu it need to query it accordingly.
    Can any one tell the steps that how to do that accordingly.
    Thanks & regards
    Srikkanth

    Hi ,
    The problem is fixed, the link mentioned below might be use full for doing this.
    http://docs.oracle.com/cd/E18727_01/doc.121/e12897/T302934T457083.htm
    regards
    Srikkanth

  • UDT and UDF - User-defined Tables and Fields

    Dear All,
    I am writing a Query to permit the Cashier to check her Cash entries and balances on a Daily basis.
    Basically, it's a General Ledger, but I want the Query - Selection Criteria window to display only a few GL codes namely GL codes 1240601, 1240602, 1240603 etc.
    I don't know if I am doing it right. This is what I did (SAP B1 8.8):
    UDT
    I created a UDT called TEST2 using:
    Tools -> Customization Tools -> User-defined Tables - Setup
    UDF
    Then I created a field in the UDT called GlCod using User-Defined Fields - Management
    Title : GlCod
    Description : GL Code
    Type : Alphanumeric 30
    Field Data
    In the Field Data window, I ticked the Set Valid Values for Fields checkbox and filled in the blanks as follows:
    #                  Value                Description
    1                 1240601             Cash in Hand (Rs)
    2                 1240602             Cash in Hand (USD Notes)
    3                 1240603             Cash in Hand (Euro Notes)
    etc...
    Query
    Then I wrote my Query (see below).
    When I run it, I get the Selection Criteria screen as I wanted:
    Query - Selection Criteria
    GL Code                                   ...............   (arrow here)
    Posting Date                              ...............
    [OK]                [Cancel]
    When I click on the GL Code arrow, I get a window with the exact choices I need. It looks like this:
    1240601 -  Cash in Hand (Rs)
    1240602 -  Cash in Hand (USD Notes)
    1240603 -  Cash in Hand (Euro Notes)
    Executing the Query
    The Query seems to run normally, but nothing is generated on the screen, and there's no Error Message.
    What can be wrong about this query?
    I suspect that the GL codes in JDT1 and TEST2 are not of the same data type, so that INNER JOIN returns nothing.
    Thanks,
    Leon Lai
    Here's my SQL
    declare @TEST2 TABLE
    (GlCod varchar(30))
    declare @GlCod nvarchar (30)
    set @GlCod =/*SELECT T0.U_GlCod from [dbo].[@TEST2] T0 where T0.U_GlCod=*/  '[%0]'
    declare @refdt datetime
    set @ref=/*SELECT T1.RefDate from [dbo].[JDT1] T1 where T1.RefDate=*/ '[%1]'
    select
    t1.Account as 'GL Code',
    t1.RefDate as 'Posting Date',
    t0.U_GlCod as 'Restricted GL Codes'
    from JDT1 T1
    INNER JOIN @TEST2 T0 ON T0.[U_GlCod] = T1.[Account]
    WHERE
    t1.RefDate <= @refdt
    and
    t0.U_GLCod = @GlCod

    Try this:
    declare @GlCod nvarchar (30)
    set @GlCod =/*SELECT T0.U_GlCod from [dbo].[@TEST2] T0 where T0.U_GlCod=*/  '[%0]'
    declare @refdt datetime
    set @refdt=/*SELECT T1.RefDate from [dbo].[JDT1] T1 where T1.RefDate=*/ '[%1]'
    select
    t1.Account as 'GL Code',
    t1.RefDate as 'Posting Date'
    from JDT1 T1
    WHERE
    t1.RefDate <= @refdt
      and
    T1.[Account] = @GlCod
    (There is no need to declare the memoria table @test2 if you already created one table with this name.
    And there is no need to a join.)
    Edited by: István Korös on Aug 15, 2011 1:27 PM

  • User defined Table and matrix problem

    Hi,
    I have a user defined table. I am displaying data from this table using DBdataSource on a matrix in my form. After making changes to a cell on the matrix when i try to save the data back to the data source, the changes are not updated. I am using SBO2004 and using FlushToDataSource method to save the changes.
    Please help.
    Thanks.

    Fabio,
    I disagree with you, FlushtoDataSource does work on user form too.
    Once you use this function, you'll have to open a the userTable object, and save the records from the DBDataSource object to the table using this object.
    Sébastien

  • How do i make a array of user defined structure and creat a pointer for the same

    Function
    The prototype of the dll function is
    unsigned long PassThruIoctl(unsigned long A, unsigned long B, void *pvar1, void *pvar2);
    "void *pvar1" and "void *pvar2" are pointers to different Structures. The value of  "unsigned long B" will determine what kind of Structure the pointer will represent.
    One sample structure is given below when pvar1 is the pointer to SCONFIG_LIST.
    typedef struct
          unsigned long ParameterID;    // this an input to the dll
          unsigned long Value;          // this is an output from dll
    } SCONFIG;
    typedef struct
          unsigned long NumOfParams;    // the no. of elements(SCONFIG) in array
    (input)
          SCONFIG *ConfigPtr;           // the pointer to array of SCONFIG
    (input)
    } SCONFIG_LIST;
    The function is supposed to get the values of configuration parameters (from an external interfacing device).
    When I tried to run the function as shown in the attached VI, I always end up with error. The error I get is saying something about DLL corrupting the memory of Lab View.
    Solved!
    Go to Solution.

    What will be the structure for pVar2?
    One issue that I can see in you code is, for pvar1 instead of passing an array of clusters, you are passing a cluster of SCONFIG. Also you need to initialize the numbr of elements in the array before passing it to the DLL (see attached code). In this I have assumed that pVar2 is also expecting a similar input.
    I was not able to run the code here becasue the dll is not there. So please try and let me know.
    "A VI inside a Class is worth hundreds in the bush"
    യവന്‍ പുലിയാണു കേട്ടാ!!!
    Attachments:
    GETCONFIG_2.vi ‏9 KB

  • Creating User-Defined Tables

    Hi All
    When creating a user defined table, SBO creates the following default fiels:
    Code     alphanumeric (8)
    Name     alphanumeric (30)
    Is their anyway to change to this.
    Thanks John

    Hi john,
    There is unfortunately no way to change this.
    Regards
    Ad

  • User-Defined Table Types - Where is it in SQL Server 2008?

    I am having 2 issues:
    1.  I don't see a folder for 'User-Defined Table Types' under programmability-->Types
    2.  When I execute the following code to create a Type; I get an error 'Incorrect syntax near the keyword 'AS'.'
    USE Locations;
    GO
    /* Create a user-defined table type */
    CREATE TYPE LocationTableType AS TABLE
    ( LocationName VARCHAR(50)
    , CostRate INT );
    GO

    Hi Shayann,
    The  user-defined table type is a new
    feature from SQL Server 2008. If you want to use it you have to upgrade your database to SQL Server 2008 or above.
    In you scenario(SQL Server 2005),as a workaround, you can use the  local temporary table instead. 
    --in SQL Server 2005
    CREATE TABLE tblType(id INT,name VARCHAR(99))
    GO
    CREATE PROC proc1
    AS
    BEGIN
    SELECT * FROM #temp;
    END
    GO
    SELECT * INTO #temp FROM tblType; -- the #temp name is fixed
    INSERT INTO #temp VALUES(1,'Eric');
    EXEC proc1
    --In SQL Server 2008 or above
    CREATE TYPE LocationTableType AS TABLE
    ( id INT,
    name VARCHAR(99) );
    GO
    CREATE PROC proc1 @t LocationTableType READONLY
    AS
    BEGIN
    SELECT * FROM @t
    END
    GO
    DECLARE @t LocationTableType;
    INSERT INTO @t VALUES(1,'Eric');
    EXEC proc1 @t
    I still suggest you upgrade to higher SQL Server.
    If you have any question, feel free to let me know.
    Best regards,
    Eric

  • How to create a Foreign key relationship between 2 user defined tables...

    Hi Folks,
    I have created two user defined tables... Where in i want to create foriegn key relationship between the 2 tables.... Can anyone guide the step by step procedure to do this scenario...
    Any help would be highly appreciated...
    Thanks

    Hi
    1.  In the 2nd table call the field of the 1st table which is a primary key.
    2.  Give the same field and dataelement name.
    3.  Select that field and then click on the foreign key field icon which is beside Search Help button.
    4. Then give short text, and the 1st table name.
    5. Then in the below box give the 2nd table name and 2nd table field name which you have called from 1st table.
    6. Then click on copy, then u will be able to see Check table name and check table field name beside foreign key table name.
    7. Then again click on copy.
    Regards
    Haritha.

  • Creating user defined table in SBO-COMMON

    Hello experts,
    I'd like to create a user defined table in SBO-COMMON. I'll tell you why:
    I have successfully created a SAP B1 addon which adds freight costs to an order if the total amount is under a certain threshold. We have 2 administrations running, a live one and a test administration. We have put the connectionstring to determine the expense code of the freight costs in the exe.config-file of the addon.
    We want to be able to point the addon from one administration to the other by modifying only one value, a centralized value, independent of SAP administration. The most proper way to do that in my opinion is to put it in SBO-COMMON and the only logical way to do that is a user defined table in SBO-COMMON.
    Is there such a way?
    My alternative is to abuse another database on the server and just add the info there, but I'd prefer to store it in SBO-COMMON.
    Thanks for your time!
    Vincent

    UDT cannot be created in sbo-common. You may create new db and work with table in this db (but it will be not UDT, but standard sql table), or create new company db only for this purposes and create UDT there.

  • How to read and write data to a user defined table?

    I have created a srf with 2 edit box and a ok buttin, I want to insert data to the user defined table i created using sql query while i press OK button..
    Please provide the complete code to insert and select da from the user defined table.

    Hi,
    You can use the code below.
    Dim ret As Long
    d
    Private Sub Add_Table_Click()
        Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
        Set oUserTablesMD = oCompany.GetBusinessObject(oUserTables)
        ' When adding user tables or fields, use a prefix
        ' identifying your partner name space. This will
        ' prevent collisions from different partner add-ons
        ' SAP's name space prefix is "BE_"
        'Set the two mandatory fields
        oUserTablesMD.TableName = "T1"
        oUserTablesMD.TableDescription = "Table1"
        'Add the table (which contains 2 default, mandatory fields, 'Code' and 'Name')
        ret = oUserTablesMD.Add
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Table: " & oUserTablesMD.TableName & " was added successfully"
        End If
    End Sub
    Private Sub Add_UDF_Click()
        Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
        Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)
        oUserFieldsMD.TableName = "T1"
        oUserFieldsMD.Name = "AlbUDF"
        oUserFieldsMD.Description = "Albert UDF"
        'Add the field to the table
        lRetCode = oUserFieldsMD.Add
        If lRetCode <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Field: '" & oUserFieldsMD.Name & "' was added successfuly to " & oUserFieldsMD.TableName & " Table"
        End If
    End Sub
    Private Sub Add_Data_Click()
        Dim oUserTable As SAPbobsCOM.UserTable
        Set oUserTable = oCompany.UserTables.Item(1)
        oUserTable.GetByKey ("T1")
        'Set default, mandatory fields
        oUserTable.Code = "A"
        oUserTable.Name = "Albert"
        'Set user field
        oUserTable.UserFields.Fields.Item("U_AlbUDF").Value = "1"
        oUserTable.Add
        If ret <> 0 Then
            oCompany.GetLastError ret, Str
            MsgBox Str
        Else
            MsgBox "Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table"
        End If
    End Sub
    Regards,
    Noor

  • Item Code Auto Generation Based on User defined Tables

    I need the Item code like
    PRODUCT TYPE-ITEMGROUP-ITEMCODE-SUBITEM-BRAND-COLOR  e.g .FG-01-01-00-001-00.
    I created the following User define Tables and link to Item Master data
    U_PRO             - FOR PRODUCT TYPE
    U_GROUP        - FOR  ITEM GROUP
    U_ITEMCODE    - FOR ITEMCODE
    U_SUBITEM       - FOR SUB ITEM
    U_BRD              - FOR BRAND NAME
    U_COLOR         - FOR COLOR
    i need a formatted search in Item code to fetch the codes from the user defined  table
    i tried with the following
    SELECT T5.[Code]'-'T2.[Code]'-'T3.[Code]'-'T4.[Code]'-'T0.[Code]'-'T1.[Code] FROM [dbo].[@BRD]  T0 , [dbo].[@COLOR]  T1, [dbo].[@GROUP]  T2, [dbo].[@ITEMCODE]  T3, [dbo].[@SUBITEM]  T4, [dbo].[@PRO]  T5 INNER JOIN OITM T6 ON T5.Code = T6.U_PRO WHERE
    T5.[Code] = T6.[$U_PRO] AND 
    T2.[Code] = T6.[$ U_GROUP] AND
    T3.[Code] = T6.[$U_ITEMCODE] AND
    T4.[Code] = T6.[$U_SUBITEM] AND
    T0.[Code]  = T6.[$U_BRD] AND
    T1.[Code]  = T6.[$U_COLOR]
    showing errors. Can any one help me regarding this. I badly need the query for Auto generation of Itemcode

    Hi,
    How can you assign those UDF value without ItemCode in the first place?
    Thanks,
    Gordon

  • Problems adding new rows to a simple user defined table manually

    Hi
    I have just created a user defined table ( SAP 2007 SP01 PL9 ) but when I try to add a line using tools ->userdefined tables I get the following error -
    conversion failed when converting the nvarchar value '-3 @GLMAP to data type int ( CINF )
    The table is called GLMAP and I simply added 3 alpha fields
    I  put 1 into all the fields on screen
    Can anyone suggest anything please as ideally I would like the end user to be able to update this simple table
    Many thanks
    Regards Andy

    Andy
    I think in your case you have used  DBDataSource to display data from UDT on your form. 
    Easyier to use UDO than User Defined Table, because you do not have to programming at UDO based forms.
    What István tried to say:
    Check your sp_transactionnotification procedure, maybe you have used @object_type variable as integer instead of nvarchar
    Regards
    J

Maybe you are looking for

  • Cloud Abo Problem

    Hallo, ich weiß nicht mehr weiter. Diese Idioten bei Adobe sind einfach nicht in der Lage mir mein CloudAbo vernünftig zu schalten. Ich weiß gar nicht wie oft ich schon mit dem Support telefoniert und gechattet habe. Wir haben hier in der Firma zwei

  • Fact sheet in BP, Activities

    Hi All did anyone work on fact sheet delivered by SAP for business partners. I checked the config guide for business package but no where it mentioned configuration for fact sheet in Business partners, activities and opportunities. When I click on th

  • ISR-G2 Router with UCCX

                 Can you configure a Cisco 3945-CME-SRST to do UCCX? I see that you can use a ISM-SRE-300 module but will it work? I configured the 3945 for 300 VM users and then configured a MCS7816 server with 25 users but I was reading some documents

  • Protlet with URL to a page or a book

    We have been trying to create a start page with some small advertisement portlets. And now we want it to call a new page that will be shown on the whole page. I attached a word document that illustrates what we want to do. [portletlink.doc]

  • Object type for Task list gp

    Hi All, Any idea, which is the object type ( from NRIV table) for Task list gp.(transaction CA11) Regards Saurabh