How to use odi variable in java code.

Hi,
I am trying to calculate check sum of a file and need to capture that in a odi variable...
I wrote code like this(selected technology as java bean shell)
<@
import java.io.*;
import java.util.zip.*;
public class checksum {
public static void main(String[] args) throws Exception {
FileInputStream fis = new FileInputStream(new File("c:/dummy.txt"));
CheckedInputStream cis = new CheckedInputStream(fis, new CRC32());
BufferedInputStream in = new BufferedInputStream(cis);
while (in.read() != -1) {
#checksum = cis.getChecksum().getValue();
}@>
But I am not able to get that value...
I tried in another way like this
<@
import java.io.*;
import java.util.zip.*;
public class checksum {
public static void main(String[] args) throws Exception {
     long result;
FileInputStream fis = new FileInputStream(new File("c:/dummy.txt"));
CheckedInputStream cis = new CheckedInputStream(fis, new CRC32());
BufferedInputStream in = new BufferedInputStream(cis);
while (in.read() != -1) {
result= cis.getChecksum().getValue();
@>
In odi variable refreshing mode i selected schema as memory_engine and wrote
select '<@=result@>' from dual;
even this wont work for me :(
Anyone pls help me in this...
Thanks in advance
Pavan

Hi Phani,
Thanks for the reply. I resolved this. The mistake is I wrote java code in a class,in main function. I removed class and main function. Now I am able to capture value into Odi variable...
I modified code as
<@
import java.io.*;
import java.util.zip.*;
     long result;
FileInputStream fis = new FileInputStream(new File("C:/dummy.txt"));
CheckedInputStream cis = new CheckedInputStream(fis, new CRC32());
BufferedInputStream in = new BufferedInputStream(cis);
while (in.read() != -1) {
result=cis.getChecksum().getValue();
@>
finally retrieving result value from dual
select '<@=result@> from dual
Edited by: 908443 on Jan 16, 2012 10:42 PM

Similar Messages

  • How to use host variable in Java?

    How do I use host variable in java? I am getting SQL code of -404 and description of SQL code is The UPDATE or INSERT statement specifies a String that is too long column-name SQLSTATE=22001. Below is my code:
    * i n s e r t M e s s a g e
    * insertMessage: This method will retrive detail message and other fields for
    * selected item from screen1.
    public final Collection insertMessage(String businessId,String messageNumber,String messageType,
    String messageTitle,String printStyle,String statusIndicator,
    String approverId,String lastUpdateId,String longMessage) {
    MessageTransport msi = new MessageTransport();
    PreparedStatement ps = null;
    Connection connection = null;
    MessageTransport msi1 = new MessageTransport();
    PreparedStatement ps1 = null;
    Connection connection1 = null;
    ArrayList list = new ArrayList();
    try {
    if (businessId != null) {
    businessId = businessId.trim();
    if (messageNumber != null) {
    messageNumber = messageNumber.trim();
    if (messageType != null) {
    messageType = messageType.trim();
    if (messageTitle != null) {
    messageTitle = messageTitle.trim();
    if (printStyle != null) {
    printStyle = printStyle.trim();
    if (statusIndicator != null) {
    statusIndicator = statusIndicator.trim();
    if (approverId != null) {
    approverId = approverId.trim();
    if (lastUpdateId != null) {
    lastUpdateId = lastUpdateId.trim();
    if (longMessage != null) {
    longMessage = longMessage.trim();
    int len = longMessage.length();
    if (len > 254) {
    int constant = 254;
    int k = len % constant; //k will hold value that has number of loops including initial insert.
    k = k - 1; //this is for total number of loop.
    int j = len / constant; //this will have remainder if any to insert rest of longmessage.
    System.out.println("Display remainder: " + k);
    System.out.println("Display divisible: " + j);
    System.out.println("Display Length of longMessage: " + len);
    StringBuffer sql = new StringBuffer();
    sql.append("INSERT INTO " + MESSAGE_TBL + " ( MT_BUS_ID,MT_MSG_NBR,MT_MSG_TYPE,MT_MSG_TITLE,MT_PRINT_STYLE,MT_APV_STATUS,MT_APV_ID,MT_APV_DT,MT_APV_TM,MT_LAST_UPDATE_ID,MT_LAST_UPDATE_DT,MT_LAST_UPDATE_TM,MT_MSG_TXT ) VALUES ");
    sql.append("(");
    sql.append("'");
    sql.append(businessId).append("'");
    sql.append(",").append(messageNumber);
    sql.append(",").append("'I'");
    sql.append(",").append("'").append(messageTitle).append("'");
    sql.append(",").append("'").append(printStyle).append("'");
    sql.append(",").append("'P'");
    sql.append(",").append("' '");
    sql.append(",").append("CURRENT DATE");
    sql.append(",").append("CURRENT TIME");
    sql.append(",").append("'").append(lastUpdateId).append("'");
    sql.append(",").append("CURRENT DATE");
    sql.append(",").append("CURRENT TIME");
    sql.append(",").append("'").append(longMessage).append("'");
    sql.append(")");
    System.out.println("Display SQL Statement: " + sql);
    connection = DriverManager.getConnection(DATABASE_URI, USER, PASS);
    ps = connection.prepareStatement(sql.toString());
    ps.executeUpdate();
    System.out.println("Refreshed Record: ");
    catch (SQLException sqle) {
    System.out.println("SQLException: "+ sqle + ". SQLSTATE=" + sqle.getSQLState()+" SQLCODE=" + sqle.getErrorCode());
    finally {
    if (ps != null) {
    try {
    ps.close();
    ps=null;
    catch (Exception e) {}
    if (ps1 != null) {
    try {
    ps1.close();
    ps1=null;
    catch (Exception e) {}
    if (connection != null) {
    try {
    connection.close();
    connection = null;
    catch (Exception e) {}
    if (connection1 != null) {
    try {
    connection1.close();
    connection1 = null;
    catch (Exception e) {}
    return list;
    if my longMessage is smaller like one line then everything works fine, but as soon as my longMessage if greater than 254 it starts giving me -404. How do I work around or Is there any way to use host variable in Java?
    All kind of help is appreciated. Any question then please email me at [email protected].
    Thank you.

    This is what you got to do to insert a larger value.
    //Assuming that message length is less than 254+ 254 characters.
    //If larger then run the update loop that many times.
    String longMessage = "Blah blah ... ";
    String firstPart = "";
    String secondPart = "";
    int messageLength = longMessage.length();
    if (messageLength > 254)
         try
              firstPart = longMessage.subString(0, 253);
              secondPart = longMessage.subString(254, message);
         catch (IndexOutOfBoundsException e)
    //In the first insert  set the first 254 characters
    ps.setString(1, firstPart);
    int result = ps.executeUpdate();
    if (result != 0)
           System.out.println("Insert  sucessful  ");
           if (messageLength > 254)
                //now update with the second part.
                static String UPDATE_SECOND_PART = UPDATE my.table SET LONG_COL = LONG_COL || ? WHERE KEY_COL = ?;
                ps2 = connection.getPreparedStatement(UPDATE_SECOND_PART);
                ps2.setString(1, secondPart);
                ps2.setString(2, businessId);  //assuming that businessId is the primary key.
                int result2 = ps2.executeUpdate();
                if (result2 != 0)
                      System.out.println("Update  sucessful  ");
                else
                     System.out.println("Update failed ");
    else
           System.out.println("Insert failed ");
    }Hope this helps.

  • Using jsp variable in java code

    Hey guys,
    I need some help hope you guys can help me.
    I've declared a variable "error" in a jsp. how do I access this variable in the java code whice resides in the same jsp page.
    I know I can use java variable in jsp code using
    <%= sVariable %>
    where sVariable was declared in the java code. but how do I access a jsp variable in java code??
    Thanks very much in advance

    Thanks for the reply.
    This is what I want to do.
    I've declared a variable "error" using <c:catch var="error">I want to check the value of this variable and suppose if it contains XYZ (error variable will have a long string so I just want to check if it contains a specific value) I want to do step1 and if the variable of error is not XYZ I want to do step 2
    Problem is I dont know how to check if error contains the XYZ in jsp thats why I thought java code would help here.
    Can you guys suggest a better way to solve my problem.
    Thanks again

  • How to use ODI Variables in Jython

    Hi, im doing a dynamic interfaz .. so i make a connection to bd.
    When i try to do it .. i got an error...
    How can i access to the odi variables from odi..
    this is my code ..
    <%
    import java.sql.*;
    import java.io.*;
    BufferedWriter bw = new BufferedWriter(new FileWriter("c:\log.txt"));
    StringBuilder strB = new StringBuilder();
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String ip = "#PROJECT.IP";
    String url = "jdbc:oracle:thin:@"+ip+":1521:orcl";
    Connection con = DriverManager.getConnection(url,"snpw","admin");
    stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
         bw.write(" raise(' ");
         out.print(" raise(' ");
    String str = "SELECT c.var_name,d.project_name FROM snp_package a JOIN snp_step b On (a.i_package = b.i_package) JOIN snp_var c ON (b.i_var = c.i_var) JOIN snp_project d ON (c.i_project = d.i_project) WHERE UPPER(pack_name) = upper('DebugJava')";
    ResultSet rs = stmt.executeQuery(str);
    while(rs.next()){
    String var_name = rs.getString("var_name");
    String project_name = rs.getString("project_name");
    out.print(var_name+" #" project_name"."+var_name+"\n ");
    bw.write("#STUFF."+var_name);
    bw.write("')");
    out.print("')");
    rs.close();
    bw.close();
    stmt.close();
    con.close();
    %>
    this is the error ...:
    The application script threw an exception: java.sql.SQLException: Excepción de E/S: The Network Adapter could not establish the connection BSF info: DebugVariables at line: 0 column: columnNo
    Iknow tha is taking "#PROJECT.IP" like my ip .. but there is a variable that is on my package with a assiged value 127.0.0.1
    but jython is not taking it !!
    I make a raise to the variable .. and yes the variable take de value "127.0.0.1" but not in my jython code
    note: My variable is linked with OK to the jython procedure on my package
    Can i acces to the variable? from jython how?.
    Thanks in advanced!!
    Edited by: user11334562 on 28-abr-2010 15:12

    1. This is not a jython code, this is beanshell code. Anything you put between <% and %> is beanshell code which is sort of a parser code for ODI. Check out
    http://www.beanshell.org/
    2. Your expression for "url" variable is wrong. If you want to concatenate strings, you have to use + sign i.e it should be:
    String url = "jdbc:oracle:thin:@"+ip+":1521:orcl";
    Other statments need to be adjusted similar way.
    3. Why would you want to go through so many trouble? Just extract the SQL into a file using ODI SQLUnload tool. The sql should be:
    SELECT c.var_name||' #'||d.project_name||'.'||c.var_name FROM snp_package a JOIN snp_step b On (a.i_package = b.i_package) JOIN snp_var c ON (b.i_var = c.i_var) JOIN snp_project d ON (c.i_project = d.i_project) WHERE UPPER(pack_name) = upper('DebugJava')
    4. How does printing a set of variables from a particular package help you to write dynamic interface?

  • How to Use Exec function in Java Code

    How to Use Exec method
    I want to Execute command
    net Start "some service"
    using exec method of runtime class
    or i use some other way if suggest

    Assuming you have read http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String) already, I can only suggest to be more specific in what your problems are. If you are after just some example code, then download ftp://ftp.ebi.ac.uk/pub/software/textmining/monq/monq.tar.gz and have a look at the source code of monq.stuff.Exec. It does all those things which are necessary to keep track of a Process after it was created with exec.
    Harald.
    BioMed Information Extraction: http://www.ebi.ac.uk/Rebholz-srv/whatizit

  • How to use Oracle objects in java code

    Hi all!
    I'm reading an xls and i need to fill me oracle objects with java code:
    OBJECT_NAME OBJECT_TYPE
    LETTURA_OBJ TYPE
    LETTURA_OBJ TYPE BODY
    In the past weeks i've been using both java code into oracle and oracle objects, but new i need to write those objects with data i read with java, anybody can help me?
    I know that the easiest work around would be to put the data i read from the excel file into a table and then fill the oracle objects, but now i want to learn how to write directly those objects with a command like the following one:
    a sample of the code i'm tryng to write:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import jxl.*;
    public cass ....
    #sql{  variabili_globali.var_ER_F3.Tipo_Lettura := 5}
    thanks,
    Massimo
    Edited by: LinoPisto on 16-mag-2011 16.38

    mmmh i'm not understanding so much....
    well... as i told before i'm working in oracle database environment and i'm developing a java procedure.
    now, i have this object
    CREATE OR REPLACE
    TYPE REPORT.FATTURA_OBJ AS OBJECT (
    POD VARCHAR2(1000),
    ID_FATTURA NUMBER,
    ID_FILE NUMBER,
    COERENZA_EA_F VARCHAR2(1000),
    COERENZA_ER_F VARCHAR2(1000),
    COERENZA_EA_M VARCHAR2(1000),
    COERENZA_EF_M VARCHAR2(1000),
    ANOMALIA VARCHAR2(1000),
    MOTIVO_INVALIDAZIONE VARCHAR2(1000),
    MATRICOLA_CONTATORE VARCHAR2(1000),
    POTENZA_DISPONIBILE VARCHAR2(1000),
    MEMBER PROCEDURE pulisci
    /and i need to work with it inside this procedure:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED REPORT."Manage_Excel_ASMBS" AS
    import java.io.*;
    import java.io.IOException;
    import java.io.StringWriter;
    public class Manage_Excel_ASMBS
    public static void read_Excel(String inputFile,int var_Id_Caricamento, int var_Id_Distributore, String var_Distributore) throws SQLException, IOException
              **here i need to put what i'm reading inside the excel file into oracle objects**
    /can you please give me a sample ?
    thanks

  • How to use enviroment variables in JSP code?

    I�m developing a web server with JSP�s, and I need to move the application to others computers. I need to access to a directory, but I don�t know it because the user can install the Application in the directory he wants. So I need to access to that directory in the JSP code.
    The directory is "C:\Program Files\....\tomcat\webapps\ROOT\upload". I have the CATALINA_HOME enviroment variable defiened as "C:\Program Files\....\tomcat\", so I need to use something like "CATALINAHOME\\webapps\upload\", but I don�t know how to mekr the JSP code to understand the enviroment variable CATALINA_HOME.
    I�ve tried with %CATALINA_HOME%, but the Tomcat server doesn�t recognize it. How can I access to that directory?
    Thanks (Sorry about my english)

    My JSP�s are in: %CATALINA_HOME%\webapps\ROOT\
    I wan�t to access to %CATALINA_HOME%\webapps\ROOT\upload\
    My JSP code:
    <% ...
    String DPATH = "C:\\Program Files\\JBuilder7\\jakarta-tomcat-4.0.3\\webapps\\ROOT\\upload\\";
    File newfile = null;
    newfile = new File(DPATH+filename);
    %>
    I want the JSP to locate the directory \webapps\ROOT\upload\ without knowing the complete route "c:\Program Files\...", because I have the enviroment variable CATALINA_HOME with the value "C:\Program Files\JBuilder7\jakarta-tomcat-4.0.3\". SO the user of the aplication only has to set the CATALINA_HOME variable and the aplication should access the upload directory throught the CATALINA_HOME variable.
    I can�t explain it better. Sorry.

  • How to use the XULRunner with JAVA Code

    Hi, all
    I have a big problem about XULRunner. I can not find a nice solution on the internet. So I have to request you to give me some ideas.
    We know the XULRunner is nice solution when we want to embed a browser into desktop program which is thunderbird, firefox and so on.
    My questions are the following:
    1. Can I execute a Java function accross the JAVASCript? We can execute javascript code in the JAVA, but I'm not sure I can do opposite it.
    2. What is javaxpcom?
    If you did program like this, please give me some ideas, thanks very much.

    I marked this as "off-topic" since it's not a Firefox support question.
    Another place for discussion related to XULRunner, besides the Mozilla community links at https://developer.mozilla.org/en-US/docs/Mozilla/Projects/XULRunner might be one of the [http://forums.mozillazine.org/ MozillaZine forums], such as the Mozilla Development forum:
    *http://forums.mozillazine.org/viewforum.php?f=27
    EDIT: I'm leaving this question open since it's about another Mozilla product and I'm escalating it to the Helpdesk in case anyone over there has a suggestion.

  • How to use ButeBuffer properly in java code

    hi,
    i am trying to use a bytebuffer and i don't kniow which methods allow reading its content...i need to retrieve this content in order to convert it ( byte by byte) into RGB values...so can anyone help me to do it please?

    The API documentation tells you exactly which methods are available in class java.nio.ByteBuffer.

  • How to use sql query in java ?

    i don't know how to use sql query in java code.
    who can give me some advice?
    thanks

    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How  can use a variable in the folowing code?

    How  can use a variable 'W_ROWNUM2' in the folowing code?
    MOVE '1' TO CNT.
    LOOP AT L_T_PM2.
                  CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
                   CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
        perform  DYNPRO_FIELD       using FLD2
                                     L_T_PM2-vari12_con.
                   CNT = CNT + 1.
                   CONDENSE CNT.                                                              
    ENDLOOP.
    I need to increment the value of W_ROWNUM2.
    Please ,it is urgent!!

    Hello
    CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
    Try using spaces between parts of the resulting string.
    CONCATENATE 'F110V-VARI'  W_ROWNUM2  '(01)'   INTO FLD2
    Regards
    Greg Kern.

  • How to use protected method in jsp code

    Could anyone tell me how to use protected method in jsp code ...
    I declare a Calendar class , and I want to use the isTimeSet method ,
    But if I write the code as follows ..
    ========================================================
    <%
    Calendar create_date = Calendar.getInstance();
    if (create_date.isTimeSet) System.out.println("true");
    %>
    ============================================================
    when I run this jsp , it appears the error wirtten "isTimeSet has protected access in java.util.Calendar"

    The only way to access a protected variable is to subclass.
    MyCalendar extends Calendar
    but I doubt you need to do this. If you only want to tell if a Calendar object has a time associated with it, try using
    cal.isSet( Calendar.HOUR );

  • How to refresh ODI variables from file

    Hi,
    I followed the fillowing links to implement the dynamic file parameter passing in to the resource name of a datastore.
    part-1. http://odiexperts.com/how-to-refresh-odi-variables-from-file-%E2%80%93-part-1-%E2%80%93-just-one-value
    part-2. http://odiexperts.com/how-to-refresh-odi-variables-from-file-%e2%80%93-part-2-%e2%80%93-getting-all-lines-once-at-time
    For me first part is working fine where as in second part i made canvas looks like
    Vlinevariable(refreshing variable)------------------dyanamicfile(refereshing variable)--------------------- interface.
    Interface looks like Flatfile to db ,km's are lkm file------sql and ikm is sql incremental update
    Vlinevariable is working fine where i am getting numbers in sequence manner to assign in to code of dynamicfile variable and in dynamicfile is not taking that value in to that code and causing session failed.
    The code which i put in a refreshing code of dynamicfile is followed below
    select     samplefile1_csv     C1_SAMPLEFILE1_CSV
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=code_generationSNP$CRLOAD_FILE=C:\file/my_test_file.txtSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=1SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=samplefile1_csvSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRACTION_ON_ERROR=0SNP$CR$$SNPS_END_KEY*/
    For the firstrow the number has to get from vlinevariable where in my case not working .
    In session while loading the interface (load data) i am getting error like
    message-------------- ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection file_tgt.
    Caused By: java.sql.SQLException: File not found: C:\file/
         at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:160)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
         at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeQuery(FilePreparedStatement.java:131)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java:602)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeQuery(SnpSessTaskSql.java:3078)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java:571)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2815)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)
    source code is select     a     C1_A,
         b     C2_B
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=sample1SNP$CRLOAD_FILE=C:\file/#PROJECT1.FILENAMESNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=0x002cSNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=1SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=aSNP$CRTYPE_NAME=NUMERICSNP$CRORDER=1SNP$CRLENGTH=50SNP$CRPRECISION=12SNP$CRACTION_ON_ERROR=0SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=bSNP$CRTYPE_NAME=NUMERICSNP$CRORDER=2SNP$CRLENGTH=50SNP$CRPRECISION=12SNP$CRACTION_ON_ERROR=0SNP$CR$$SNPS_END_KEY*/
    target code insert into STAGING.C$_0SAMPLE1
         C1_A,
         C2_B
    values
         :C1_A,
         :C2_B
    KIndly help me and thanks in advance.

    ODI is complaning it cannot locate the file. Try replacing the '/' character with a '\' after file in the designated filepath.

  • How to use the variables used in the message mapping

    Hi ,
    In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .
    I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .
    Please guide me how to use the variables declared in the JAVA section in the message mapping .
    Thanks
    Anita Yadav

    Anita,
    I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.
    If you declare a variable in the Declaration Section ,
    int i;
    then in any udf you can use if directly. No need to re declare  the variable in the UDF. If you do this, then it becomes a local variable.
    Regards,
    Bhavesh

  • How to use Value Variable in Report Painter Column defined as Formula

    Hi Gurus,
    In report painter, how can I add one field (exchange rate) in selection screen, so that user can provide the exchange rate to be used, then execute the report, the exchange rate will used to multiple local currency amount.
    The reason for this is we want use provided exchange rate to convert the amount from once currency to the other currency.
    Alternatively I am studying the functionality of "Value Variable" and found that I can perform the task from this. I have created the value variable but when I am using the variable in Report Painter columns as "&ZVALVAR", system is giving me error. I read the help and it states that use the variable with "&" and do it as it is mentioned.
    Can anybody suggest what I need to do to make it workable.
    Thanks

    I did try using the presentation variable, but that does not work too. I am setting session variable in the dashboard prompt (select 'request variable'). When I use presentation variable, it hard codes the value of the variable name.
    sql is
    select date from work_order where facility = @{p_facility}
    the physical log sql is
    select date from work_order where facility = 'p_facility'

Maybe you are looking for

  • Dunning Related Issue

    Dear All,   I have configured Dunning for my company and for the first Dunning Level 1 the dunning is running sucessfully, no issues..   But when Iam running for the Dunning Level 2 I am unble to get a print out the log that has been displayed is Dun

  • Displaying images from database

    Hi, I am creating a real estate site, and I need a thumbnail and full size image to display. I'd like to store the images in respective folders under the Images folder on the server, and store the file name in the database. I can't get the images to

  • Report  all  z  tables  with  all  z  program containing these z tables

    Hi  Everyone, I  want  to  write a report  to  extract  all   z table   with  all   z  program  contained in these z tables  ex: The z table zxxxx  exist in program zxx1 , zxx2 and zxx3. Table                                    Program zxxxxx        

  • IMac - why do I have a "?" mark on the dock

    I have a "?" on my dock.  When the curser is over it I can see it says HP Utilities.  Is there a problem with this, or should I just dispose of it.

  • Can condition exclusion be sales area specific

    Hi Experts, I need to find out if i can make a conditio exclusion sales area specific. My requirement is that i have 5 different sales area using the same pricing procedures. For 4 of them, i need to use an exclusive exclusion between 2 codnition typ