Important! storing Java counter in database

How do I store a counter from a Java webpage into a database? It doesn't really matter what database I use, I just need the values of the counter to be stored in the database 3 times a day and if it were clicked, it would be updated with the current counter. Thanks.
Message was edited by:
UofWengineer

No, I don't really understand the environment. I was just looking for a quick fix but clearly that isn't possible lol. Anyways, I got someone to help me and now I'm using the File Streaming method. Here's the code but it gives me the following error messages.
AdamRecorder.java:39: cannot resolve symbol
variable: currentLocale
location: class AdamRecorder
timeFormatter = DateFormat.getTimeInstance(DateFormat.DEFAULT, currentLocale);
AdamRecorder.java:40: cannot resolve symbol
variable: currentLocale
location: class AdamRecorder
timeFormatter = DateFormat.getTimeInstance(DateFormat.DEFAULT, currentLocale);
AdamRecorder.java:46: cannot resolve symbol
Symbol: method toString()
location: class java.lang.Integer
out.write("Counter Reading: " + new Integer(Counter).ToString() + " Time: " + timeOut);
The actual code for my program is:
import java.io.*;
import java.util.*;
import java.text.*;
public class AdamRecorder
     // Our only method so far, RecordIt()
     public void RecordIt(int Counter) throws java.lang.Exception
//static public void displayDate(Locale currentLocale) {
          // define all varibles
          File outputfile;
          FileWriter out;
          Date today;
          String dateOut;
          String timeOut;
          DateFormat dateFormatter;
          DateFormat timeFormatter;
// Starts the function Section
timeFormatter = DateFormat.getTimeInstance(DateFormat.DEFAULT, currentLocale);
          dateFormatter = DateFormat.getDateInstance(DateFormat.DEFAULT, currentLocale);
          today = new Date();
          dateOut = dateFormatter.format(today);
          timeOut = timeFormatter.format(today);
          outputfile = new File(dateOut + ".log"); // Our Filename will be the date
          out = new FileWriter(outputfile);
          out.write("Counter Reading: " + new Integer(Counter).ToString() + " Time: " + timeOut); // Write the current time/count to the file
          out.close();
Thanks again.

Similar Messages

  • Java web service to invoke a stored procedure in the database

    Hi
    Does anybody have a example Java web srevice to invoke a stored procedure in the database
    regards
    Edited by: hrishy on May 20, 2011 12:11 AM

    hrishy wrote:
    Thanks i have modified the title so its easy to comprehendWrite the two parts mentioned above and post if you get problems with your code.
    First write code that calls the stored procedure and test that to make sure that it works.
    Then write a simple webservice and test it out to make sure it works. The integration should be trivial after that.

  • Java Stored Procedure in one database connecting to muntiple databases.

    Hello,
    I created a Java Stored Procedure in one database(Oracle10g) and successfully open a connection to another database(Oracle10g) using Thin JDBC Driver. I want to actually transfer CLOB data from one DB to another DB. I am concern that by opening a connection another database in Java Stored Procedure, might interfere with oracle and destabilize the instance at some point. Oracle JDBC FAQ (Link: http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#34_13) stated that Yes it could be done but then mentioned the workaround.(if it could be done why do we need a workaround!!!)
    I would like to confirm whether connecting to multiple DB using JDBC Thin Driver in a Java Stored Procedure is supported by Oracle10g or not and whether it has any known issue with it.
    Thanks in Advance!
    Edited by: user649261 on Sep 16, 2008 8:05 PM

    hrishy wrote:
    Thanks i have modified the title so its easy to comprehendWrite the two parts mentioned above and post if you get problems with your code.
    First write code that calls the stored procedure and test that to make sure that it works.
    Then write a simple webservice and test it out to make sure it works. The integration should be trivial after that.

  • Stored procedures in PV database

    I want to create PL/SQL stored procedures in Primavera database(Oracle 8.1.7) using JDBC ODBC bridge driver which further uses system dsn PrimaveraSDK_PE(Installed by standard Primavera client).
    Whenever i try creating it, i get an error message saying syntax error near word procedure.
    Same error occurs when i try creating a table.
    Following are my connection parameters:
    odbcURL = "jdbc:odbc:PrimaveraSDK_PE"
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con1 = DriverManager.getConnection(odbcURL, "admin", "admin");
    I can create the procedures using Oracle OCI driver but using that i do not have access to all fields..so errors says..invalid column.
    following are connection parameters:
    String driverName = "oracle.jdbc.driver.OracleDriver";
         Class.forName(driverName);
              con = DriverManager.getConnection("jdbc:oracle:oci8:@sapxi","privuser","privuser");
    Since I cannot see all the fields of database through PL/SQL, I think this approach would not work. To see all the fields of database I must access it using DSN ONLY!!! Even the administrative login is not been able to show me all the fields.This is the way they have designed it....
    So whats wrong in creating the stored procedures in oracle database using JDBC ODBC bridge driver using system DSN????????
    Please help

    Thanks for your reply!!!
    Here is the code!
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class Try
    static String odbcURL = "jdbc:odbc:PrimaveraSDK_PE";
    static public synchronized Connection getConnection ()
                   throws SQLException, ClassNotFoundException
              Connection con1 = null;
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con1 = DriverManager.getConnection(odbcURL, "admin", "admin");
              return con1;
    public static void main(String[] args) throws Exception
              try
              Connection con = getConnection();
         String actionQuery = new StringBuffer( "select wbs_id, wbs_concat_name , wbs_short_name , wbs_name from projwbs where wbs_id = 3986").toString();
              ResultSet rs=null;
              PreparedStatement prepStmt = con.prepareStatement(actionQuery);
              rs = prepStmt.executeQuery();
              int wbsID = 0;
              if (rs == null )
                   System.out.println("rs null");
              else
              while(rs.next())
              wbsID = rs.getInt(1);
              System.out.println("rs not null");
              System.out.print(" " + wbsID);
              System.out.print(" " + rs.getString(2));
              System.out.print(" " + rs.getString(3));
              System.out.print(" " + rs.getString(4));
              rs.close();
              prepStmt.close();
    // Creating Stored Procedure....
    Statement stmt = con.createStatement();
    String procedure = "CREATE OR REPLACE PROCEDURE FirstProc AS BEGIN SELECT PROJ_ID FROM PROJECT; END; ";
    stmt.executeUpdate(procedure);
    System.out.println("Proceudre created or updated successfully!");
    stmt.close();
              catch(Exception e)
                   e.printStackTrace();
    and the complete stack trace!!!
    rs not null
    3986 EN EN ABCfghjkl
    java.sql.SQLException: [ATI][OpenRDA ODBC]Syntax error in SQL statement. syntax error line 1 at or after token <OR>.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
         at pack1.Try.main(Try.java:134)
    First two lines show the valid output for the select query..which is absolutely correct. But the create procedure statement is throwing above mentioned errors.
    Also one more important thing, I am not been able to view all the columns of table projwbs(its regarding Primavera SDK) through SQL Plus having administrative rights.
    But I can access all the fields using jdbc odbc bridge driver in Java.
    Is there any specific security or access control????
    so that users would able to access specific columns through JDBC only and not through SQL Plus.
    Please help!!!

  • AES Algorithm error when trying to encrypt using stored Java class.

    Dear All,
    We have a specific reuirement where in we cannot use DBMS_CRYPTO package to encrypt/decrypt data using AES Algorithm
    So I am trying to use a stored Java class and I am getting "AES algorithm not available".
    I am using Oracle 10gR2 standard edition.
    Below is my code
    1. Stored Java class
    2. Stored function to access the above Java class.
    3. Test anonymus PL/SQL to test above code.
    Please help me finding the problem why I am getting "AES algorithm not available" error when I call stored Java class in Oracle.?
    **** If I use "DES" algorithm, it works. Also the Java code works well if I execute it as normal Java class from Eclipse.
    I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
    The jre version in Oracle is 1.4.2.
    I appreciate your help.
    Thanks,
    Priyanka
    Step1: Stored java class to encrypt and decrypt data
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "EncryptUtil" AS
    import java.security.Key;
    import javax.crypto.Cipher;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.spec.SecretKeySpec;
    public class EncryptUtil
         public static String encrypt(String inStr)
         String outStr = "Test data 123";
    try
    KeyGenerator kgen = KeyGenerator.getInstance("AES");
    kgen.init(128);
    SecretKey skey = kgen.generateKey();
    byte[] raw = skey.getEncoded();
    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
    Cipher cipher = Cipher.getInstance("AES");
    cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
    byte[] encrypted =
    cipher.doFinal(inStr.getBytes());
    outStr =new String(encrypted);
    catch (Exception e)
         outStr = outStr + "exception thrown::" + e.getMessage();
    e.printStackTrace();
    return outStr;
    Step2: Stored function to access above stored java class.
    CREATE OR REPLACE FUNCTION SF_ENCRYPTUTIL(
    pKey1 VARCHAR2
    ) RETURN VARCHAR2 AS
    LANGUAGE JAVA NAME 'EncryptUtil.encrypt(java.lang.String ) return java.lang.String';
    Step3: Test encryption and descryption
    DECLARE
    outstr VARCHAR2(2000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE('outstr-->' || SF_ENCRYPTUTIL('12345'));
    END;
    Below code example using DBMS_CRYPTO. This works, but we do not want to use this.
    declare
    l_in_val varchar2(2000) := 'Test data 123';
    l_mod number := dbms_crypto.ENCRYPT_AES128
    + dbms_crypto.CHAIN_CBC
    + dbms_crypto.PAD_PKCS5;
    l_enc raw (2000);
    l_enc_key raw (2000);
    l_dec raw (2000);
    begin
    l_enc := dbms_crypto.encrypt
    UTL_I18N.STRING_TO_RAW (l_in_val, 'AL32UTF8'),
    l_mod,
    HEXTORAW('156ae12300ccfbeb48e43aa016febb36'),
    HEXTORAW('001122230405060708090a0b0c0d0e0f')
    dbms_output.put_line ('Encrypted='||l_enc);
    end;
    Edited by: user5092433 on Sep 10, 2009 12:26 AM

    I guess I'd be a bit curious about why you can't use a DBMS_CRYPTO solution that provides identical output. It seems odd to want to have a procedure running inside Oracle and then dictate that it has to be Java and not PL/SQL...
    I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
    The jre version in Oracle is 1.4.2.Which java.security file are you talking about? The JVM that is inside the Oracle database does not and can not use configuration files that are outside the database. I suspect when you talk about files and paths that you're looking at a JVM outside the database, which is not the JVM that your Java stored procedure would be using.
    Looking at the error, my assumption is that some JAR file needs to be loaded into the internal JVM in order for the AES algorithm to be available. But I'm unfortunately not familiar enough with these classes to say what that would be.
    Justin

  • How to import custom java jar/class into oracle to be used in java proc ?

    Hi
    I would like to know how to import custom java jar/class files into oracle to be used in java stored procedure.
    I am developing a oracle pl/sql procedure to call java program. The java program will be created as procedure and will be published.
    But, my question is that I do have a other external jar/class file that need to be imported into this java program.
    example
    raise_sal.java
    import java.util.*;
    import oracle.sql.*;
    <<reference other java programs >>
    import cmpmsgsvc.xxxx.* ;
    import cmpmsgsvc.yyyy.* ;
    import cmpmsgsvc.zzzz.* ;
    how do I import the cmpmsgsvc jar/class file into oracle so that I don't have any
    compilation errros on raise_sal.java program ??
    what are the steps to import/compile and validate to do this?
    thanks for your help in advance.
    Thanks
    rrb.

    Kuassi
    Problem is that, I have 6 jar files that are needed to be included in the main java program. And, there are more than 50+ classes, propertiers in those 6 jar files.
    It might be not good idea to have all those 50+ classes in the production database.
    Is there anyway that I keep all those 6 jar files in unix box (our's is oracle erp installation with oracle being installed on unix box) and just refer them in the main java program. I mean database will be loaded with main java program and it should able to refer other 6 jar files from unix.
    if we create a directory and keep all jar files in there and include that directory in classpath variable, does this works? or what is other method?
    Please let me know.
    Thanks

  • Calling stored java-procedure in Oracle9i Lite from ODBC

    I've got a problem:
    I try to call a stored java-procedure through ODBC. The stored
    java-procedure in Oracle 9i Lite is called successfully from
    server console (MSQL). When I call my stored java-procedure from
    my web-application (ASP) through ODBC connection (ODBC drivers
    are from Oracle 9i Lite set V3.51) the server returns an error
    (Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [POL-
    8000] could not start the Java Virtual Machine),
    however 'select' without java-procedure calls works
    successfully. PATH and CLASSPATH variables are properly set up.
    File jvm.dll is present.
    Can anybody help me?

    Pass String[] as an argument to mainbook():
    create or replace PROCEDURE openpdffile
    AS LANGUAGE JAVA
    NAME 'pdfopenbook.mainbook(java.lang.String[])';Have you posted it on the Database forum?
    Regards,
    Nick

  • Export and Import of Portal Users (UME database only)

    Hi
    What is the most efficient way to export all Portal user that are stored in Portal UME database so that it can be imported to another Portal installation and be used..
    Thanks in Advance
    Ananda

    Hi,
    SAP User Administration is the standard way to export and import users in the portal. Using the export functionality, all the user information will get exported, including the roles and groups assigned:
    [User]
    uid=userid
    last_name=Lastname
    first_name=Tobias
    language=en
    accessibility=0
    role=pcd:portal_content/com.sap.portal.xxx;
    group=Administrators;
    If you only want to export the user data without the roles and groups, you'll have to delete these lines.
    SAP Help: http://help.sap.com/saphelp_nw04/helpdata/en/70/9be23d44d48e5be10000000a114084/frameset.htm
    Export Format: http://help.sap.com/saphelp_nw04/helpdata/en/ae/7cdf3dffadd95ee10000000a114084/frameset.htm
    SDN Article: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02e3e37-5ee3-2910-129d-967aef3fa386
    br,
    Tobias

  • Java static variables in Stored Java

    I'm wondering if someone in Oracle could relate their thinking with regards to static variables in stored java and why were these implemented as they were. The aspect I'm referring to specifically is how these are basically working as PLSQL package variables, i.e. with state maintained for the life of the session.
    Outside the database, in the "normal" Java world, statics will only live as long as the program is running. But in the Oracle DB world, the static continues to live as long as the session. With this in mind, doesn't this difference compromise the idea of just inserting working Java code into the Database? i.e. static variables now have to be initialized every time a method is called, and cannot be assumed to have default values. Does that not seem like a rather large departure from what a non-DB java programmer would be doing?
    Thanks in advance for your thoughts on this.
    Joe Tseng

    It should generally be the case that all calls in a session see the same static variable values. Some actions will terminate the java session (and lose the static variable state) without ending the RDBMS session, such as calling System.exit from java, but normally this can't happen within a single RDBMS call. Perhaps if you give more details on how you are making the call from java to PLSQL one could say more. In particular, if the call happens to be via the JDBC thin driver then the session running in the JDBC connection will be distinct from the calling session.

  • IMPORT  x TO y FROM DATABASE dbtab(ar) ID Key

    Hi Experts,
    I'm upgrading me version of SAP to ECC6, so when I execute a program an error triggered when importing object "ADDONS".
    I got this message :
    An exception occurred that is explained in detail below.  
    The exception, which is assigned to class 'CX_SY_IMPORT_MIS not caught in procedure "ISU_BILLPRINT_INTERVALS_CLOSED"
    "(FUNCTION)", no by a RAISING clause.                                     
    Since the caller of the procedure could not have anticipate exception would occur, the current program is terminated. 
    The reason for the exception is: When attempting to import data, the structure of the complex object h1 _ "ADDONS"_h1 was not compatible with the target object. The error occurred with component no. 0.  
    When I launch the ABAP Debugger, It stops at this part of code :
    * Read basics and addons from database
      import basics to l_basics
             addons to RED_PARAMS
             from database rfdt(kk) id l_runkey.
    I realised a small research on the net to get an idea about The ABAP statement IMPORT  x TO y FROM DATABASE dbtab(ar) ID Key, I found this :
    TABLES INDX.
    DATA: INDXKEY LIKE INDX-SRTFD,F1(4),
    F2 TYPE P,BEGIN OF TAB3 OCCURS 10, CONT(4),
    END OF TAB3.
    INDXKEY = 'INDXKEY'.
    IMPORT F1 F2 TAB3 FROM DATABASE INDX(ST) ID INDXKEY.
    But I didn't understand what's  ST?
    So can any guru tell me what's the meaning of ST, and how can I resolve the above problem.
    I know that my problem consists on a difference between the structure of ADDONS and RED_PARAMS.
    NB: The structure of  RED_PARAMS is as follows :
    R_VKONT               
    R_PARTNER        
    R_PORTION             
    R_ABRVORG  
    R_FIKEY                    
    R_ERGRD            
    R_DRUCKDAT    
    SIMU                      
    INVOICED               
    TOBRELSD            
    GENPARA               
    TEST_PR                
    XSTR_PRINTPAR  
    EXLOG          
    PS: I don't have access to ADDONS (Which I don't know what is it?!!!)    
    Regard
    SMAALI Achraf

    We've encountered a very similar issue in an upgrade scenario. The same error message regarding missing or incorrect ADDONS ...
    Our issue was an inconsistency when passing 'old' parameters / program variants to 'mass activities' programs for transactions such as 'FPSCHEDULER' and/or 'EL16' ...
    We did also open an OSSmsg to raise awareness with SAP.
    However, a simple workaround/test would be to identify the related programs that are affected by the issue. The variants or relevant setting to these 'mass activities' programs are stored in the cluster table (such as 'DBTAB' or in our case 'RFDT') mentioned in the shortdump message.
    Due to upgrade-changes our stored input did not match the new structure for the upgrade environment.
    When you've identified the relevant program and their variants / parameters, simply recreate the variant or create a new one, so the cluster table stores a new record in the cluster table ...
    In our scenario, we were able to surpass the shortdump.
    This might be only one of few methods to solve related issues. In any case, this simple test can prove to be a good addition for your analysis when posting an OSS.

  • CRM 2007 The Java load in database SID/hostname has already been configured.

    I had an CRM 2007 system on windows server 2008R2. I had an issue in CI system and reinstall it. But I got a problem when the java already configured in database. My database is very important so I can remove schema. I chose CRM2007>Oracle>ABAP+JAVA>HA system>Central Instance in the sapinst.
    CJS-30109  The Java load in database GOL/crmdb has already been configured. SOLUTION: Remove the schema and load it with a new load before you run this installation.
    Thanks

    Hello Ashutosh ,
    Thanks for your reply.
    We have gone followed the below sequence:
    SCS Installation
    Database Instance Installation using backup/restore method
    CI installation. -> getting error, when we provide the Java Components DVD.
    Best Regards,
    Anuj

  • How to import a java class in a JSP

    Hi All,
    I have a java class file called myTest.class (i made after compilation of myTest.java). I have a JSP page that uses this java class file.
    These 2 files are in same folder called c:/test
    and iam importing this java class file into my jsp file and that too at the start of this jsp file:
    <%@page import="myTest" %>
    BUt iam getting an error ..............when iam running this JSP page:
    /opt/bea81sp2/user_projects/domains/wliDomain/./Managed2/.wlnotdelete/extract/Managed2_myTest_myTest/jsp_servlet/__test.java:20: '.' expected
    probably occurred due to an error in /test.jsp line 5:
    <%@page import="myTest" %>
    Please advise how to solve this problem
    -sangita

    Don't bother with the import
    when iam not importing this class file into my JSP, then on my JSP, the class file is not found.
    Here is my code: and these 2 class file are in c:/test
    import org.apache.tools.ant.taskdefs.Ant;
    import org.apache.tools.ant.taskdefs.Property;
    import org.apache.tools.ant.types.*;
    import org.apache.tools.ant.*;
    import org.apache.tools.ant.taskdefs.ExecTask;
    import org.apache.tools.ant.types.Commandline;
    import java.io.File;
    * Creates an Ant project to run an Ant build
    * @author myself
    * @version 1.0
    public class RunTest extends Ant {
        String applicationName;
        String buttonClicked;
        String boxName;
        String targetName;
        public void applicationName(String applicationName){
         this.applicationName = applicationName;
        public void boxName(String boxName){
         this.boxName = boxName;
        public void buttonClicked(String buttonClicked){
         this.buttonClicked = buttonClicked;
      public RunTest() {
    public void goTest() {
         if(this.buttonClicked.equalsIgnoreCase("deploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "deploy-scsmail-testnet";
         if(this.buttonClicked.equalsIgnoreCase("undeploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
           this.targetName = "undeploy-scsmail-testnet";
        Project project = new Project();
        project.init();
        System.out.println("printing 1 ....");
        ExecTask exec = new ExecTask();
        exec.setProject(project);
        exec.setExecutable("/opt/bea/weblogic81/server/bin/ant.bat");
         exec.setDir(new java.io.File("/export/home/beamon/bin"));
         Commandline.Argument arg = exec.createArg();
         // arg.setLine("-f scsmail.xml test -listener org.apache.tools.ant.XmlLogger -logfile D:/antProject/src/log.xml");
         arg.setLine("-f build.xml "+ targetName + " -listener org.apache.tools.ant.XmlLogger -logfile /export/home/beamon/bin/log.xml");
         System.out.println("printing 2....");
        //exec.setOutput(new File("D:/antProject/logs/prob.txt"));
        exec.execute();
        System.out.println("printing 3....");
    -----------------------the JSP page is called as test.jsp
    <%@page contentType="text/html" %>
    <%@page import="java.io.*" %>
    <%@page import="java.util.*" %>
    <%@page import="java.net.*" %>
    <%@page import="RunTest" %>
    <HTML>
    <TITLE>TESTING ANT GUI</TITLE>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="3000" >
    <meta http-equiv="Cache-Control" content="no-cache">
    </HEAD>
    <BODY BGCOLOR="silver" TEXT="333333">
    <table border=0>
    <tr align="left"><td align="left"><FONT SIZE="-1"><B>  Test Page <FONT SIZE="-1"><B></td></tr>
    </table>
    <hr></center>
    <form action="./test.jsp" method="POST" name="testForm">
    <table>
    <tr>
    <td>
    <select name="appName" size=1>
    <option value="">Select Application Name
    <option value="scsmail">scsMail
    <option value="clientmanager">ClientManager
    </select>
    </td>
    <td>
    <select name="boxName" size=1>
    <option value="">Select Box Name
    <option value="testnet">TestNet
    <option value="production">Production
    </select>
    </td>
    </table>
    <table>
    <input type="submit" name="deploy" value="deploy">
    <input type="submit" name="undeploy" value="undeploy">
    </table>
    <%
       RunTest rt = new RunTest();
       rt.applicationName(request.getParameter("appName"));
        String deployButton = "";
        deployButton=request.getParameter("deploy");
        String undeployButton = "";
        undeployButton=request.getParameter("undeploy");
        if(!deployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("deployButton"));
        if(!undeployButton.equalsIgnoreCase("")){
            rt.buttonClicked(request.getParameter("undeployButton"));
       rt.boxName(request.getParameter("boxName"));
        rt.goTest();
    %>
    </form>
    </table>
    </BODY>
    </HTML>

  • Beginners question - making sense of form, item, pane & variable (with relation to where data is stored in the SQL database)

    Hi Everyone,
    I am new to writing reports (SQL code) for SAP, however I am aware that inside SAP Business One it is necessary to enable System Information (from the View menu) in order to see which tables (and related table attributes / column names) are related to various aspects of the various SAP 'modules' (e.g.: A/R Invoice).
    Using an A/R Invoice as an example I can see at the row (or line) level that an item with the description of 'Opening Balance Transfer' is contained in the table INV1, within the attribute (or column) called Dscription.
    However not every 'on screen object' shows a table / attribute. For example in the same A/R Invoice if I hover my mouse over the Balance Due field all I see is Form related information.
    My question is 'How do I make sense of the Form, Item, Pane, Variable information?', with relation to where data is stored within the SQL database?
    Links to online tutorials explaining how this feature of SAP Business One will be much appreciated, along with any personal advice regarding working with this information.
    Any (and all) help will be greatly appreciated.
    Kind Regards,
    David

    Hi David,
    1.Here I am explaining use of each field except pane
    a. Form ---> Used in additional authorization creator
    b. Item, column--->Useful in creating Formatted search queries (FMS)
    c. Variable --> Some of the field values based on another values. ie. indirect values.
    d. INV1---Table name
    2. How to get variable?
    As per your second attachment, to get balance due ,you need doc total field from OINV table. For example,
    SELECT T0.[DocNum], T0.[DocTotal] FROM OINV T0 WHERE T0.[DocNum] = 612004797
    Thanks & Regards,
    Nagarajan

  • Unable to import a java class in a jsp file

    Hi,
    I am trying to import a java class in my jsp.
    ------------------jsp---------------
    <jsp:useBean id="form" class="com.company.portlets.searchApps.object.SearchOBJ" scope="request" />
    <jsp:setProperty name="form" property="*" />
    <input type="TEXT" name="projectID" value='<%= form.getProjectID() %>'>
    When I run the above JSP, it says that class 'com.company.portlets.searchApps.object.SearchOBJ' cannot be found.
    Why?
    My project structure looks like this:
    Project
    +Application Sources
    ++com.company.portlets.searchApps.object
    +++SearchOBJ.java
    +Web Content
    ++htdocs
    +++searchappsportlet
    ++++SearchAppsPortletShowPage.jsp
    ++WEB-INF
    +++index.jsp
    +Resources
    ++SearchApps.deploy
    Please advice...thanks!

    The way that JDeveloper organized the files was like this:
    C:\jdev1012\jdev\mywork\WksSearchApps\Project\classes\com\company\portlets\searchAPPS\object\SearchOBJ.class
    I am assuming that JDeveloper puts the file where they are suppose to be...if not, how do I change that?
    thanks,
    hussain

  • How to import a table from another database using DB toolset.

    Hello All
    I would like to import a table from one database to another using DB toolbox.
    I do not want to import all data to LV and then save them to another database. Instead I would prefer to use SQL syntax.
    Does anobody know how to write SQL command to import whole table from one database to another?
    I have found in some SQL manual that INSERT INTO should work, but JET4 returns an error that table (e.g. c:\mydatabase\table1) can not be found.
    Thanks in advance
    Pawel

    if i don't have TEST table on server B whether COPY command will create this table on server B with the same structure ? If you specify CREATE as a clause the table will be created:
    SQL> help copy
    COPY
    COPY copies data from a query to a table in a local or remote
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                APPENDCREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[password]@connect_identifier

Maybe you are looking for