How to generate customize employee number

Hi,
I am trying to generate customize employee number and for that i have taken following steps
1. I changed employee number generation from automatic to manual
2. I created a sequence
3. I wrote a pl/sql code to create a customize employee number using the sequence concating it with text like 'EMP||'-'||seq.nextval.
4. I registered the pl/sql code in apps through formula function window.
But when i create a new employee it doesnt generate customize employee number.
Any Idea where am i mistaking.
Regards
Majid

You need to use the EMP_NUMBER_GENERATION fast formula of type Person Number Generation
The formula needs to be setup in the Setup Business group (business group id = 0)
Call your pl/sql function through the formula function in the EMP_NUMBER_GENERATION fast formula
Look into the help in the fast formula window for help on the the EMP_NUMBER_GENERATION fast formula.
The name of the fast formula has to be EMP_NUMBER_GENERATION for Employees, CWK_NUMBER_GENERATION for contingent workers and APL_NUMBER_GENERATION for applicants.
There was some document in metalink but was later removed by Oracle citing that it is a customization.
Also check this thread
simple employee number generationformula needed
Hope this helps.
-Debojyoty

Similar Messages

  • For sweden the employee number range is completed Eg:23000000 to 239999999 now how to generate next employee id

    For sweden the employee number range is completed Eg:23000000 to 239999999 now how to generate next employee id

    Hi Bharathi,
    If required no ranges are not there which you want to add then will not be problem and you can extend the 23999999 to your next limit like 39999999 check the overlapping.
    Check extended no rage are present in the system and then system would not except because of overlapping.
    Check and tell.
    Regards,
    Sankarsan

  • How to generate new perner number using Abap Code in pa0002. what is the fu

    how to generate new perner number using Abap Code in pa0002. what is the function Module used.

    hi
    define internal number ranges for ur implementation then when u run PA 40  do not input any employee number , system will generate the employee number automatically.
    Regards
    sameer

  • How to Customize Employee Number Generation?

    m trying to generate a custom employee,applicant numbers through a dummy business group.
    I've created on Application: Oracle E-Business 11.5.10.2 the work structure and am now on the step of customizing the employee generating number.
    I followed the link steps:
    Below steps already done:
    Technical Side:
    1- Create New Sequence in DB.
    -----Sequence Code----------
    DROP SEQUENCE APPS.APPSLEAD_CUST_NUMB;
    CREATE SEQUENCE APPS.APPSLEAD_CUST_NUMB
    START WITH 1
    MAXVALUE 999999999999999999999999999
    MINVALUE 0
    NOCYCLE
    NOCACHE
    NOORDER;
    2- Create New Package for issuing the numbers.
    ----------Package Code--------------
    Create or replace package appslead_package as
    Function get_emp_custom_number (
    p_business_group_id IN number
    ,p_legislation_code IN varchar2
    ,p_person_type IN varchar2
    ,p_person_number IN varchar2
    ,p_party_id IN number
    ,p_person_id IN number
    ,p_national_id IN varchar2
    ,p_date_of_birth IN date
    ) return varchar2;
    end appslead_package;
    Create or replace package body APPSLEAD_PACKAGE as
    Function GET_EMP_CUSTOM_NUMBER (
    p_business_group_id IN number
    ,p_legislation_code IN varchar2
    ,p_person_type IN varchar2
    ,p_person_number IN varchar2
    ,p_party_id IN number
    ,p_person_id IN number
    ,p_national_id IN varchar2
    ,p_date_of_birth IN date
    ) return varchar2 as
    /*Check if the person id is exists on the system or not*/
    cursor person_exists is
    select employee_number,applicant_number,npw_number
    from per_all_people_f
    where party_id = p_party_id;
    --and p_effective_date between effective_start_date and effective_end_date;
    lseq_num number;
    l_next varchar2(30);
    l_emp_num varchar2(30);
    l_apl_num varchar2(30);
    l_npw_num varchar2(30);
    begin
    open person_exists;
    fetch person_exists into l_emp_num,l_apl_num,l_npw_num;
    if person_exists%notfound then
    Select to_char(Appslead_Cust_Numb.Nextval) Into lseq_num From Dual;
    l_next := 'AppsLead-'||lseq_num;
    return l_next;
    Else
    If p_person_type = 'EMP' then
    l_next := l_emp_num;
    Elsif p_person_type = 'APL' then
    l_next := l_apl_num;
    Elsif p_person_type = 'CWK' then
    l_next := l_apl_num;
    End if;
    End if;
    Close person_exists;
    return l_next;
    end get_emp_custom_number;
    End appslead_package;
    Functional Side:
    1- Create or Modify Business Group Employee numbering method to Manual.
    2- Create New Formula Function.
    3- Create New Formula EMP_NUMBER_GENERATION with Type "Person Number Generation"
    ------Formula Script--------
    EMP_NUMBER_GENERATION
    Create Custome formula for generation employee number*/
    DEFAULT FOR Person_Number IS ' '
    DEFAULT FOR Party_ID IS 0
    DEFAULT FOR Person_ID IS 0
    DEFAULT FOR National_ID IS ' '
    DEFAULT FOR DATE_OF_BIRTH IS '1900/01/01 00:00:00' (date)
    DEFAULT FOR Hire_Date IS '1900/01/01 00:00:00' (date)
    INPUTS ARE
    Legislation_Code (text),
    Person_Type (text),
    Person_number (text),
    Party_id,
    Person_id,
    Date_of_birth (date),
    Hire_date (date),
    National_ID (text)
    Next_Number = '0'
    Invalid_msg = ' '
    IF Person_Type = 'EMP' then
    Next_Number = TO_CHAR(Get_Emp_Custom_Number(Legislation_Code,Person_Type,Person_Number,Party_Id,Person_Id,National_ID,Date_Of_Birth))
    Else
    Invalid_msg = 'This is not an person_type of Employee!'
    Return Next_Number
    Now, when I create a new employee I need the employee number to appear as
    "AppsLead-Emp-00001"
    But its not, and the screen of employee master is not allow to create an employee without filling the number.
    How to do the same?
    What should be the Employee Number Generation ?
    1- Automatic generation with Global Sequencing
    2- Manual
    If your answer is manual, in the employee master screen, the employee id is required and when you create the employee the id should be entered.

    there are some fast formula you can use.
    Please check metalink

  • How to generate external network number based on WBS element number

    Hi all(experts)
    I am new to PS and I have a requirment.
    <u>To derive network no. from WBS identifier.</u>
    Enhancement is CNEXOO12
    Function module is EXIT_SAPLCOKO_002(data transfer for Network number).
    I wnat to know how to use the above enhancement to generate external network number based on the WBS element  number. We have to take the Project number and extract the part of the name from it and then assign it to NETWORK and ACTIVITIY under it. The above also depends upon the project type.
    Please let me know the fields\structures\tables that are needed and available during runtime in this Function module exit. If possible with some examples.
    Thanks for your time.
    SH

    Hi Karthik
    Thanks for sending me the table relations.
    Can you please help me with the following.
    1) Can you please expand the table relations with an example because when I am doing a relation I am not able to get the AUFNR fromAUFK-->PSPEL because the there are four levels of WBS in the Project and if I plug the first level WBS from the PRPS there are no table entries found. if I put directly the WBS(fourth level X-yyyyyyy95.xxxx10.10.2) in the AUFK-PSPEL table it works and I get the AUFNR.
    2) Can I do retrieve the network number from the sales order(KDUAF).
    Please suggest.
    By enhancing this CNEX0012(EXIT_SAPLCCOKO_002) which transactions in PS are affected.
    Please reply at your earliest.
    As always thanks for your time and your help
    SH.

  • How to generate a random number with at least 6 digits?

    Hi all,
    All is in the question. :-)
    I would like to generate a random number but the function "random
    number" in Labview isn't accurate enough.
    Do you know an algorithm to generate a random number of 6 or more
    digit?
    Thanks,
    PF

    Hi PF,
    It's simple. Use 2 random number functions in the same process. Now you
    should have 2 distinct random numbers that have the same accuracy. Let's say
    LV gives accuracy up to the thousandth (0.XXX), now if you divide one number
    by 1000 and then add to the other number you should then have something like
    0.XXXXXX. Actually, LV random number function can give up to about 17 digits
    (decimal). If you are looking for more digits (>17 digits), the idea above
    may not work, then the last thing you may want try is to generate two or
    three random numbers then convert all these decimal numbers to fractional
    strings chop off the 0 and dot then concatinate them together. After all
    it's still a random number. How many digits do you want to get? Make sure
    the indicators acce
    pt that many digits?
    Good luck
    Louis.
    P-F wrote in message
    news:[email protected]..
    > Hi all,
    >
    > All is in the question. :-)
    >
    > I would like to generate a random number but the function "random
    > number" in Labview isn't accurate enough.
    >
    > Do you know an algorithm to generate a random number of 6 or more
    > digit?
    >
    > Thanks,
    >
    > PF

  • How to generate the batch number for group of records

    Hi All,
    requirement: i have created one sequence to generate the batch numbers.i have to get the nextval of the sequence for batch number (this column is not part of the table. its dynamic column/alias column) only for every 50000 records of a table.
    detail description:
    for example, if i have 10 records in a table. And, if i want to generate the batch number for every 2 records, then the output should look like belo.
    batch-number qty
    1 10
    1 20
    2 30
    2 40
    3 50
    3 60
    4 70
    4 80
    5 90
    5 100
    Please help me on this. Please let me know if you need more info.

    one more update on the above request. this has to be done using SQL query only.

  • How to generate external material number?

    hi all,
    I need to create material in the report. this material number is assigned external (manually). but the user want to generate the number.
    I only found the function ' MATERIAL_NUMBER_GET_NEXT' , which can only generate the internal number.
    Is there other function which can help me to generate the external material number?
    Thanks in advance.
    Ned

    you can use another number range II
    so you use fm number_get_next to generate a material number .
    And you can use this number for mm01 or an interface to create you material number I external
    A.

  • How can I customize a number format?

    In the previous numbers release (Numbers 9) there was a menu were you were able to customize a number format similar to what you can do with Excel. Have they drop this functionality in the new release?

    And, in case you would like to get a more balanced view about new features as well as those removed, there is this article  and this thread.  Plus this announcement from Apple about features they plan to restore in releases over the next six months.
    If you use Excel and have a particular customized number format you need to use, I understand you can open the spreadsheet in Numbers and that customized format will be imported and made available to you in Numbers 3.0.
    SG

  • How to Avoid Duplicate Employee Number in Custom Form

    Developing A new employee screen, where all the Personal, Assignment, Visa, Passort & Tickets are capture and send for approval. Once it is done. Scheduled Concurrent Program will pick the APPROVED records and create the Employee & Assignment in the HRMS.
    In custom form the employee Number is Last Employee Number in HRMS and Get the Last Employee Number in Custom table (always Custom table employee is higher) and increment by 1 whichever is higher.
    This code written on ON-INSERT trigger.
    SELECT     MAX (TO_NUMBER(employee_number)) + 1 INTO v_max_empno
    FROM     per_all_people_f
    WHERE     employee_number != 99999
    AND     REPLACE ( TRANSLATE (employee_number, '1234567890', '~~~~~~~~~~'),'~', NULL) IS NULL
    AND     business_group_id = :parameter.bg_id ;
    SELECT     MAX (TO_NUMBER(employee_num)) + 1 INTO v_max_empno2
    FROM     xx_employee_details
    WHERE     business_group_id = :parameter.bg_id ;
    IF v_max_empno2 IS NOT NULL THEN
         v_emp_number := v_max_empno2 ;
    ELSE
         v_emp_number := v_max_empno ;
    END IF ;
    :xxempdet.employee_num := v_emp_number ;
    Issue.
    The above is working fine only when data entered from single machine. When multple users are access this form we are getting Duplicate Employee Numbers.
    I need to impliment the process which is Sales Order Number generation without GAPLESS.
    Regards/Prasanth

    Make use of Sequence and use sequence.nextval for fetching the next value to ensure unique values.
    Thanks
    Shree

  • How re-activate an employee number that we deleted, with Master Data detail

    Hi Sapeer's
    I have an issue need your inputs at the earliest.
    I wonder if it is possible for you to re-activate an employee number that we deleted, with all the Infotypes maintained in the Master Data for that particular employee.
    Your early response will be of great help.
    Regards,
    Subbu

    Hi Luke,
    This employee's personnel number has been deleted. It was first withdrawn and they have deleted the data using PU00.
    The personnel number and the data does not show up in the Master Data PA20/30 since it has been deleted.
    Now we would like to know if we could reactive the deleted personnel number and get back the same Master Data inputs which was maintained for this employee.
    Kindly advice.
    Regards,
    Subbu

  • How to generate sales order number

    Hai friends,
         In sales order creation, I want to generate a sales order number (i.e., 1 for the first sales order, 2 for the second and so on). This number should be generated successively in background. How it can be done..?

    Hello,
    Yes, I'm struggling to understand what you're after too. You could create a z table to keep track of the number if it's bespoke. Otherwise try these tables: FBN1, NRIV (intervals), T161 (po) TNRO (linked to NRIV).
    Good luck!
    Ash Thomas
    http://www.ashthomas.com
    Sap Abap Developer & Sap Abap Programmer

  • How to generate a random number within a specified tolerance and control that tolerance.

    I am trying to simulate data without using a DAQ device by using a random number generator and I want to be able to control the "range" of the random number generated though.  On the front pannel, the user would be able to input a nominal number, and the random number generator would generate numbers within plus or minus .003 of that nominal number.  The data would then be plotted on a graph.  Anyone know how to do this?  Or if it's even possible?
    Just for information sake, the random number is supposed to look like thickness measurements, that's why I want to simulate plus and minus .003 because the data could be thinner or thicker than the nominal.  
    Thanks in advance!!
    Solved!
    Go to Solution.

    You can create a random number with a gaussian probability profile using two equal distributed (0...1) random numbers and applying the Box Muller transform.
    I wrote one many years ago, her it is. (LabVIEW 8.0). 
    Message Edited by altenbach on 04-12-2010 09:13 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    BoxMuller.vi ‏10 KB

  • How to generate unique document number ?

    Hi All,
    We need to generate Document Number where there should be any gap, so that we cannot use sequence. For example : Invoice Number.
    one possible approach like : Select MAX(InvoiceNumber)+1 from invoice, what if that table has millions of rows, is this reliable enough ?
    How to avoid two user do the same query at same time that lead to dupplicate number ?
    Anybody has done it this way in production? or any other approach ?
    Thank you for your info,
    xtanto

    I strongly second Justin's strong suggestion about re-considering the requirement.
    Be aware that for any of the schemes suggested to have a chance of working, all access to the table must be through stored procedures that use a SELECT FOR UPDATE on the counter table. No user in the database can have insert privileges on the document table except the owner. The owner's password should be kept in a locked safe and be unknown to anyone. If for some reason the owner needs access to the database, then remove the password from the safe, do what needs to be done, then get some guy off the street to set a new password, write it down and lock it in the safe again.
    If you really need a gap-free number, it needsto be another column, separate from the PK. Use a sequence to generate the pk gaps and all, then create a procedure that runs periodically to update the gap free column. Soemthing like:
    SQL> CREATE PROCEDURE fix_gap_free AS
      2     l_v NUMBER;
      3     TYPE id_tbl IS TABLE OF number INDEX BY BINARY_INTEGER;
      4     l_ids  id_tbl;
      5     l_id2s id_tbl;
      6  BEGIN
      7     SELECT MAX(NVL(id2,0)) INTO l_v FROM t;
      8     SELECT id, ROW_NUMBER() OVER (ORDER BY id)
      9     BULK COLLECT INTO l_ids, l_id2s
    10     FROM t
    11     WHERE id2 IS NULL;
    12
    13     FORALL i IN 1 .. l_ids.COUNT
    14        UPDATE t
    15        SET id2 = l_id2s(i) + l_v
    16        WHERE id = l_ids(i);
    17     COMMIT;
    18  END;
    19  /
    Procedure created.
    SQL> SELECT * FROM t;
            ID        ID2
             1
             2
             5
             7So, id2 is going to be the gap-free column.
    SQL> exec fix_gap_free;
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t;
            ID        ID2
             1          1
             2          2
             5          3
             7          4So first pass is fine. Now lets add a few rows, so the table now looks like:
    SQL> SELECT * FROM t;
            ID        ID2
             1          1
             2          2
             5          3
             7          4
             8
             9
            25and generate more gap free number:
    SQL> exec fix_gap_free;
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t;
            ID        ID2
             1          1
             2          2
             5          3
             7          4
             8          5
             9          6
            25          7If there may be deletions in the table, and you need to maintain the gap free nature, then just skip the WHERE id2 IS NULL predicate.
    John

  • How to generate Serial(Unique) Number for finished goods?

    Guru's,
    How do i generate Serial(Unique) Numbers for finished goods.Suppose,if we get an order for a finished good A of 10 qty.We want to generate unique number to identify each and every A item separately for quality purpose.Any help is much appreciated.
    thanks Guru's

    Depending on serial control of item, you will need to generate serial numbers at the time of WIP Completion transaction using Serial Entry window (i.e. if serial control is At Receipt) or at the time of job creation (i.e. if you are using serial control as predefined)
    In latter case, you will have to use MES or MSCA screens to perform serialized WIP completion.
    Thanks,
    Hrishi

Maybe you are looking for