Set Employee Number sequence In Oracle Apps

To change the sequence number  of the Employee number in Oracle Apps following steps needs to be followed:

 

Run the following SQL statements

SQL> SELECT  HR.PER_GLOBAL_EMP_NUM_S.NEXTVAL FROM DUAL;

 

Depending on the results, alter the sequence so that the NEXTVAL number for the first employee during data migration is 70001

 

If the results is:

NEXTVAL

———-

1000

 

Then run the alter statement:

 

SQL> ALTER SEQUENCE HR.PER_GLOBAL_EMP_NUM_S increment by 69999

 

SQL> SELECT  HR.PER_GLOBAL_EMP_NUM_S.NEXTVAL

FROM DUAL;

 

NEXTVAL

———-

70000

 

To ensure that the next employee number is 70001, run the alter statement:

 

SQL> ALTER SEQUENCE HR.PER_GLOBAL_EMP_NUM_S increment by 1

 

The next value generated would be 70001

 

For employee number parameter in API, use HR.PER_GLOBAL_EMP_NUM_S.NEXTVAL defined in create employee API

 

hr_employee.create_employee

(…

,p_employee_number => HR.PER_GLOBAL_EMP_NUM_S.NEXTVAL

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s