1 Reply Latest reply: Nov 5, 2012 1:41 AM by 597001 RSS

    getting error ORA-20001: This person does not have preferences for the sele

    user488418
      *) I got user_id by following query

      SELECT USER_ID, USER_NAME, FND_USER.*
      from FND_USER where user_name = '205174';

      *) resource_id by following query:

      select * from APPS.PA_PROJECT_ASSIGNMENTS where RESOURCE_ID in (select RESOURCE_ID from APPS.PA_RESOURCES_DENORM where PERSON_ID
      in (select PERSON_ID from APPS.PER_ALL_PEOPLE_F where EMPLOYEE_NUMBER= 205173) ) ;



      *) person_id by following query:
      select * from APPS.PA_RESOURCES_DENORM where PERSON_ID in (select PERSON_ID from APPS.PER_ALL_PEOPLE_F where EMPLOYEE_NUMBER= 205173) ;

      and


      Hi,
      When I am running following query to submit timesheet, getting following warning msg

      anonymous block completed
      ORA-20001: This person does not have preferences for the selected effective date
           
      Following is query

      set serveroutput on size 1000000

      DECLARE

      l_tbl_messages hxc_message_table_type;
      l_message fnd_new_messages.message_text%type;
      i pls_integer;

      l_app_blocks hxc_block_table_type := hxc_block_table_type();
      l_app_attributes hxc_self_service_time_deposit.app_attributes_info;

      l_time_building_block_id number;
      l_new_timecard_id number;
      l_new_timecard_ovn number;
      l_bb_id number;

      l_resource_id hxc_time_building_blocks.resource_id%TYPE := 3595; -- XPCPAY
      l_start_time hxc_time_building_blocks.start_time%TYPE := fnd_date.canonical_to_date('2011/10/17 00:00:00');
      l_measure hxc_time_building_blocks.measure%TYPE := 1;
      l_element_type_id varchar2(80) := 'ELEMENT - 50809'; -- Jury Duty
      l_comment_text hxc_time_building_blocks.comment_text%TYPE := '';
      l_deposit_process hxc_deposit_processes.NAME%TYPE := 'OTL Deposit Process';
      l_retrieval_process varchar2(250) := 'BEE Retrieval Process';

      BEGIN

      fnd_global.apps_initialize ( user_id => 3850 -- XPCPAY
      , resp_id => 3595 -- Self Service Time
      , resp_appl_id => 809 -- HXC
      );

      hxc_timestore_deposit.create_time_entry ( p_measure => l_measure
      , p_day => l_start_time
      , p_resource_id => l_resource_id
      , p_resource_type => 'PERSON'
      , p_comment_text => l_comment_text
      , p_deposit_process => l_deposit_process
      , p_app_blocks => l_app_blocks
      , p_app_attributes => l_app_attributes
      , p_time_building_block_id => l_bb_id
      );

      hxc_timestore_deposit.create_attribute ( p_building_block_id => l_bb_id
      , p_attribute_name => 'Dummy Element Context'
      , p_attribute_value => l_element_type_id
      , p_deposit_process => l_deposit_process
      , p_app_attributes => l_app_attributes
      );

      hxc_timestore_deposit.execute_deposit_process ( p_validate => TRUE
      , p_app_blocks => l_app_blocks
      , p_app_attributes => l_app_attributes
      , p_messages => l_tbl_messages
      , p_mode => 'SUBMIT'
      , p_deposit_process => l_deposit_process
      , p_retrieval_process => l_retrieval_process
      , p_timecard_id => l_new_timecard_id
      , p_timecard_ovn => l_new_timecard_ovn
      );


      ------------------------------
      -- OUTPUT MESSAGES --
      ------------------------------

      DBMS_OUTPUT.put_line ('l_new_timecard_id = ' || l_new_timecard_id);
      DBMS_OUTPUT.put_line ('l_new_timecard_ovn = ' || l_new_timecard_ovn);

      if (l_tbl_messages.COUNT <> 0) THEN
      i := l_tbl_messages.FIRST;
      LOOP
      EXIT WHEN (NOT l_tbl_messages.EXISTS(i));
      l_message := fnd_message.get_string ( appin => l_tbl_messages(i).application_short_name
      , namein => l_tbl_messages(i).message_name
      );
      DBMS_OUTPUT.put_line (l_tbl_messages(i).message_name);
      DBMS_OUTPUT.put_line (l_message);
      i := l_tbl_messages.NEXT(i);
      END LOOP;
      rollback;
      else
      commit;
      end if;

      ------------------------------

      exception
           when others then
                DBMS_OUTPUT.put_line(SQLERRM);

      END;
      /
        • 1. Re: getting error ORA-20001: This person does not have preferences for the sele
          597001
          Please check the following MOS notes:
          ORA-20001: This Person Does Not Have Preferences For the Selected Effective Date [ID 876324.1]
          ORA-20001: This Person Does Not Have Preferences For The Selected Effective Date [ID 761470.1]
          Troubleshooting Guide for HRMS API Errors - ORA-20001 and APP Errors [ID 152259.1]
          ''This Person Does Not Have Preferences For The Selected Effective Date'' Message [ID 287581.1]
          Diagnostics - Setup - Time and labour Person - Test failed [ID 397214.1]

          Cheers,
          ND
          Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered.