How read a PARAMLIST param??????

Hi.
I have a big problem with a applications forms (11g).
I´d like to read the content of a PARAMLIST object, but i don´t know how is it. I find in the Oracle Document´s and nothing.
I don´t know the name of the values and the content. HOw it is???.
Thanks and sorry form my Engliish.

Hi adama,
Perhaps you will know all the posibles parameters your application use. In that case
look at the next code, I think it will help you.
1.- The example use a PLL libary with a procedure named CALL_REPORT. This is the code:
PROCEDURE call_report (xparamlist IN OUT PARAMLIST) IS
BEGIN     
-- I know all the posibles parameters my system can use and i have then in a Memory Table --
pk_param.wparam1(1) := 'SISTEMAG';
pk_param.wparam1(2) := 'NIVEL0';
pk_param.wparam1(3) := 'NIVEL1G';
pk_param.wparam1(4) := 'NIVEL2G';
FOR i IN 1..4 LOOP
-- FRM-47013 WHEN PARAMETER EXIST --
pk_param.wi := i;
add_parameter(xparamlist, pk_param.wparam1(i), TEXT_PARAMETER, 'XX');
END LOOP;
END;     
In the pll library there is a PACKAGE. This the code:
PACKAGE PK_PARAM IS
TYPE wtt IS TABLE OF VARCHAR2(50) INDEX BY BINARY_INTEGER;
wparam1 wtt;
wi NUMBER;
END;
2.- A Form with a when-button-pressed trigger. This the trigger code:
DECLARE
wlista_parametros PARAMLIST;
BEGIN     
wlista_parametros := Get_Parameter_List('tmpdata');
IF NOT Id_Null(wlista_parametros) THEN
Destroy_Parameter_List (wlista_parametros);
END IF;
wlista_parametros := Create_Parameter_List('tmpdata');
add_parameter(wlista_parametros, 'SISTEMAG', TEXT_PARAMETER, 'XX');
add_parameter(wlista_parametros, 'NIVEL0', TEXT_PARAMETER, 'XX');
add_parameter(wlista_parametros, 'NIVEL1G', TEXT_PARAMETER, 'XX');
add_parameter(wlista_parametros, 'NIVEL2G', TEXT_PARAMETER, 'XX');
call_report(wlista_parametros);
END;     
In the Form there is a on-error trigger at form level. This is the code:
IF error_type = 'FRM' AND error_code = 47013 THEN
-- Do something at this point --
MESSAGE('Param EXISTS: ' || pk_param.wparam1(pk_param.wi));
END IF;

Similar Messages

  • How to use application params in .EAR files

    When we build an ear file , Weblogic-application.xml provides application-param
    tag?
    are they similar to env-entry in ejb-jar.xml.
    Can I use application-param tag to define a configurable params
    say myName and value as "Harshad"
    How do i read it in the application say a simple java class that is included in
    a jar inside the ear file.

    application-param tag in weblogic-application.xml may be used to define parameters:
    webapp.encoding.default
    webapp.encoding.usevmdefault
    webapp.getrealpath.accept_context_path
    http://e-docs.bea.com/wls/docs81/programming/app_xml.html#1034632
    "Harshad Nanal" <[email protected]> wrote:
    >
    When we build an ear file , Weblogic-application.xml provides application-param
    tag?
    are they similar to env-entry in ejb-jar.xml.
    Can I use application-param tag to define a configurable params
    say myName and value as "Harshad"
    How do i read it in the application say a simple java class that is included
    in
    a jar inside the ear file.

  • How to register OUT param to  RECORD type for STORED PROCEDURE???

    hi
    i have a SP like this
    CREATE OR REPLACE PACKAGE P1 AS
    TYPE g_con_ref_cursor is REF CURSOR ;
    TYPE g_con_error IS RECORD
      error_code NUMBER,
      error_desc varchar2(2000)
    PROCEDURE PROC_CURSOR
    (i_str_userid  IN VARCHAR2,
      o_cur_ref_cur OUT g_con_ref_cursor,
      o_rec_error   OUT g_con_error,
      o_num_status  OUT NUMBER);
    END;and now i am trying to call this SP using my java program
    i am able to register the out put params for 2nd and 4 th variable
    my doubt is how i can register the output param for 3rd (g_con_error) which is of record type
    and how i can get result from this ????
    my java program is like this
    Connection connection = DatabaseHelper.prepareConnection();
    CallableStatement proc = connection.prepareCall("{ call P1.PROC_CURSOR(?, ?, ?, ?) }");
    proc.setString(1,"jn26557");
    proc.registerOutParameter(2,oracle.jdbc.driver.OracleTypes.CURSOR);
    proc.registerOutParameter(3,???,????); //HOW TO SET  THIS ?????
    proc.registerOutParameter(4,oracle.jdbc.driver.OracleTypes.NUMERIC);
    proc.execute();plz help me in this
    i have no idea how to do it
    any help would be appreciated
    Thanks in advance
    Jaya Prakash Nalajala

    You might give a try using:
    proc.registerOutParameter(3, java.sql.Types.REF, "RECORD");

  • How tp pass a param?

    Hi
    I have a jsf site where i set a value in a Bean.
    in the next page a jsp i can read this param with
    h:outputText value="#{ModelBean.param}"
    I have in this jsp some java functions
    If i call this function
    <% testfunction("#{ModelBean.param}")>
    the function gets the String "#{ModelBean.param" and not the passed param.
    How can i solve this problem?
    Thank for your help
    And sorry about my bad english

    Go to the folllowing thread. This might help u.
    I m also facing the same problem.
    http://forum.java.sun.com/thread.jspa?threadID=650526&tstart=15

  • How to use INDEXFILE param in Import

    ok, this is my first time trying to use this option. Oracle9i. Here's what I am doing.
    I have in my Import .bat file:
    imp user1/user1@db2 FILE=D:\exp1230.dmp LOG=D:\IMP.log FROMUSER=USER1 TOUSER=USER1 BUFFER=100000 IGNORE=Y INDEXFILE=D:\indexfile.sql
    I run this and it creates the indexfile.sql with all the create table and create index statements. I modify this file and remove all the REM's. The tablespaces I dumped are different than what I want in the new db so I change the tablespace of the indexes to INDX and the tables to DATA. I run the script and all seems to work just fine. Now I need to go back and run the Import again to get the data in..right? I think this is where I'm missing something. Well, I run the Import again and get lots of ORA-02291 Integrity constraint violated- parent key not found errors. Which I don't understand because I can see that all the keys were created. Then I think I should have used the INDEXES=N param. I start over and remove the INDEXFILE param and add the INDEXES=N param but end up getting tons of ORA-00001 unique constraint violations.
    I'd like to use this option for two reasons. 1- to speed up the Import, and 2- to move the indexes to their own INDX tablespace. Currently they are on the same DATA tablespace as the tables.
    Any suggestions would be greatly appreciated!

    Its not clear to me either what happens to the constraints when you run your import with INDEXES=N. Its not mentioned in the documentation either. If the import creates them, then its going to create system names for them. Its clear that using the indexfile parameter causes the indexes and constraints to be written to a file.
    I suppose really you are answering that question. If you run your import with indexes=N on an empty database (or scheme) and it creates the constraints then it will also create the indexes for them.
    If that is so, then the only thing you can do is import with an indexfile to get your indexes and constraints,next run the import with INDEXES=N, drop the constraints and run your (edited) indexfile.
    Incidentally, the create table statements in the indexfile are there as comments. Its not really the right idea to uncomment and use them.
    The trouble with import is that if you attempt too much, you quickly get a deluge of import errors where, very quickly, you cant see the wood for the trees and you might miss an important data error. You might well be best advised (as already mentioned elsewhere on this thread) to concentrate on migrating your data in the right shape to the target machine and then carry out your fine tuning (table moves, constraint drop/recreate, index rebuild) using a standalone sql script. You should be able to use the file provided by your indexfile parameter as a start for this.
    so, do your export & import - check for errors, make sure you can explain anything that happened during the import, and then take it from there..

  • How can i use param in my select query ( see code)

    Hi ,
    I need to use the param instead of hardcoding the value in the select query , when i did that it is working .
    I think the limit of args is only till the end of main and my select query is in a method called Load() .
    How can i use the param in my select query .
    public static void main(String[] args){
    name = args[0];
    class= args[1];
    new Load();
    }//end of main
    public Load()
              try {
                   Class.forName(JDBC_DRIVER);
                   connection = DriverManager.getConnection(DATABASE_URL,"username","pw");
                   statement = connection.createStatement();
                   //First Query : pin and ticket number
                   ResultSet resultSet = statement.executeQuery("SELECT pin , ticketnumber from airport ,year where "+                                                                      "year.year_name= Here i need to use the param (instead of hardcoding) and year.class_year= Here too i need to use param");
    }// end of method Load()Edited by: 1sai on Sep 24, 2008 7:34 AM
    Edited by: 1sai on Sep 24, 2008 7:35 AM

    Might I suggest you change the structure of your program to the following:
    public class Load {
      private Connection conn;
      private PreparedStatement statement;
      public Load(String sql) {
        init(sql);
      protected void init(String sql) throws Exception {
        Class.forName(JDBC_DRIVER);
        conn = DriverManager.getConnection(DATABASE_URL, "username", "pw");
        statement = conn.prepareStatement(sql);
      public ResultSet execute(String p1, String p2) throws Exception {
        statement.setString(1, p1);
        statement.setString(2, p2);
        return statement.executeQuery();
      public void close() throws Exception {
        if (statement != null)
          statement.close();
        statement = null;
        if (conn != null)
          conn.close();
        conn = null;
      public static void main(String[] args) throws Exception {
        String sql = args[0];
        String param1 = args[1];
        String param2 = args[2];
        Load load = new Load(sql);
        ResultSet rs = load.execute(param1, param2);
        while (rs.next())
          System.out.println(rs.get(0));
        rs.close();
        load.close();
    }This allows you to use the same "Load" object for multiple queries with different parameters.
    I do not recommend you actually use the code above in any sort of production application. You should really take a look at Spring Framework along with an ORM tool like Hibernate or Ibatis to simplify your DAO layer.
    Hope this helps,
    David

  • (SJAS9) Reading a context param in a web service

    Platform - SJAS9, NB5.5
    I am trying to add a web service to a small web project and I need database access for it.
    My web.xml defines 2 different resource-refs for my databases, jdbc/development and jdbc/production. There is also a global context-param named database with values of development or production that defines which database the web app should be using.
    I have two database pools set up under SJAS9 for these resource names, and the servlets can access these just fine using :
        protected Connection getConnection() {
            Connection conn = null;
            try {
                String datasourceName = "jdbc/" + getServletContext().getInitParameter("database");
                Context initCtx = new InitialContext();
                Context envCtx = (Context)initCtx.lookup("java:comp/env");
                DataSource ds = (DataSource)envCtx.lookup(datasourceName);
                log.debug("retrieving database connection for " + datasourceName);
                conn = ds.getConnection();
                log.debug("done");
                conn.setAutoCommit(false);
                return conn;
            catch (SQLException ex) {
                log.error("error getting a connection", ex);
                return null;
            catch (NamingException ex) {
                log.error("error finding the datasource", ex);
                return null;
        }I have just added a web service to the project, and I can't find a way to get the context param. When I created the web service, Netbeans added some annotation around it, and it is not extended any class or implementing any interface (that I can see).
    For the web service, there is no appropriate method equivalent for the call
                String datasourceName = "jdbc/" + getServletContext().getInitParameter("database");so how do I retrieve the context param database so I can know which resource pool to obtain the connection from inside the web service?
    Thanks
    Chris

    Here's how to invoke getServletContext() from a web service:
    First you'll need to add "ServiceLifecycle" to the list of implmentations of your class:
    public class MyService implements WebServices.MyServiceSoap, Remote, ServiceLifecycle {}Next you'll need to add the following:
    private ServletContext servletContext;
    public void destroy(){}  
    public void init(Object context) throws javax.xml.rpc.ServiceException {
       ServletEndpointContext soapContext = (ServletEndpointContext) context;
       servletContext = soapContext.getServletContext();
    Hope this helps!
    Peter

  • How read a file properties

    Hello,
    I need to read a file properties at start up the application to load some costants. How can I do this? Where put the code to read file?
    Thanks everybody!

    Under the Studio Components guide for BPM 10g you'll find a Properties File component. The direct link to it is here: http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/standard_components/Fuego/Io/PropertiesFile/PropertiesFile_component.html
    Is that what you're looking for?
    Edited by: user741070 on Oct 17, 2008 2:25 AM

  • How read data from *.LB File in LabVIEW?

    Hi dear specialist,
    How I can read data from  *.LB File in LabVIEW?
    Thanks` Hovo

    Thanks Ben, but when I open it as datalog file` comes following error:
    Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi
    Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi
    Possible reason(s):
    LabVIEW:  File datalog type conflict.
    C:\Documents and Settings\Home\Desktop\a.lb
    Here is an example of lb file (a.lb), and here is a VI for read datalog file(Simple Temp Datalog Reader.vi)
    What means this error?
    How I can read a byte at a time?
    Attachments:
    testForLB.zip ‏101 KB

  • How read and write file

    Hi
    please help me
    How to read and write data from file in j2me

    hello, u are looking to write some persistant data to a file on the mobile phone? Its the next step for me aswell. You can use the recordset function.
    I'm looking at this site: http://www-128.ibm.com/developerworks/library/wi-rms/
    It seems every time you use the function you must use try catch blocks. I hope this is what you are looking for.

  • How read a particular word in a file using java

    Hi.. friends
    I have one problem with reading contents of a file.
    can u give me the source code
    how to read a data from file
    example.
    ss.txt this file contains following data..
    Another Important thing to remember is that the
    instance variables are created and initialzied.
    now the thing is
    i wanted to find words like.. remember, instance
    from ss.txt
    please help me.
    Thnx..

    Read a data from file:
    public void getFileContents() throws Exception
            BufferedReader rdr =
                    new BufferedReader(
                    new InputStreamReader(
                    new FileInputStream(xmlFileName)));
            System.out.println("Reading from file....:" + xmlFileName);
            StringBuffer contents = new StringBuffer();
            String line = null;
            while((line = rdr.readLine())!= null)
                contents.append(line);
        }

  • How read just a part of a binary file?

    I want to read only a part of a big binary file.
    I have made a piece of labview code that works well, but every time I try to read only a part of the file, I have an error.
    I try to search where I have make a mistake in the code, but dont find.
    Just for information : at the end of the code, I just display 1 data of 5.
    Thanks in advance.
    Attachments:
    LECTURE-ZOOM.vi ‏66 KB

    Johnsold.
    Thank you for your answer.
    I have tested you vi LECTURE-ZOOM.2.vi, and I think there is some problems with my application.
    First, let me transduce the vi into words : if columns index is more than the max columns value, then you stop, and the same think with the rows index.
    With the sift register you make a memory allocation for the array that changes every loop.
    By doing this way, I have two problem.
    When I read a big file, the memory allocation takes a lot of memory, because the array allocation in memory changes every loop.
    Besides, when I run the vi, the columns and rows are completly wrong, because, the command "chanel number is not respected : if I put 7 chanels, I have 5 chanels on the array.
    Then, When I have it, I compare the "sortie" array versus "entrée" array, and I seems that AFTER decimation (1 point taken on 5), I have more points at the end than at the begining.
    I give you a sample of a data file (compressed in zip...) to test your vi.
    It's a 6 chanels data file, puted in a array.
    When I try to run the vi you modify for me, I seems that it doexn't work because the result was totaly wrong... :-(
    I think that I make a mistake/error in the vi understanding, because I try to change some parts of your vi, to adapt it to my application, but it doesn't work.
    What do you think about my way of read the datas?
    How can I change the vi to obtain the same array than in mine.
    To see what I obtain, just lunch the vi in my next post with the data file in this post.
    Attachments:
    buffer01.zip ‏1201 KB

  • How read from CD?

    Hi,
    I m new to swing and hope somebody can help me. I want to read from CD drive when click on a button. How can i do this ?
    thanks in advance

    well, the code sample i sent you, works fine. When i click on a button, this little code runs. The dialog box opens, showing directories somewhere in my C drive. The rest of the code is not relevant to what i need here, because its just a sample piece of code. (when users selects a file ,it adds name of the file to a JTextArea).
    But what i need is, to show the contents of CD ROM drive when this dialog box is opened! I do not want user to select CD ROM drive from this dialog box. When dialog box opens, the contents of CDROM should be in there. I googled but could not find a way to implement what i need.
    Hope you can guide me.

  • HOW READ A FLATFILE INSIDE A BPM

    Hi All,
    I have this scenario:
    a Sender JDBC channel starts the flow and activates the BPM.
    Then, I need to implement a Loop that reads single FlatFile from a directory until the directory is empty.
    In this Loop the file, once it has been read, is sent via RFC to another system.
    The questions are:
    How can I read a file (FTP) inside the BPM?
    Can I read a single file at time (one for loop)?
    Thanks a lot
    Daniele

    This is not possible with standard PI features.
    As work around  you could create an ABAP or Java proxy with reads the files on request.

  • How read information from other clients (other systems) of sap

    Hi
    I have a requiremt to read the roles assigned to a user id in production system to the developemet system.
    So how i can get this production system information from development.
    Could please  please let me know how to call the remote function calls.,  How to go about this.
    guys could you please help me out in this.
    regards,
    Steve.

    Hi
    -A) Trx SM59:
    Choose R/3 connection and search the production system connection.
    If there isn'r basis t, u or your basis should create it.
    -B) Create a program using a RFC function module to pick up the user roles:
    CALL FUNCTION <FUNCTION> DESTINATION <DEST>.
    Where <DEST> is the name of the production system connection defined in SM59.
    The function <FUNCTION> has to be a RFC (Remote Function Call) like a BAPI.
    MAx

Maybe you are looking for

  • Material master error in sales order??/

    Hi SAP gurus While creating sales order after copying the standard material from IDES its giving a error message ""material not determined for sales organization 1000, dist ch 10,language DE"" PLz provide the solution for the same

  • Partial Payment- need clarification on 2 scenarios

    Hello SAP Gurus', I need some help.  If I check the Partial Payment in the Control Parameters node in Bank transactions, what does it mean?  I thought it meant that if a payment came in and referenced that invoice, it would clear that invoice leaving

  • Parsing Error

    I am using this program to parse a XML file and that's the error I am getting.... Code: import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.do

  • Find Sum of grouped events by date

    I'm using Report Builder 10.50.2500.0 I've been trying to do this for awhile and have run out of ideas to try.  I think it's a simple solution but I can't figure it out. I have a database that is used for events. A booking can have several different

  • How to I get my emails to sync from phone to computer

    How do I get my iphone and computer to sync emails?  If I erase an email on the phone it is still on the computer.