How to print values of all my arguments automatically

within a procedure, I am thinking of printing the values of all arguments for debugging.
is there a way to do this in general,
without having to print each one explicitly.
many of my procedures can have dozens of arguments.
all my arguments are simple, varchar2, number, date.
but if there are ways to print compound arguments such as record,
collection,cursor, etc. that would be a great trick too.
create procedure p(p1 in varchar2, p2 in varchar2) is
begin
dbms_output.put_line('p1=' || p1);
dbms_output.put_line('p2=' || p2);
--logic of this procedure here
end;
dbms_describe can give me a list of argument names, data types and modes (IN, OUT or IN OUT).
Thanks for any pointers!

One approach is to have an array of VARCHAR2's and then at the start of each procedure write your parameters into the array and call a procedure. The procedure checks if debugging is switched on and if so prints out the parameters. Switching debug on and off is probably best done with a user context.
e.g.
Create or replace package debug_pkg is
  param_tab is table of varchar2(4000) index by binary_integer;
  params param_tab;
  procedure set_debug(p_debug BOOLEAN);
  function is_debug_on return BOOLEAN;
  procedure print_params;
elsewhere
create or replace procedure process_overdue (p_cust_id IN NUMBER, p_start_date IN DATE, p_invoice_no IN VARCHAR2) IS
BEGIN
  debug_pkg.params(1) := 'PROCEDURE process_overdue';
  debug_pkg.params(2) := to_char(p_cust_id);
  debug_pkg.params(3) := to_char(p_start_date);
  debug_pkg.params(4) := p_invoice_no;
  debug_pkg.print_params;
...

Similar Messages

  • How to save values form all row in dynamic table into mysql database?

    hello guys..
    i got some problem on developing expert system using adobe dreamweaver and mysql.
    i've create a dynamic table and have some value from different row. i want to save values from all row to mysql database.. unfortunately.. i'm failed to do that.. for now, i just can save value from first row.
    kindly you can help me to solve this problem.. or maybe there is any tutorial i can follow..
    thank you in advance.
    this is my script for dynamic table
    <table border="1" cellpadding="1" cellspacing="1">
      <tr>
        <td>namaSoalan</td>
        <td>jaw</td>
      </tr>
      <?php do { ?>
        <tr>
          <td><?php echo $row_Recordset1['namaSoalan']; ?></td>
          <td><label for="9"></label>
            <select name="9" id="9">
              <option value="value" <?php if (!(strcmp("value", $row_Recordset1['namaSoalan']))) {echo "selected=\"selected\"";} ?>>sila</option>
              <option value="" <?php if (!(strcmp("", $row_Recordset1['namaSoalan']))) {echo "selected=\"selected\"";} ?>>ya</option>
              <option value="0" <?php if (!(strcmp(0, $row_Recordset1['namaSoalan']))) {echo "selected=\"selected\"";} ?>>tidak</option>
            </select>       
            <label for="u"></label></td>
        </tr>
        <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
    </table>

    dear bregent and SnakEyez02.
    i have create 2 table, which is soalan table and temporary table.
    user will answer all the question. either 'ya' or 'tidak'..
    each answer have different value..
    this value store permanently in soalan table..
    this value i want save to temporary table too.
    for now, i success only save for the first row but i want save for all..
    anybody please help me..

  • How to print values in a HashMap

    Hi
    I am new to Java
    I am using a HashMap where key is a String and the Value is again a HashMap..
    Firstly can I use it this way ...If not could you please suggest an alternative...
    If I can use it ...
    I am unable to print the values in the HashMap..
    Here "map" is a HasMap I am using..
    and I used
    map.put("name",secondMap);
    My code is
    public void printMap(Map map)
              Set keys = map.keySet();
              Iterator keyIter = keys.iterator();
              while (keyIter.hasNext())
                   Object key = keyIter.next();
                   Object value = map.get(key);
    // Here the value is again a HashMap
                   HashMap valuesMap=(HashMap)value;
                   System.out.println("KEY" + key.toString() );
                   if(valuesMap!=null)
                        Set set = valuesMap.keySet();
                        Iterator setit = set.iterator();
                        while (setit.hasNext())
                             Object keyinMap=setit.next();
                             Object valueinMap=valuesMap.get(key);
                             System.out.print("value is"+valueinMap);
    Can anybody help me in this regard.
    Thanks in advance

    Hmm, this looks pretty good to me. What behavior does this give you? For example, do you see "KEYname" printed? Are you sure that "map" is actually the same one you added "secondMap" to?

  • How to get value in a web page automatically  and sava output in database

    how to get value this table output is
    row 1, cell 1
    row 1, cell 2
    row 2, cell 1
    row 2, cell 2
    <table border="1">
    <tr>
    <td>row 1, cell 1</td>
    <td>row 1, cell 2</td>
    </tr>
    <tr>
    <td>row 2, cell 1</td>
    <td>row 2, cell 2</td>
    </tr>
    </table>

    Note: This thread was originally posted in the [Java Technologies for Web Services|http://forums.sun.com/forum.jspa?forumID=331] forum, but moved to this forum for closer topic alignment.

  • How to get values of all input text of a form?

    Hi,
    I would like to know how to get all input text value of a form?
    I try this:
            List values = new ArrayList(); 
            values = getBindings().getAttributeBindings(); 
            for (Iterator iterator = values.iterator(); iterator.hasNext();) {
                Object o = iterator.next();
                if (o != null) { 
                    if (o instanceof FacesCtrlAttrsBinding) { 
                        System.out.println("Trace iterator=" + ((FacesCtrlAttrsBinding)o).getName());
    src
    In my jspx, I use panelTabbed component which is in af:form
    With this code, I get all bindings name.
    So I change the [structure |http://h.imagehost.org/0922/jdev.png] putting af:form in each item of my af:panelTabbed without succes.
    The code trace all bindings again, and I just want to get the input text of the form (like *$_POST*, or *$_GET* in php)
    How to do that?
    Thanks for your help.

    Hi,
    I try this:
    private UIComponent getUIComponent(String name) { 
          FacesContext facesCtx = FacesContext.getCurrentInstance(); 
          return facesCtx.getViewRoot().findComponent(name) ; 
    src
    I post the structure again.
    I try:
    // f1 id of af:form
    UIComponent test =  getUIComponent("f1");
    test is not null
    // pfl1 id of af:panelFormLayout
    UIComponent test =  getUIComponent("pfl1");
    but here test is null
    I try
    // f1 id of af:form
    // pt1 id of af:pageTemplate
    // pt2 id of af:panelTabbed
    // sdi1 id of af:showDetailItem
    // ps1 id of af:panelSplitter
    // pgl32 id of af:panelGroupLayout
    // pfl1 id of af:panelFormLayout
    UIComponent test =  getUIComponent("f1:pt1:pt2:sdi1:ps1:pgl32:pfl1");but I have this:
    Error 500--Internal Server Error
    javax.servlet.ServletException: java.lang.IllegalArgumentException: f1So I add
    private static final char SEPARATOR_CHAR = ':';But I have the same error.
    getUIComponent returns null with pt2,sdi1, ps1, pgl32, pfl1 and not null with f1, pt1.
    I don't know why...
    How can I get children (af:inputText) of pfl1 ?
    Thanks

  • How to print value with ""

    Hi All,
    I am trying to print a String with "Value" can anyone please provide me a code sample for that.
    What I am trying to print is -
    String Result = "a" + "b";
    System.out.println("Result = " + Result );
    This is giving me Result = ab
    Where as I want Result = "ab"
    Thanks in Advance
    Sameer

    public static void main(String[] args)
            String result = "\"ab\"";
            System.out.println( result );
        }The " is a special character in java. If you want to add a " to a string you must first escape it with a slash like so \"

  • How to print value of the variable in mail

    Hi,
    I am new to workflow and trying out some basis small work.
    i have created workflow for material change.
    whenever a material is changed mail is sended to user.
    it is working fine .
    but now i want that material number which is changed should come in mail.
    how can i achive this
    Thanks,
    Chintan

    Hi Soni
    You have the "Materialnumber" field in the event container. Pass this into the workflow container by defining a Workflow Container element and subsequently use this container as a variable in your email using insert fields option and you will have the Materialnumber visible in your mail sent.
    NB. This message is more or less a cut and paste from an other answer in this forum. So sometimes the fastet way to get an answer, is to search instead of posting questions. Just a kind reminder |
    Kind regards
    Mikkel

  • HOW TO PRINT THE MATTER IN FOR ALL ENTRIES

    HI HOW T  PRINT THE FOR ALL ENTRIES MATTER

    Hi Naresh,
    You can only use FOR ALL ENTRIES IN ...WHERE ...in a SELECT statement.
    SELECT ... FOR ALL ENTRIES IN itab WHERE cond returns the union of the solution sets of all SELECT statements that would result if you wrote a separate statement for each line of the internal table replacing the symbol itab-f with the corresponding value of component f in the WHERE condition.Duplicates are discarded from the result set. If the internal table itab does not contain any entries, the system treats the statement as though there were no WHERE cond condition, and selects all records (in the current client).
    For example:
    SELECT * FROM sflight INTO wa_sflight 
    FOR ALL ENTRIES IN ftab 
    WHERE CARRID = ftab-carrid AND 
                 CONNID = ftab-connid AND 
                     fldate = '20010228'. 
    This condition, return all entries of the sflight.
    When using FOR ALL ENTRIES the number of matching records is restricted to the number of records in the internal table. If the number of records in the database tables is too large then join would cause overheads in performance. Additionally a JOIN bypasses the table buffering.
    Thanks,
    Reward If Helpful.

  • How to keep value in arrayList and print into matrix form.

    compute all primes less than N, and display the results
    step by step .summarize the computed results in an easy-to-read format.(matrix)
    The program starts by asking for an integer value N from the user. Print out the initial matrix
    of numbers from 2 to N.
    To find all primes less than N, begin by making a table of integers from 2 to N.
    Find the smallest integer i, that is NOT prime and NOT crossed out. Mark i as a prime
    number and cross out 2i, 3i, 4i, ?, ni N.
    At this point, program should print the intermediate results in a matrix format, and pause
    until any key is pressed before proceeding.clear screen every
    time prior to printing the intermediate results (in the matrix format).
    When i > N , the algorithm terminates. screen is cleared once again,
    before the program prints the final results in the matrix format.
    Following are the requirements for the matrix format:
    - The matrix consists of 10 columns
    - The number of rows varies, depending on the input N
    - Initial matrix: The program prints an empty string in place of 1
    - Intermediate matrix: The program prints values for all prime numbers and numbers
    that are not crossed out. The program prints an empty string for each crossed-out
    number.
    Final matrix: The program prints only the prime numbers less than N
    P.S I want to write at least 3 classes

    This is my new first class but it have an error
    import java.io.*;
    import java.util.*;
    public class ArrayListExample2 {
        public static void main(String[] args)throws IOException {
            ArrayListExample listExample = new ArrayListExample();
            listExample.doArrayListExample();
        public void doArrayListExample()throws IOException {
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
             System.out.print("enter limit : ");
              int max=Integer.parseInt(br.readLine());
              System.out.println();
            int counter = 2;
            List listA = new ArrayList();// int list
            //List listB = new ArrayList(); //string list
            for (int i = 2; i <= max; i++) {
                System.out.print("\t" + i );
                listA.add(new Integer(i)); //???????2-max ??listA
              int count =0;
              BufferedReader en = new BufferedReader(new InputStreamReader(System.in));
              while(count<Math.sqrt(max))
                     // max may be number of input or size of array list
              //BufferedReader en = new BufferedReader(new InputStreamReader(System.in));
              System.out.println ("Please enter");
              en.readLine();// wait for enter
              listA.removeNotPrime();
              count++;
         public void removeNotPrime()// what parametor?Need?
              for (int i=0;i<Math.sqrt(max)))
                   int prime = listA.get(i);
                        for (int j=i+1;i<=listA.size();j++)
                         int val = listA.get(j);
                        if (val%prime==0)
                        listA.remove(j);
    This part for test
            for (int i = 0; i <= max; i++)  // printttttttttt
                //System.out.print("\t" + i );
                   System.out.print("\t" + listA.get(i);
                // call class printMatrix;
    }

  • How to print names all files from a given folder into a file??

    Hi,
    Given is folder which contains folder's n files. the same is wd every folder.
    How to print names of all files in parent dir.
    ex: C drive
    1) windows 2)prog files 3) Documents 4) a.txt
    1.a) cursors.........
    2.a) netbeans.....
    3.a) rcm_b05
    output:
    c:\windows\cursors\s.txt
    c:\progfiles\ram\m.tc
    a.txt

    Hi,
    look at http://exampledepot.com/egs/java.io/TraverseTree.html, copy the "visitAllFiles" method and implement the "process" method as follows:
        public static void process(File f) {
            System.out.println( f.getAbsolutePath());
        }- Michael

  • How to print Jtable values in one A4 size paper

    Hi,
    i am having JPanel , this panel have Jtbale, Jtextfield, Jlable, i search the code for Printing Jpanel, its work fine and print whole JPanel including, jtable, textbox, everything.
    my Jtable have Scroll bar to see all the values in the table,my problem is when i was print the JPanel the Jtable print only the display values in Jtable, cannot print all the values from Jtable,(eg. Jtable have 50 rows, screen display 20 rows only, move the scrollbar to see remaining,) .
    i want to print 50 rows how to print the values anyone can help me
    thanks in advance.

    Duplicate post. Mods please do your duty.

  • How to print the values of type Object?

    Hi All,
    I am not able to print values of the following can anyone telme where i am wrong and what i can do in this regard.
    Object one = request.getAttribute("values");
    When i try to print these values as following
    System.out.println("one ="+one);
    am not getting the values in a different format something like [Ljava.lang.String;@1234f. I tried to convert the following Object to String still its not working. Can some one please suggest me what i can do in this regard.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    ferrari_sun wrote:
    I am getting a Null pointer exception if i typecast it to a string array. Not sure what to do nowThe hell you are. You don't get Null pointers out of casting. However you might be accessing null elements of the array afterwards.
    You really should throw away the code, go fetch some "How to learn basic Java with Wiggles The Bear" ebook and then start learning the basics instead of tripping on every single line of your code which is too complicated for you.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • How To Print Field Value in TOP-OF-PAGE During Line Selection.

    How To Print Field Value in TOP-OF-PAGE During Line Selection when double click on field.

    (If my memory serves me well (not used for long time ago)
    Assign values to system fields sy-tvar0 - sy-tvar9, they will replace the placeholders "&0" through "&9" in the list headers and column headers.
    TOP-OF-PAGE DURING LINE-SELECTION.
         WRITE: / 'Interactive Report &3'.
      WRITE record-vbeln TO sy-tvar3.
    Regards,
    Raymond

Maybe you are looking for

  • In MR11 - u201CNo (suitable) purchase order/item found     u201C.

    Hi Friends, We are having issue with MR11 in 4.6 B. While doing MR11 for a PO where Delivery costs have not been balanced, we are getting message u201CNo (suitable) purchase order/item found     u201C. In the research, we found that in 4.6 B, MR11 is

  • Special characters doesn't show in drop-down list

    I've created a two level drop-down menu using javascript var vComp1 = ["sub1","text1","text2","text3","text4"]; var vComp2 = ["sub2","text1","text2","text3","text4"]; var cRtn = app.popUpMenu(vComp1, vComp2); I't works like i wanted, but int the text

  • Wifi defaults to apple site

    HI, my wifi provider is BT Openzone.  Normally, when I connect to this, I am taken to a BT site and have to enter my details for the wifi connection to be made.  Now, whenever I try to connect to BT openzone, the apple site appears instead.  As this

  • BO and Oracle 11g

    We are using Bo enterprise 11 release 2. Is this package  an Oracle 11g compatible?

  • Reinstalling PS cs5 updates do not work

    I had to reinstall CS5 due to a serious hardware failure and when the update screen shows updates to the 5.5 all the updates fail to download. I am wondering if Adobe has dropped them to try to make us go to the cloud.