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

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • CFL for user defined object in matrix

    I am creating CFL for city .For this I created a user defined table and later registred it to create the object of City.I created the CFL for City as ,
    Private Sub AddCFL()
            Dim intI As Integer
            Dim objCFLsName As SAPbouiCOM.ChooseFromListCollection
            Dim objParaName As SAPbouiCOM.ChooseFromListCreationParams
            Dim objCFLName As SAPbouiCOM.ChooseFromList
            Dim objCons As SAPbouiCOM.Conditions
            Dim objCon As SAPbouiCOM.Condition
            Try
                objForm = SBO_Application.Forms.ActiveForm
                For intI = 0 To objForm.DataSources.UserDataSources.Count - 1
                    If objForm.DataSources.UserDataSources.Item(intI).UID = "CityName" Then
                        Exit Sub
                    End If
                Next
                objForm.DataSources.UserDataSources.Add("CityName", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
                objCFLsName = objForm.ChooseFromLists
                objParaName = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                objParaName.MultiSelection = False
                objParaName.UniqueID = "CFL"
                objParaName.ObjectType = "City"
                objCFLName = objCFLsName.Add(objParaName)
                objCons = objCFLName.GetConditions
                objCon = objCons.Add
                objCon.Alias = "U_Active"
                objCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                objCon.CondVal = "Y"
                objCFLName.SetConditions(objCons)
            Catch ex As Exception
                SBO_Application.MessageBox("AddCFL()=" & ex.Message)
            End Try
        End Sub
    I want to load city names in matrix using this cfl.For this, I added few blank rows in matrix.Then I binded the matrix as ,
    Private Sub BindMatrix()
            Dim objColumns As SAPbouiCOM.Columns
            Dim objColumn As SAPbouiCOM.Column
            Dim matDetails As SAPbouiCOM.Matrix
            objColumn = objColumns.Item("CityName")
                objColumn.DataBind.SetBound(True, "", "CityName")
                objColumn.ChooseFromListUID = "CFL"
                objColumn.ChooseFromListAlias = "CityName"
                objColumn.Editable = True
    matDetails.LoadFromDataSource()
    End Sub
    Problem is created by ChooseFromListAlias .It gives error as,
    Data Source - Alias Not Found
    If I remove that statement, the cfl fires when I press tab in the matrix.But I can not set value in the matrix.

    I created CFL as,
    Private Sub AddCFL()
            Dim intI As Integer
            Dim objCFLsName As SAPbouiCOM.ChooseFromListCollection
            Dim objParaName As SAPbouiCOM.ChooseFromListCreationParams
            Dim objCFLName As SAPbouiCOM.ChooseFromList
            Dim objCons As SAPbouiCOM.Conditions
            Dim objCon As SAPbouiCOM.Condition
            Try
                objForm = SBO_Application.Forms.ActiveForm
                For intI = 0 To objForm.DataSources.UserDataSources.Count - 1
                    If objForm.DataSources.UserDataSources.Item(intI).UID = "CityName" Then
                        Exit Sub
                    End If
                Next
                objForm.DataSources.UserDataSources.Add("CityName", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
                objCFLsName = objForm.ChooseFromLists
                objParaName = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                objParaName.MultiSelection = False
                objParaName.UniqueID = "CFL"
                objParaName.ObjectType = "City"
                objCFLName = objCFLsName.Add(objParaName)
                objCons = objCFLName.GetConditions
                objCon = objCons.Add
                objCon.Alias = "U_Active"
                objCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                objCon.CondVal = "Y"
                objCFLName.SetConditions(objCons)
            Catch ex As Exception
                SBO_Application.MessageBox("AddCFL()=" & ex.Message)
            End Try
        End Sub
    Private Sub BindMatrix()
            Dim objColumns As SAPbouiCOM.Columns
            Dim objColumn As SAPbouiCOM.Column
            Dim matDetails As SAPbouiCOM.Matrix
            Try
                If SBO_Application.Forms.ActiveForm.UniqueID = "TourDetails" Then
                    matDetails = SBO_Application.Forms.ActiveForm.Items.Item("matDetails").Specific
                Else
                    matDetails = objForm.Items.Item("matDetails").Specific
                End If
                objColumns = matDetails.Columns
                objColumn = objColumns.Item("#")
                objColumn.DataBind.Bind("objDT", "#")
                objColumn.Editable = False
                objColumn = objColumns.Item("CityName")
                'If strPara = "Edit" Then
                objColumn.DataBind.Bind("objDT", "CityName")
                'Else
                '    objColumn.DataBind.SetBound(True, "", "CityName")
                'End If
                objColumn.ChooseFromListUID = "CFL"
                'objColumn.ChooseFromListAlias = "CityName"
                objColumn.Editable = True
                objColumn.Width = 290
                objColumn = objColumns.Item("NoOfVisits")
                objColumn.DataBind.Bind("objDT", "NoOfVisits")
                objColumn.Editable = True
                objColumn = objColumns.Item("FromDate")
                objColumn.DataBind.Bind("objDT", "FromDate")
                objColumn.Editable = True
                objColumn.Width = 80
                objColumn = objColumns.Item("ToDate")
                objColumn.DataBind.Bind("objDT", "ToDate")
                objColumn.Editable = True
                objColumn.Width = 80
                matDetails.LoadFromDataSource()
            Catch ex As Exception
                SBO_Application.MessageBox("BindMatrix()=" & ex.Message)
            End Try
        End Sub
    Edited by: Dilip Kumbhar on Mar 31, 2010 10:02 AM

  • 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

  • Using SQL query on user defined table

    Hi all,
    i'am currently working on a project which use user defined table and i would like to know if sap allow us to do insertion/deletion/update on those table using sql query or if we have to use the DI only?
    thanks
    Best regards,

    Hi,
    Definitely you can insert in UDT. You can update but you cant change the Code field after added the rest of the field
    can be updated. You cant delete in UDT but you cant delete anytime in SQL Management Studio.
    THanks.
    CLint

  • How to Execute User Defined Table in SQL?

    Hi Experts
    I have User Defined Table @SIN_MPLN in SAP B1 , i stored value in that User Defined Table and  if i execute that Table Through Query Generator it shows me value. it works fine.
    But when i go to SQL Server 2008 R2 and trying to execute this as..
    select * from @SIN_MPLN
    then it gives me Error --> Must declare the table variable "@SIN_MPLN"
    so please give me the answer
    Thanks

    Hello Navanath,
    Nagarajan's answer is correct.
    select * from [@SIN_MPLN] wil also work. the prefix "dbo" is not mandatory.
    Best Regards Teun

  • Query SQL with variables Parameters and user defined tables

    Hi  everyone
    I got a problem about Query SQL
    [dbo].[@CSOURCE]  is a user defined table
    select * from [dbo].[@CSOURCE]
    you can get the result in following
    code    name
    T01      newspaper
    T02      TV
    T03      radio
    T04      friends
    when I execute the following SQL   Statements ,I get an error
    SELECT T0.CardCode , 0.CardName ,T1.Name ,T2.SONumber
    FROM OCRD T0    LEFT JOIN [dbo].[@CSOURCE]  T1 ON T0.U_CSOURCE = T1.Code
                                 LEFT JOIN (SELECT  T0.CardCode ,COUNT(T0.DocNum)SONumber
                                 FROM ODLN T0  INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
                                WHERE T1.GroupCode =111
                                AND   (T0.DocDate >=[%0] or [%0]='')
                                AND   (T0.DocDate <=[%1] or [%1]='')   
                                GROUP BY T0.CardCode) T2 ON T0.CardCode=T2.CardCode
    WHERE T0.GroupCode =111
    and  T0.CardType ='C
    Is there anyone can correct it for me
    thank you very much
    Edited by: Li Mishan on Jul 17, 2008 9:36 AM
    Edited by: Li Mishan on Jul 17, 2008 9:40 AM

    I am sorry .It is just a mistake of my typewriting.
    The following is the whole SQL
    dbo.@CSOURCE is a user table.It's content is
    code  name
    T01    newspaper
    T02    TV
    T03    radio
    T04    friends
    declare @m int
    declare @FromDate DateTime
    declare @ToDate DateTime
    set @m=(SELECT count(*)  FROM ORDR T0 WHERE T0.DocDate >=[%0] and  T0.DocDate <=[%1])
    set  @FromDate=[%0]
    set  @ToDate=[%1]
    /*****************If I do not connect user tavble dbo.@CSOURCE ,I will succed *****************************************************/
    SELECT T0.CardCode ,T0.CardName ,T2.SONumber,T1.Name
    FROM OCRD T0  LEFT JOIN [dbo].[@CSOURCE] T1 ON T0.U_CSOURCE = T1.Code
                               LEFT JOIN (
                                                SELECT T0.CardCode ,COUNT(T0.DocNum)SONumber                                            FROM ODLN T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
                                                WHERE T1.GroupCode =111
                                                AND (T0.DocDate >=@FromDate or @FromDate='')
                                                AND (T0.DocDate <=@ToDate  or  @ToDate ='')                                                                               
    GROUP BY T0.CardCode
                                            ) T2 ON T0.CardCode=T2.CardCode
    WHERE T0.GroupCode =111
    and T0.CardType ='C'
    when I excute the SQL, It return a error , whith says the column name '%0'  is invalid.
    If I delete "set @m=(SELECT count(*)  FROM ORDR T0 WHERE T0.DocDate >=[%0] and  T0.DocDate <=[%1])"
    and rewrite "set  @FromDate='2008.05.01' set  @ToDate='2008.07.01' "
    It Shows the following results
       CardCode     CardName     SONumber     name
    1      000070        Deng. Jiahua   1                newspaper
    2      000293        LU .Weijuan    1                radio
    3      000313         Xie .Jifang       3               TV
    Edited by: Li Mishan on Jul 18, 2008 4:42 AM
    Edited by: Li Mishan on Jul 18, 2008 4:43 AM
    Edited by: Li Mishan on Jul 18, 2008 5:43 AM

  • Problem in EIS with "user-defined table"

    Platform : z/osrdbms : db2 v7Olap : Db2OlapMy problem :I try to make a "User-Defined table" in a meta-model whith this SQL definitionselect a.idele, a.idele0, b.lbele from u1g.fordv0 a, u1g.eledv0 b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim(description of the two simple table :CREATE TABLE U1G.ARBD ( IDDIM INTEGER NOT NULL, IDARB INTEGER NOT NULL, LBARB VARCHAR(255) NOT NULL, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP ) CREATE TABLE U1G.ELED ( IDDIM INTEGER NOT NULL, IDELE INTEGER NOT NULL, LBELE VARCHAR(255) NOT NULL, DDVAL DATE NOT NULL, DFVAL DATE, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP, MDCEL CHAR(1) NOT NULL, TYPE CHAR(1) NOT NULL ) )When i look at this "user-defined table" data in the meta model, it's okWhen i try to use this table as a dimension in a meta-outiline, it's okexcept when i try to load members in a cube.The load result say "the load terminated with errors"I look in the IS log :?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Error/-104/Build-PQ72292 {DB2 for OS/390}{ODBC Driver}{DSN07011} DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL ".". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: + - AS <IDENTIFIER> DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = 0 0 0 -1 69 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF' X'00000045' X'00000000' SQL DIAGNOSTIC INFORMATION ERRLOC=1:13:1 ?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Informational/-104/Build-PQ72292 SELECT. aa."IDELE0", aa."IDELE", aa."LBELE" FROM.(select a."idele" .., a."idele0" .., b."lbele" from u1g.fordv0 a, u1g."eledv0" b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim) aaI don't understand why it's working in the meta model (the sql is good, i got the data)and why it's not working in the meta outline ?

    Platform : z/osrdbms : db2 v7Olap : Db2OlapMy problem :I try to make a "User-Defined table" in a meta-model whith this SQL definitionselect a.idele, a.idele0, b.lbele from u1g.fordv0 a, u1g.eledv0 b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim(description of the two simple table :CREATE TABLE U1G.ARBD ( IDDIM INTEGER NOT NULL, IDARB INTEGER NOT NULL, LBARB VARCHAR(255) NOT NULL, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP ) CREATE TABLE U1G.ELED ( IDDIM INTEGER NOT NULL, IDELE INTEGER NOT NULL, LBELE VARCHAR(255) NOT NULL, DDVAL DATE NOT NULL, DFVAL DATE, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP, MDCEL CHAR(1) NOT NULL, TYPE CHAR(1) NOT NULL ) )When i look at this "user-defined table" data in the meta model, it's okWhen i try to use this table as a dimension in a meta-outiline, it's okexcept when i try to load members in a cube.The load result say "the load terminated with errors"I look in the IS log :?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Error/-104/Build-PQ72292 {DB2 for OS/390}{ODBC Driver}{DSN07011} DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL ".". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: + - AS <IDENTIFIER> DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = 0 0 0 -1 69 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF' X'00000045' X'00000000' SQL DIAGNOSTIC INFORMATION ERRLOC=1:13:1 ?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Informational/-104/Build-PQ72292 SELECT. aa."IDELE0", aa."IDELE", aa."LBELE" FROM.(select a."idele" .., a."idele0" .., b."lbele" from u1g.fordv0 a, u1g."eledv0" b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim) aaI don't understand why it's working in the meta model (the sql is good, i got the data)and why it's not working in the meta outline ?

  • 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

  • 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

  • How to fill the records from a User Define Table to PO item Grid

    Hi To all,
    I need to fill data from User Define table records into Purchase Order Item Grid.
    I created an UDF Filed in PO - Header Part - "PRS"(Filed Name)
    By using Formatted Search in itemcode column, i called a query,
    "Select itemcode, qty from (@user define tablename) where PRS = $http://OPOR.U_PRS"
    For eg:
    Output from querry
    ItemCode Qty
    ABC 1
    DEF 2
    DFG 7
    SDGD 9
    By using formatted search it is filling only first data in to itemcode column in PO Grid.
    Please help, how can i fill ALL the data in to my PO Grid?
    Thanks in Advance
    SAGAR

    The easisest way is to create datasource and the result bind to grid.
    Datasource:
               oDBDataSource = oForm.DataSources.DBDataSources.Add("@usertablename")
                Dim xoConditions As SAPbouiCOM.Conditions
                Dim xoCondition As SAPbouiCOM.Condition
                xoConditions = New SAPbouiCOM.Conditions
                xoCondition = xoConditions.Add
                xoCondition.BracketOpenNum = 1
                xoCondition.Alias = "u_zn"
                xoCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                xoCondition.CondVal = "cond"
                xoCondition.BracketCloseNum = 1
                oDBDataSource.Query(xoConditions)
    binding (example for matrix, in grid is simillar)
                oMatrix.Clear()
                Dim cols As SAPbouiCOM.Columns
                Dim column As SAPbouiCOM.Column
                cols = oMatrix.Columns
                column = cols.Item("colX")
                column.DataBind.SetBound(True, "@usertable", "u_x")
    oMatrix.LoadFromDataSource()
    hoep it helps
    Petr

  • DI error when binding user defined table

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

Maybe you are looking for

  • I've been using Firefox for years. Now your load screen appears everytime I open. It's a hassle!

    Every time I open Firefox to go to the internet I get a page that says thanks for becoming a tester, etc. Then you want me to download Firefox, which I've done 6 times now! Then you make Firefox Search my homepage. Then I change the homepage. Then a

  • Idoc  and  DME  difference

    Hi Please  explain me the difference   between  idoc and  the  method of  sending file to bank  using dme engine. I   tried  reading the notes in  sap library. But  I am confused. 1) When  do you use idoc . In  what  scenarios 2) When do you  use  th

  • Need help with while loops

    Hello let me first explain what im trying to achive: I want a moving square that you control with the arrow keys on the keyboard. It has to be smooth ie able to move fast without looking like its jumping and it has to be able to move diagonaly aswell

  • Trying to load music to ipod,  getting "windows - write delayed fail  unable to save all the data for th E: etc

    trying to load music from itunes to my ipod classic  message rec'd WINDOWS - WRITE DELAYED FAILED   UNABLE TO SAVE ALL THE DATA FOR THE E: THE DATA WAS LOST is this my ipod  or an itunes problem?

  • Corsair Force 3 240GB and TRIM.

    I have a 240GB Corsair Force 3 SSD installed in my macbook pro. Can some one tell me out of experience if I should have TRIM enabled or not. TRIM support in System profiler is set to No. I have read elsewhere that TRIM doesnot need to be enabled as t