Creating multiple user tables using script

hi
my requirement is i want to create multiple tables by running script . is it possible .how do i do that can any one suggest me and send sample code to solve this task.
(i have to create 100 userTables it is very difficult to create using code or from B1 that is my requirement )and i think some good solution is there for my problem and inserting the tables into B1 by running script.

Hi Om,
Take a look at the SDK help files, or even better, the examples provided with the SDK, they give you a good example how to create a usertable.
Tried that, you could programm a loop wich creates your usertables, or a function that progresses a input file containing all your usertables.
<b>Pseudo code loop (C#)</b>
for(int i = 1; i <=100; i++)
  /* Call you your function that creates a usertable with the given name */
  CreateUserTable("TBL_" + i.ToString());
Hope it helps,
Rowdy

Similar Messages

  • How to  load data into user tables using DIAPIs?

    Hi,
    I have created an user table using UserTablesMD object.
    But I don't have know how to load data into this user table. I guess I have to use UserTable object for that. But I still don't know how to put some data in particular column.
    Can somebody please help me with this?
    I would appreciate if somebody can share their code in this regard.
    Thank you,
    Sudha

    You can try this code:
    Dim lRetCode As Long
    Dim userTable As SAPbobsCOM.UserTable
    userTable = pCompany.UserTables.Item("My_Table")
    'First row in the @My_Table table
    userTable.Code = "A1"
    userTable.Name = "A.1"
    userTable.UserFields.Fields.Item("U_1stF").Value = "First row value"
    userTable.Add()
    'Second row in the @My_Table table
    userTable.Code = "A2"
    userTable.Name = "A.2"
    userTable.UserFields.Fields.Item("U_1stF").Value = "Second row value"
    userTable.Add()
    This way I have added 2 lines in my table.
    Hope it helps
    Trinidad.

  • How to create multiple users in solaris using script

    hi
    how i can create multiple users (2000 users) using shell script with a common password .
    useradd is creating one user at a time.
    thanks

    I m new to solaris and scripting also.
    how i can write a script for this .

  • Creating reports for user tables using XL reporter

    Hi all
    i wish to create  a report based on user tables using the XL reporter.
    question is: is it possible? and if so how can it be done?
    appreciate the help
    Yoav

    Hi Yoav,
    XL Reporter cannot pull data from UDTs. However, you can use an Excel template when creating your XL Reporter report and then embed VBA code in the template to pull the UDT data in to the report after the XL Reporter has finished generating the report. It all depends on how you need to combine the UDT data with other SBO data. If you are interested in a report based entirely on UDT data then it would be simpler just to write the report using VBA in Excel (or Crystal).
    Kind Regards,
    Owen

  • How to load data into table Using Script Task

    We have a directory/folder where we have a file. We need to insert the File Created Date , File Name , Extension into the database table of Sql server by using Script Task.
    So could you please suggest , how to frame the connection string , fetch the file details and insert the data into the database table using Script Task of SSIS 2008

    You can achieve it as follows using standard script task
    1. Add a ForEachLoop container to point to your directory to iterate though the files. Add a variable of type string inside loop to get file name of each file it iterates. Choose option Filename and extension. Add a variable to just store extension part
    (FileExtension), set EValuateAsExpression true for it and give expression as below
    SUBSTRING(@[User::FileName],FINDSTRING(@[User::FileName],".",1)+1,LEN(@[User::FileName]))
    2. Add a script task inside loop and pass filename variable as a read only variable to it. Crete a new variable to get creationdate and pass it as ReadWrite. Inside write code as below
    Public Sub Main()
    ' Add your code here
    Dim f As New System.IO.FileInfo(Dts.Variables("FileName").Value.ToString())
    Dts.Variables("FileCreatedDate").Value = f.CreationTime
    Dts.TaskResult = ScriptResults.Success
    End Sub
    3. Add a Exec SQL Task after Script task inside loop and give a query like below
    INSERT INTO TableName (FileName,CreatedDate,Extension)
    VALUES(?,?,?)
    and in parameter tab map the parameter placeholders 0,1 and 2 to @[User::FileName],@[User::FileCreatedDate] & @[User::FileExtension] variables
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Export to PDF - Can a single report (rpt file) create multiple PDF files using the export command?

    Post Author: markeyjd2
    CA Forum: Exporting
    Greetings forum members,
    My question is, in its entirety: Can a single report (rpt file) create multiple PDF files using the export command, ideally one PDF file per DB record?
    In my case; I have a Crystal Report that reads data from a DB table containing ~ 500 records.  When I export the report to a PDF file, I get one PDF file, with ~ 500 pages.
    What I would like to do is export the report to ~ 500 individual PDF files; One file per DB record.  The file names would be based on the table's primary key.
    Is this possible?

    Post Author: Micha
    CA Forum: Exporting
    Hi,
    you need some lines of code, but its easy. Dependend on how to start the generation of your 500 PDFs, you can write an ASP page and start it via Web Browser, or a Windows Script and start it via scheduled job...
    Here's an abstract of the ASP code I use:
    First, you create a recordset (here: "rsc") which gives you the list of ID fields you want to export, then you create CrystalRuntime.Application object, then you loop through the recordset, open your report (here: "oRpt") and set login info. Then set the selectionformula, so that the report displays only the data of the current ID, e.g.:
      oRpt.RecordSelectionFormula = "(" & oRpt.RecordSelectionFormula & ") AND {myTab.myVal}=" & rsc("myVal")
    Then you export the report, move to the next record in recordset, and repeat the loop until recordset.EOF. Then you close recordset and connection.
    Micha

  • Error while creating the DWH tables using DAC

    Hi,
    I am getting error while creating the DWH tables using DAC. I have created a ODBC DSN using merant driver with DAC repository DB credentials and the test connection is successful. And while creating the tables i gave the olap dw credentials and the DSN name which i created earlier. But it throws the error as below:
    Please find the below mentioned error message
    =====================================
    STD OUTPUT
    =====================================
    CREATING SIEBEL DATABASE OBJECTS
    F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ******* /c DB_DAC /G "SSE_ROLE" /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b "" /K "" /X "" /W N
    Error while importing Siebel database schema.
    =====================================
    ERROR OUTPUT
    =====================================
    Siebel Enterprise Applications ODBC DDL Import Utility, Version 7.7 [18030] ENU
    Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.
    This software is the property of Siebel Systems, Inc., 2207 Bridgepointe Parkway,
    San Mateo, CA 94404.
    User agrees that any use of this software is governed by: (1) the applicable
    user limitations and other terms and conditions of the license agreement which
    has been entered into with Siebel Systems or its authorized distributors; and
    (2) the proprietary and restricted rights notices included in this software.
    WARNING: THIS COMPUTER PROGRAM IS PROTECTED BY U.S. AND INTERNATIONAL LAW.
    UNAUTHORIZED REPRODUCTION, DISTRIBUTION OR USE OF THIS PROGRAM, OR ANY PORTION
    OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL BE
    PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER THE LAW.
    If you have received this software in error, please notify Siebel Systems
    immediately at (650) 295-5000.
    F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ***** /c DB_DAC /G SSE_ROLE /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b /K /X /W N
    Connecting to the database...
    28000: [DataDirect][ODBC Oracle driver][Oracle]ORA-01017: invalid username/password; logon denied
    Unable to connect to the database...
    any help is appreciated.
    Thanks,
    RM

    The fact that you are getting an "ORA-01017: invalid username/password; logon denied" message indicates that you are at least talking to the database.
    The log shows that username "infdomain" is being used. Can you double check the username and password you have in DAC in a SQL*Plus/SQL Developer session?
    Please mark if useful/helpful,
    Andy.

  • 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?

  • 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

  • Multiple fact tables using one measure

    Hi Experts,
    Multiple fact tables using single measure .For example Measure name is amount . This measure is using 5 fact tables. By using this info , i have to create bmm layer document . In bmm layer documents columns are like logical table name ,column name, logical sourc name . could you please help me out to draft the document ?

    Hi ,
    My question is five fact tables are there, day level two different fact tables , period and week fact tables are there .
    Above all tables are using single measure . how to design these fact tables with measure in bmm layer ?
    Please kindly give reply .
    Thanks in advance.

  • Create multiple external tables from same flat file ?

    using oracle 10g
    currently create many external tables like so..
    CREATE TABLE "XT_UNITS"
    "Q1_2012" VARCHAR2(25 BYTE),
    "Q2_2012" VARCHAR2(25 BYTE),
    "Q3_2012" VARCHAR2(25 BYTE),
    "Q4_2012" VARCHAR2(25 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "XE_FILES" ACCESS PARAMETERS ( records delimited BY newline
    skip 1 fields terminated BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES
    ARE NULL ) LOCATION ( 'xtunits.csv' ))
    is there any way I can use 1 flat file (csv) to populate many external tables ?
    maybe by section ?

    Jay wrote:
    using oracle 10g
    currently create many external tables like so..
    CREATE TABLE "XT_UNITS"
    "Q1_2012" VARCHAR2(25 BYTE),
    "Q2_2012" VARCHAR2(25 BYTE),
    "Q3_2012" VARCHAR2(25 BYTE),
    "Q4_2012" VARCHAR2(25 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "XE_FILES" ACCESS PARAMETERS ( records delimited BY newline
    skip 1 fields terminated BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES
    ARE NULL ) LOCATION ( 'xtunits.csv' ))
    is there any way I can use 1 flat file (csv) to populate many external tables ?
    maybe by section ?Not a logical question.
    An external table definition relates to one or more files.
    You could probably create multiple externable table definitions to access the same file(s), but you may end up with some operating system file locking issues if you're not careful, and to be honest why would you need to do that?

  • Create multiple users

    Hi,
    I would like to create multiple users from my Table Users (Username & Passwords) instead to pass by the express Application Users from apex. I have like 100 users, it will take so long to create with apex.
    Is anyone know the sql code to create that with sql workshop ?
    Thanks

    this is pretty basic but should do it... I haven't tested or anything but should work (or at least with the smallest of tweaks will work). The only problem I can see you encountering will be if the user already exists as I haven't handled this yet but a simple exception handler around the apex_util.create_user call will handle this. You may want to change the password to something else but this at least shows the basics.
    declare
    cursor my_users is
    select user_id user_id, user_id user_name, user_id password
    from users;
    begin
    for u in my_users loop
    apex_util.create_user(
    p_user_id => u.user_id,
    p_user_name => u.user_name
    p_web_password => u.password);
    end loop;
    commit; --can't remember if this needs a commit but shouldn't hurt
    end;

  • Create multiple user accounts

    How could I create multiple user accounts?...
    We have about 2000 students register every year and each of them will be given a user account

    I managed to create many users using the command
    imadmin -D serviceadmin n xxx.com -w password -i <inputfile>....
    the content of the input file
    l KA1000
    F new
    L user1
    W secret
    l KA1001
    F new
    L user2
    W secret
    so I have created 2 user accounts [email protected] and [email protected]....
    I have one more question to ask..how can I create new accounts which have different login id and email address using the input file....for examples for login id KA1000 the email address would be [email protected].
    I've tried this using ldapadd and it worked, so I would like to know wether imadmin command will work the same.....

  • How to delete the data loaded into MySQL target table using Scripts

    Hi Experts
    I created a Job with a validation transformation. If the Validation was failed the data passed the validation will be loaded into Pass table and the data failed will be loaded into failed table.
    My requirement was if the data was loaded into Failed database table then i have to delete the data loaded into the Passed table using Script.
    But in the script i have written the code as
    sql('database','delete from <tablename>');
    but as it is an SQL Query execution it is rising exception for the query.
    How can i delete the data loaded into MySQL Target table using scripts.
    Please guide me for this error
    Thanks in Advance
    PrasannaKumar

    Hi Dirk Venken
    I got the Solution, the mistake i did was the query is not correct regarding MySQL.
    sql('MySQL', 'truncate world.customer_salesfact_details')
    error query
    sql('MySQL', 'delete table world.customer_salesfact_details')
    Thanks for your concern
    PrasannaKumar

  • How can i create multiple accounts but use the same itunes?

    how can i create multiple accounts but use the same itunes?

    Hi iCloud is Making Me Go Crazy,
    You will need to create a new Apple ID for your GameCenter and iCloud services.  You can continue to use the current Apple ID you share with your Mom for access to iTunes Store purchases if you wish. 
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    Cheers,
    - Judy

Maybe you are looking for

  • How do I split an event?

    There used to be a way to split an event. I can't find it in the new (v. 11, build 9.3) version on OS 10.6.7.  Can anyone help me?

  • IView displays junk characters in Page preview screen

    hi I am facing an unknown problem in Business Package(Production Analysis) for EP5.0, which i imported to EP6.0. The IView which i am using is a trasaction iview. Earlier it was WebGUI, i changed it to WinGUI, and i did changes anything required. The

  • Reports: REP-0177 & REP-3000 errors :-( (RH 6.2.2 HA 1.0)

    Hi Folks, hi Oracle, we have some serious problems here with Oracle Reports 6i Patch 6 which is running under Red Hat HA (Red Hat 6.2.2 High Aviability Server 1.0, based on Zoot) Because HA installs without X i have installed all needed X-packes to g

  • HELP!!! Mac G4 450mhz dual ethernet PROBLEMS!

    Hello, my mac is having a serious problem with the internet. It won't connect, and even though i have a ethernet cable plugged in, it says i don't. Everything was working fine until i left for 2 days and and plugged it for that time. I need the inter

  • T7900 remote screwed...

    Hey. I bought a Creative Inspire T7900 with my dell computer, and now i have a problem with the sound system(which is covered by dell), but i hoped for a quicker answer here before i asked them. The bass in my sound dissapears sometimes when i use th