Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2013
    Posts
    4

    Unhappy Unanswered: Error(ORA-06550) in running Script

    DECLARE
    LC_USER_NAME VARCHAR2(100) := 'TEST_USER' ;
    LC_USER_PASSWORD VARCHAR2 (100) := 'TEST123' ;
    LD_USER_START_DATE DATE := TO_DATE ('23-JUN-2000') ;
    LD_USER_END_DATE VARCHAR2(100) := NULL ;
    LD_PASSWORD_DATE VARCHAR2(100) := TO_DATE ('23-JUN-2000') ;
    LD_PASSWORD_LIFESPAN_DAYS NUMBER := 90 ;
    LN_PERSON_ID NUMBER := 11111 ;
    LC_EMAIL_ADDRESS VARCHAR2(100) := 'TEST_USER@ABC.COM' ;
    BEGIN
    FND_USER_PKG.CREATEUSER ( X_USER_NAME => LC_USER_NAME,X_OWNER => NULL,X_UNENCRYPTED_PASSWORD => LC_USER_PASSWORD,X_START_DATE => LD_USER_START_DATE,X_END_DATE => LD_USER_END_DATE,X_PASSWORD_DATE => LD_PASSWORD_DATE,X_PASSWORD_LIFESPAN_DAYS => LD_PASSWORD_LIFESPAN_DAYS,X_EMPLOYEE_ID => LN_PERSON_ID,X_EMAIL_ADDRESS => LC_EMAIL_ADDRESS ) ;
    COMMIT ;
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END ;
    /



    This is the script which I run for which I am getting the following error:

    returnResult= ORA-06550: line 2, column 42:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

    * & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset

    Please help me to fix this.

  2. #2
    Join Date
    Dec 2007
    Posts
    253
    First thing is to remove the when others exception handler. All it does is obfuscate information about the error. Get it gone.
    Next thing is to use the to_date correctly. ALWAYS supply the format argument
    TO_DATE ('23-JUN-2012','dd-MON-yyyy') ;

  3. #3
    Join Date
    Oct 2013
    Posts
    4
    Hi, Thanks for the info.
    I tried it the way suggested. Still getting the same error.

    RA-06550: line 2, column 42:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

    * & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset

    Also this script i m trying to run from tool(automation tool) than on the db directly. When i tried on db directly it was executed with no errors.

  4. #4
    Join Date
    Dec 2007
    Posts
    253
    What automation tool? If it runs fine on the db, then surely the issue lies with the tool, no?

  5. #5
    Join Date
    Oct 2013
    Posts
    4
    Can be. But the script run fine in db, when the exception was given.So not sure if there were errors. Can i believe the script is correct? Please confirm.Given below is the errror from DB without exception being passed.

    SQL> DECLARE
    2 LC_USER_NAME VARCHAR2(100) := 'PRAJTEST' ;
    3 LC_USER_PASSWORD VARCHAR2 (100) := 'ORACLE123' ;
    4 LD_USER_START_DATE DATE := TO_DATE ('23-JUN-2012') ;
    5 LD_USER_END_DATE VARCHAR2(100) := NULL ;
    6 LD_PASSWORD_DATE VARCHAR2(100) := TO_DATE ('23-JUN-2012') ;
    7 LD_PASSWORD_LIFESPAN_DAYS NUMBER := 90 ;
    8 LN_PERSON_ID NUMBER := 32980 ;
    9 LC_EMAIL_ADDRESS VARCHAR2(100) := 'PRAJ_TEST@ABC.COM' ; 10 BEGIN
    11 FND_USER_PKG.CREATEUSER ( X_USER_NAME => LC_USER_NAME,X_OWNER => NULL,X_UNENCRYPTED_PASSWORD => LC_USER_PASSWORD,X_START_DATE => LD_USER_START_DATE,X_END_DATE => LD_USER_END_DATE,X_PASSWORD_DATE => LD_PASSWORD_DATE,X_PASSWORD_LIFESPAN_DAYS => LD_PASSWORD_LIFESPAN_DAYS,X_EMPLOYEE_ID => LN_PERSON_ID,X_EMAIL_ADDRESS => LC_EMAIL_ADDRESS ) ;
    12 COMMIT ;
    13 DBMS_OUTPUT.PUT_LINE(SQLERRM);
    14 END ;
    15 /
    DECLARE
    *
    ERROR at line 1:
    ORA-20001: APP-FND-02912: User PRAJTEST: The Person is linked to an invalid
    Employee (Employee ID = 32980).
    ORA-06512: at "APPS.APP_EXCEPTION", line 72
    ORA-06512: at "APPS.FND_USER_PKG", line 2677
    ORA-06512: at "APPS.FND_USER_PKG", line 280
    ORA-06512: at "APPS.FND_USER_PKG", line 3520
    ORA-06512: at "APPS.FND_USER_PKG", line 838
    ORA-06512: at "APPS.FND_USER_PKG", line 913
    ORA-06512: at "APPS.FND_USER_PKG", line 1032
    ORA-06512: at line 11
    Last edited by sujanask; 10-07-13 at 08:10.

  6. #6
    Join Date
    Oct 2013
    Posts
    4

    SQL> DECLARE
    2 LC_USER_NAME VARCHAR2(100) := 'PRAJTEST' ;
    3 LC_USER_PASSWORD VARCHAR2 (100) := 'ORACLE123' ;
    4 LD_USER_START_DATE DATE := TO_DATE ('23-JUN-2012') ;
    5 LD_USER_END_DATE VARCHAR2(100) := NULL ;
    6 LD_PASSWORD_DATE VARCHAR2(100) := TO_DATE ('23-JUN-2012') ;
    7 LD_PASSWORD_LIFESPAN_DAYS NUMBER := 90 ;
    8 LN_PERSON_ID NUMBER := 11111 ;
    9 LC_EMAIL_ADDRESS VARCHAR2(100) := 'PRAJTEST@ABC.COM' ;
    10 BEGIN
    11 FND_USER_PKG.CREATEUSER ( X_USER_NAME => LC_USER_NAME,X_OWNER => NULL,X_UNENCRYPTED_PASSWORD => LC_USER_PASSWORD,X_START_DATE => LD_USER_START_DATE,X_END_DATE => LD_USER_END_DATE,X_PASSWORD_DATE => LD_PASSWORD_DATE,X_PASSWORD_LIFESPAN_DAYS => LD_PASSWORD_LIFESPAN_DAYS,X_EMPLOYEE_ID => LN_PERSON_ID,X_EMAIL_ADDRESS => LC_EMAIL_ADDRESS ) ;
    12 COMMIT ;
    13 EXCEPTION
    14 WHEN OTHERS THEN
    15 ROLLBACK ;
    16 DBMS_OUTPUT.PUT_LINE(SQLERRM);
    17 END;
    18 /

    PL/SQL procedure successfully completed.



    Also please find the successfully completed output from db when exception is passed.

  7. #7
    Join Date
    Dec 2007
    Posts
    253
    As I said before, get rid of the worthless when others.
    Also please find the successfully completed output from db when exception is passed.
    What does 'when the exception is passed' mean?

  8. #8
    Join Date
    Mar 2007
    Posts
    623
    Well, you are not running the same code. In the second case, these lines are added:
    Code:
    13 EXCEPTION
    14 WHEN OTHERS THEN
    15 ROLLBACK ;
    Most probably, the same exception is raised, but this code is hiding it and nothing is displayed because probably SERVEROUTPUT is set to OFF.
    http://tkyte.blogspot.cz/2012/05/pok...en-others.html
    http://asktom.oracle.com/pls/asktom/...27300346542578
    For your own ability to analyze what the code does, at least re-RAISE it.
    Then, just start solving the error.
    APP-FND-02912: User PRAJTEST: The Person is linked to an invalid Employee (Employee ID = 32980)
    It is application one. Just check the documentation and fix it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •