User Tables & DB Relations

Is there a way to relate a specified field in a user table to a field in a Business One table?
Edited by: Darius Heydarian on May 2, 2008 2:57 PM
Edited by: Philip Eller on May 16, 2008 8:55 AM
Edited by: Philip Eller on May 30, 2008 8:45 AM*
Edited by: Philip Eller on Jun 13, 2008 9:39 AM**

We have developed an add on that tracks specific, proprietary data in the Service Call module.  We are using User Tables for "Service Call Lines".
For example:
@USR_SCL1
@USR_SCL2
@USR_SCL3
Each of these tables have a field named "U_fk_CallID".
I am trying to include some of these tables into the Tech Form of the service call.  However, when I relate the U_fk_CallID field to the Service Call ID in PLD, B1 relates the two tables through:
OSCL.CallID <--> @USR_SCL1.Code
I am thinking that if I can manually set the correct relation in B1, it will relate them correctly for reporting.

Similar Messages

  • User tables disappeared from our Planning SQL table

    All of the user tables in the SQL database associated with our Planning application mysteriously disappeared.
    We created a classic Planning application and converted it to an EPMA application. We deployed the application in our test environment and then used Lifecycle Management to migrate it to production. Everything was functioning well until we started getting errors saying "Creating rebind thread to RMI
    Query Failed: SQL_GET_SYSTEMCFG: null
    java.sql.SQLSyntaxErrorException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'HSP_SYSTEMCFG'."
    We checked the tables in our production Planning relational database and all of the HSP* tables were gone. The HSP_SYSTEMCFG table disappeared sometime before 11/14/12 and the remaining tables disappeared between 11/14 and 11/16. The tables went missing in both our test and production environments, but I'm not sure of the timing for the test database. Our SQL DBA couldn't find any unusual activity in the SQL logs. We are trying to determine the cause and have not had any luck so far. Has anyone else experienced this problem?
    We have restored the tables from a database backup but are concerned that the problem could occur again.

    Are you serious? This is EXACTLY the same isue that ypou had ORACLE USER_TABLES Table names in CAPITALS.

  • Creating User Table, User Field ... with Script SQL in C#

    Hi every body,
    I wonder if we could create a user table, user field ... with script SQL in C#.
    Should I use the reference Microsoft.SqlServer.ScriptTask ??
    Thank you for your Help

    Haifa,
    I am not sure where your question is directed.  The forum that you have posted your question in is for questions related to the SAP Business One SDK.  Are you looking to create new user tables/fields in SAP Business One?  If so you can do this either through the SAP Business One SDK interface using Tools > User Defined Fields and/or Tools > User Defined tables.
    You can also create metadata objects in Business One programatically using the UserTablesMD and/or UserFields objects.
    SAP does not support direct SQL writes to the SAP Business One Db.
    HTH,
    Eddy

  • Link between User Name in user table and Personla number in HR

    Hi
    Could any one let me know the link between the User Name field in User table and Personal number in HR table. Pls let me know the table name which shows the relation between these two fields.
    Regards,
    Ram

    HI Ram
      The table which contains this data is PA0105. The value of field USRTY should be '0001'. For example if u want to get the UNAME related to an employee.
    SELECT usrid
      FROM pa0105
    WHERE pernr EQ p_pernr
          AND usrty EQ '0001'.
    Please award points if u found this helpful

  • How to find how/if two tables are related?

    Hello Frnds,
    If there an FM which can tell if two tables are related so that a join can be performed on them and if yes, it can tell on which field they are related?
    Regards,
    Arpit

    thanks,
    Rich, tables will be taken as input from user as parameters and hence will be dynamic. I want to use this logic for the purpose where user wud like to know, for example, which all DEL for SO are created by same user. Now in this case I want to know if there is relation between LIKP, LIPS and VBAK. But if user wants to see which all GR were created by same user who created POs, tables will be MKPF, MSEG and EKKO.
    SO what I am trying to say is tables will change as per input but I need to before before processing logic, if there any relation exsits between input table at all or not?
    Regards,
    Arpit

  • 'Master data type User table cannot add row'-DTW error

    Hi All,
          I am creating a template for user define Master data table from DTW, when i am trying to port data by using that template through DTW. it is giving error like--'Master data type User table cannot add row'
    So can any one have solution for this.
    Regard's
    Hari

    Hari,
    Please see SAP Note 1234690 on the SAP PartnerEdge Portal.  This seems like a similar problem although the example is using the Business One SDK which uses the DI API.  The DTW also uses the DI API ... so there may be a relation.
    You may want to check the latest patch level for SAP Business One 2007A as the note says it is a known issue.
    Eddy

  • How do I create new user table in program and then access it?

    I am writing an application where I check for the existence of user objects when the add on starts and run the setup if the objects do not exist. I can create the user tables and fields but after the setup completes these objects still are not visible.
    If the user objects exist when the add on is first run everything is detected correctly.
    When a user object is added in SAP the user is eventually prompted to restart so I suspect something needs to happen prior to the add on being able to use the new fields.
    Does the add on need to wait for the DI Server to perform some action? Do I need to just quit the add on's class and rerun it, disconnect and reconnect to the company, or get a new Application and/or company object?
    What I want to do is figure out a way for the add on to automatically run the configuration if the user tables and fields do not exist yet and then kick off the regular add on code. I haven't seen anyone else's code so I don't know what is recommended or required here.
    Thanks for any assistance!

    I found that the add on can validate the existance of the user fields if I disconnect from the company object, set the SAPbouiCOM.Application and SAPbobsCOM.Company objects to null, set the new application, context, and company objects, and reconnect once more.
    HOWEVER...
    I still have to wait for the client to be restarted manually before I can run any of the form I added to the menu.
    So, I'd still like to know what the best practice is here. Should I just exit after setting up the tables and tell the user to restart SAP?

  • Crystal Report error trying to retrieve data from a user table

    Hi,
    I'm making crystal report application with VS 2005 and I need to retrieve data form a user table. I'm using Pull method, I configure the connection and parameters by code.
    I think that the problem could be the @ that is used to identify these tables. Please, if some body had this problem before and have a solution, please let me know asap.
    Thanks

    Hi Andrea,
    I had the same problem today. I upgraded from Crystal Version 8 to 11 and the problem was solved. Maybe it is too late for you, but I wanted to post the solution if anybody else has the same problem.
    Regards
    Guillermo

  • HOW CAN I ADD/UPDATE/INSERT IN A USER TABLE WITH MATRIX

    Hi All,
    I have one User table (Defined as No Object) and what i need to do is a form with a matrix to Add/Update/Delete data in my user table.
    I already create the form and the matrix that already give me the user table data. But now i have several problems to solve.
    First I try to add a new row but this new row get the data of the last row in the matrix. What i needed is a blank row to add new data in the user table.
    Second, when i change data in matrix and do update in the form, sap show me the message that the operation is successfully done but the data in the user table in not updated.
    I am trying to do one forma like whe can find in Setup-> General -> Freight.
    Can anyone help me?
    Best Regards,
    Luis Duarte

    Hi,
    If ur dealing with a simple form like that U can as well use the direct table form, and just provide a FMS to auto matically fill the code and name. U can directly use the form by.. Tools-->UserDefined Windows
    Or
    Comming to ur problem.... when ur adding a new row clear the data sources so that u'll get a blank row.
    And for update the best thing to do is delete all the records in the table and again insert all the records directly from the matrix.
    Hope it helps,
    Vasu Natari.

  • How to save matrix do user table?

    Hi,
    I have created on system form matrix as:
                        oNewItem = oOrderForm.Items.Add("a", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
                        oNewItem.Top = 150
                        omatrix1 = oNewItem.Specific
                        oColumns = omatrix1.Columns
                        oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        oColumn.TitleObject.Caption = "#"
                        oColumn.Width = 20
                        oColumn.Editable = False
                        oColumn = oColumns.Add("code", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        oColumn = oColumns.Add("name", SAPbouiCOM.BoFormItemTypes.it_EDIT)
                        oColumn = oColumns.Add("cesta", SAPbouiCOM.BoFormItemTypes.it_EDIT)
    This matrix i have bounded to datasource as:
                oDBDataSource = oOrderForm.DataSources.DBDataSources.Add("@SKIL_ATTACH")
                oConditions = New SAPbouiCOM.Conditions
                oCondition = oConditions.Add
                oCondition.BracketOpenNum = 2
                oCondition.Alias = "U_PATH"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = "xxx"
                oCondition.BracketCloseNum = 1
                oDBDataSource.Query(oConditions)
                oItem = oOrderForm.Items.Item("a")
                omatrix1 = oItem.Specific
                oColumns = omatrix1.Columns
                oColumn = oColumns.Item("cesta")
                oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "U_XCESTA1")
                oColumn = oColumns.Item("code")
                oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "CODE")
                oColumn = oColumns.Item("name")
                oColumn.DataBind.SetBound(True, "@SKIL_ATTACH", "NAME")
                omatrix1.LoadFromDataSource()
    The user table has 3 my fields (U_Path, U_xcesta and U_xcesta1) abd 2 fileds (code and name) - this two fields i didnt create, i think that are some system fields?
    On the system form everything seems to be ok, I can add rows, modify data, set new data, ... After changing any data in this matrix, the system button will change from OK to Update or Add and after click on this button in status bar is OK, the data was added or updated...
    The problem is, that in user table aren`t data modified and there are still old data.
    I tried to make update manually as:
                    oItem = oOrderForm.Items.Item("a")
                    omatrix1 = oItem.Specific
                    omatrix1.AddRow(1, 0)
                    Dim cell As SAPbouiCOM.Cell
                    Dim col As SAPbouiCOM.Column
                    Dim ed As SAPbouiCOM.EditText
                    col = omatrix1.Columns.Item("code")
                    cell = col.Cells.Item(1)
                    ed = cell.Specific
                    ed.String = CStr("some data")
                    omatrix1.Columns.Item("cesta").Editable = True
                    omatrix1.Columns.Item("cesta").Cells.Item(1).Click(SAPbouiCOM.BoCellClickType.ct_Double)
                    omatrix1.FlushToDataSource()
                    omatrix1.AddRow(1, 1)
    but nothing happens and data in table are still old. What I`m doing bad? Could anyone help me please?
    Please be patient, because Im working with SBO for short time. Thanks!

    I solved is through manual updating and inserting to database as"
                        oUserTable = oCompany.UserTables.Item("SKIL_ATTACH")
                        oOrderForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT coalesce(max(convert(integer, code)),0) as max from dbo.[@SKIL_ATTACH] with(nolock)")
                        oUserTable.UserFields.Fields.Item("U_Popis").Value = "xxxxx"
                        oUserTable.UserFields.Fields.Item("U_PATH").Value = "xxxxx"
                        oUserTable.UserFields.Fields.Item("U_OP").Value = "xxxxx"
                        lRetCode = oUserTable.Add
    It works, but I think that it is not the easiest way.

  • How to bind the data from user table into user report

    Hi All,
      Please assist me to bind the data from user table into user report. I did create an user table with data and create a user report template (using Query Print Layout). How can I display my data into report format which I created before? Any sample program or document I can refer?
    Platform: SAPB1 2005A
    Add On Language: VB.Net 2003
    Thanks.
    rgds
    ERIC

    Hi Ibai,
      Thanks for your feed back. I give you an example.
    Let say now i wanna print employee list, so i will go
    1. Main Menu -> Reports -> HR -> Employee List
    2. Choose the Selection Criteria -> OK
    3. Matrix will display (Employee List)
    4. I can print the report click on print button
    5. Printing report
    My target
    1. Main Menu -> Eric_SubMenu -> Employee List
    2. Matrix will display (Employee List)
    3. Print button
    4. Print report
    My problem
    Now I would like to use my own report format. My own report format means I wanna add on my logo or do some customization within the employee report. So how I am going to do? I only able to display the employee list in matrix. How do I create a new report format and display it.
    Thanks.
    rgds
    ERIC

  • Error while adding user fields to user table using vb6.0

    Hi,
    I am adding a user tables using vb6.0 using DIAPI.
    I am able to add the user table successfully.
    I am getting the following error when i am adding the fields to the table.
    "The metadata object for this object cannot be updated, since it's ref count is bigger than 0."
    My code is as follows:
        oUserFieldsMD.TableName = TABLE_NAME_ITEM_LOCN
        oUserFieldsMD.Name = vTableFields(0, lCount)
        oUserFieldsMD.Description = vTableFields(1, lCount)
        oUserFieldsMD.Type = vTableFields(2, lCount)
        oUserFieldsMD.EditSize = CLng(vTableFields(3,lCount))
        lRetCode = oUserFieldsMD.Add
    This error does not come up when i try to add the field to my table using the vb sample provided by SAP.
    Your help will me much appreciated.
    Thanks.

    Hi Satish,
    The problem is that you added the table and the objetc that you used to add the table is not freed properly. You need to free the object and then the reference count to that table will be 0 - which will enable you to add the fields
    e.g
    Dim pUTables As SAPbobsCOM.UserTablesMD
    'Do your stuff
    Set pUTables = Nothing
    Dim pUFields As SAPbobsCOM.UserFieldsMD
    'Do your stuff
    Set pUFields = Nothing

  • Creating a User Table via DI API

    Hi all,
    I'm using
    SAP Business One 2004A (6.70.185) SP: 00 PL: 07
    and corresponding SAP Business One DI API 2004
    I want to create a user table.
    I try to create it this way:
    I have two functions
    First function to create the table
    Private Function AP_AddOn_CreateTable() As Boolean
       AP_AddOn_CreateTable = True
       Dim oUDT As SAPbobsCOM.UserTablesMD
       Dim sErrMsg As String
       Dim iErrCode As Integer
       Dim iReturn As Integer
       oUDT = oDIComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
       oUDT.TableName = "AP_tbItemCalc"
       oUDT.TableDescription = "ItemCalculation"
       iReturn = oUDT.Add
       If iReturn <> 0 Then
          oDIComp.GetLastError(iErrCode, sErrMsg)
          Message…
          AP_AddOn_CreateTable = False
       End If
       oUDT = Nothing
    End Function
    This works fine
    Then I call a second function to create the user fields
    Private Function AP_AddOn_CreateFields() As Boolean
       AP_AddOn_CreateFields = False
       Dim oUDF As SAPbobsCOM.UserFieldsMD
       Dim sErrMsg As String
       Dim iErrCode As Integer
       Dim iReturn As Integer
       oUDF = oDIComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
       oUDF.TableName = "@AP_tbItemCalc"
       'Field1
       oUDF.Name = "ItemCode"
       oUDF.Description = "ItemCode"
       oUDF.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
       oUDF.Size = 20
       iReturn = oUDF.Add()
       If iReturn <> 0 Then
          oDIComp.GetLastError(iErrCode, sErrMsg)
          Message…
          Exit Function
       End If
       'Field2
       oUDF.Name = "ItemName"
       oUDF.Description = "ItemName"
       oUDF.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
       oUDF.Size = 100
       iReturn = oUDF.Add()
       If iReturn <> 0 Then
          oDIComp.GetLastError(iErrCode, sErrMsg)
          Message
          Exit Function
       End If
          next fields …
       AP_AddOn_CreateFields = True
    End Function
    The second function returns on adding the first field, an error, errCode -1120, errMsg ‚Ref count for this object is higher than 0’
    If i close the application after creating the table and then restart the application only executing the second function it works.
    I also tried the example as provided in ‚MetaDataOperations’ and it shows the same behaviour.
    Besides, I’m the only user on the system and no other application is running.
    Kind regards,
    Eduard

    Hi,
    See Add  userfield to usertable 1120 Error  SOLUTION
    HTH
    Ribeiro Santos

  • Error while linking udf to user table.

    Hi All,
    If i am gong to joined my UDF to user table by using option then alphanumeric size of that udf changes to 8 from 15. In such condition when i m going to update ths udf thn it is giving error as "Alphanumeric column size cannot be decreased".
    Reply ASAP

    Hi swapy
    put the udf size as 8 before the computer does the work.then try to attach the udf.

  • How to get number of records in all user tables in one select

    Please advise how to retrieve the number of records in all user tables in one select. I would likt to extract the data to excel file.
    Many thanks,
    Andrew

    You could always analyze the tables:
    declare
    begin
      for X in (select owner, table_name from all_tables
                 minus
                select owner, table_name from all_external_tables) LOOP
          dbms_stats.Gather_Table_Stats(X.Owner, X.Table_Name) ;
      end loop;
    end;
    /Then: Select Owner, Table_Name, Num_Rows from All_Tables ;

Maybe you are looking for

  • Itunes can't sync my iPhone5 as it does not recognize apps

    itunes can't sync my iPhone5 as it does not recognize apps

  • Java Applets and Packages

    Hi I have been having problems calling my own packages in java applets to no avail For a basic example i am storing graphics in a package called graphics and i have a class with a drawline function. How would i call this in my main program? At the to

  • User Language setting changed to default language in MS CRM 2011

    Dear All, I have install the English version of the CRM 2011 and also we installed Taiwan language pack. Users modified their default language as Taiwan. But after some time period, the users default language changes to English automatically. I wonde

  • Oops alv container

    Hi All, Greetings!!! I have developed  alv report using OOPS concept ,,currently am struck at 2 issues .. 1. the container is not exactly the same size for the display ,,i mean its not fitting properly in the display window .. 2. I have multiple reco

  • Download Acrobat for Mac AND Windows

    I purchased Adobe Acrobat Pro ver XI online. Web site said purchase price entitles purchaser to install on 2 separate computers. After making purchase, when I went to download software, I noted that order says I bought the full Windows version. I was