Solved

Issue when using #USER_ID# inside an event

  • 3 November 2021
  • 3 replies
  • 197 views

Userlevel 7
Badge +14

Trying to use the following statement inside an event

 

IF  EXPENSE_RULE_VALUE in ('STD') and  #USER_ID# not in ('7889','013588') THEN

  Raise_application_error(-20199,'Select the expense t  : ' ||   EXPENSE_RULE_VALUE  || ' can not be used any more' );

END IF;

 

But we encounter the below error
 

[ORA-06550]: line 27, column 74:

PLS-00201: identifier 'IFSAPP' must be declared

ORA-06550: line 27, column 2:

 

any way to use the #USER_ID#  properly ?

 

icon

Best answer by Bhagya Wickramasinghe 3 November 2021, 02:58

View original

This topic has been closed for comments

3 replies

Userlevel 5
Badge +13

Hi @Chamaka Wimalarathne,

Can you please try using the method call fnd_session_api.get_fnd_user() instead of #USER_ID# ?

Best Regards,

Bhagya

Badge +1

hi all,
This error was reported:
    PL/SQL: ORA-00904: "GROSEBOOM": ongeldige ID.
To solve it this code was replaced:
       WHERE  cp.profile_name = 'TEK_ENGINEER_TL'
         AND  ucp.identity = #USER_ID#;
by this:
       WHERE  cp.profile_name = 'TEK_ENGINEER_TL'
         AND  ucp.identity = fnd_session_api.get_fnd_user();

Thanks !
Paul

Badge +3

Hi
If you still would like to use the replacement variable please use ‘#USER_ID’ otherwise it will interpret it as a variable (that isn’t declared) instead of a value.