Search This Blog

Friday, December 28, 2012

Simple setup of TNS

Simple setup of TNS

You have multiple oracle home installed in your pc! One from Oracle Client that you installed, one from Oracle Express edition database and one from oracle workflow that you installed few months back. Now you are not sure which TNSNAMES.ora is being used or should be used. The situation sounds pretty similar... isn't it? Lets try this and get rid of the dilemma!

TNS Entry:
DEV = (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dev.domain.ee)(PORT=1567)))(CONNECT_DATA=(SID=sdev1)(server=dedicated)))

I prefer to use oracle home from Oracle Client. In my case this is
C:\OraHome_1

So I have added the above TNS entry in tnsnames.ora file
C:\OraHome_1\network\ADMIN\TNSNAMES.ORA
Now let's cehck the existing status of my connectivity by executing tnsping:

Java Hashtable Example

import java.util.*;
public class MainClass {
  public static void main(String args[]) {
    Hashtable columnValues = new Hashtable();
    columnValues.put("Tokyo", "Japan");
    columnValues.put("Beijing", "China");
    columnValues.put("Bangkok", "Thailand");
    String city = "Beijing";
    String country = (String) columnValues.get(city);
    if (country != null)
      System.out.println(city + " is located in " + country);  //Beijing is located in China
    else
      System.out.println(city + " is not located in the hashtable");
  }
}

Tuesday, December 25, 2012

"this" keyword java examples - with and without "this"


Understanding the problem without "this" keyword

class Student{
    int id;
    String name;

    Student(int id, String name){
        id = id;
        name = name;
    }

    void display(){
        System.out.println(id+" "+name);
    }

    public static void main(String args[]){
        Student s1 = new Student(101, "Jahn");
        Student s2 = new Student(102, "Robin");
        s1.display(); //0 null
        s2.display(); //0 null
    }
}
Solution of the above problem using "this" keyword

class Student{
    int id;
    String name;

    Student(int id, String name){
        this.id = id;                    //try with "this" keyword
        this.name = name;                //try with "this" keyword
    }

    void display(){
        System.out.println(id+" "+name);
    }

    public static void main(String args[]){
        Student s1 = new Student(101, "Jahn");
        Student s2 = new Student(102, "Robin");
        s1.display();         s2.display();    }
}

Source: http://www.javatpoint.com/this-keyword
Check this link. It has all 6 types of examples using "this" keyword

Tuesday, December 18, 2012

Program - Inherit Segment Value Attributes

The Segment Value Inheritance program automatically propagates the attributes of a segment value to all account combinations that contain that segment value.
To protect account combinations from changes when you run the Segment Value Inheritance program, check the Preserve check box in the GL Accounts window. You can assign attributes at two levels:
  • The individual segment value in the Segment Values window.
  • The account combination in the GL Accounts window.

For example, you can disable the 200 cost center segment in the Segment Values window, but retain existing account combinations using cost center 200 by marking the Preserve check box for each combination in the GL Accounts window. Then, when you run the Segment Value Inheritance program, all account combinations that contain the 200 cost center will be disabled except for those you preserved and no new combinations will be created during data entry.
You can view the account code combinations that have been changed in either the GL Accounts window or the Segment Value Inheritance Execution Report.
Warning: Individual segment value attributes override account combination attributes.

Source: http://www.oracleug.com/user-guide/general-ledger/segment-value-inheritance

Tuesday, December 4, 2012

Internal error has occurred in the program xla_accounting_pkg.ValidateAAD

The error is farely common in FAH. In normal case, if the Accounting Application Definition (AAD) is not validated, EBS Create Accounting - Accounting Program ends with this error.

An internal error has occurred in the program xla_accounting_pkg.ValidateAAD.  ORA-0000: normal, successful completion.
If you run Validate Application Accounting Definition program from EBS View menu > Run, in most cases the problem gets resolved. You can rerun the problematic Create Accounting again.

I have an experience where running this program didn't resolve the issue. I had to validate my AAD from the FAH AAD window, by clicking the Validate button on that screen. It resolved the issue and I could run Accounting program normally.