My Oracle Support Banner

ORA-20001: HR_50193_WPM_WEIGHT_VALUE While Creating Objectives In Performance Managment Using hr_objectives_api.create_objective API Call. (Doc ID 2834689.1)

Last updated on OCTOBER 05, 2023

Applies to:

Oracle Performance Management - Version 12.2.7 and later
Information in this document applies to any platform.

Symptoms

On : 12.2.7 version,
Executing API: hr_objectives_api.create_objective error while creating objectives in Performance Management.

ERROR
-----------------------
ORA-20001: HR_50193_WPM_WEIGHT_VALUE


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
Executing api: hr_objectives_api.create_objective

Example: (This is an hardcoded API Example, please modify as per your business needs)

SQL> Set Serverout on

SQL>

DECLARE
   new_appraisal_id          NUMBER;   
   l_score_card_id           NUMBER;
    -- Output Variables
   v_weighting_over_100_warning    BOOLEAN;
   v_weighting_appraisal_warning   BOOLEAN;
   v_objective_id                  NUMBER;
   v_object_version_number         NUMBER;
   v_validate                      BOOLEAN         := FALSE;
   v_effective_date                DATE            := TRUNC (SYSDATE);

   CURSOR c1
   IS
SELECT po.*
           FROM per_appraisals pa,
                per_objectives po,
                per_appraisal_templates pat
          WHERE     pa.plan_id = 346
                AND pat.attribute2 = 2
                AND pa.appraisee_person_id = 28297
                AND po.appraisal_id = pa.appraisal_id
                AND pa.appraisal_template_id = pat.appraisal_template_id;
BEGIN
   FOR x IN c1
   LOOP
 
     DBMS_OUTPUT.put_line ('Calling API');
     DBMS_OUTPUT.put_line ('new_appraisal_id' || new_appraisal_id);
      DBMS_OUTPUT.put_line ('l_score_card_id' || l_score_card_id);
   
     hr_objectives_api.create_objective
            (p_validate                         => v_validate,
             p_effective_date                   => v_effective_date,
              p_business_group_id                => x.business_group_id,
              p_name                             => x.name,
              p_start_date                       => x.start_date,
              p_owning_person_id                 => x.owning_person_id,
              p_target_date                      => x.target_date,
              p_achievement_date                 => x.achievement_date,
              p_detail                           => x.detail,
              p_comments                         => x.comments,
              p_success_criteria                 => x.success_criteria,
              p_appraisal_id                     => 66993,
              p_attribute_category               => x.attribute_category,
              p_attribute1                       => x.attribute1,
              p_attribute2                       => x.attribute2,
              p_attribute3                       => x.attribute3,
              p_attribute4                       => x.attribute4,
              p_attribute5                       => x.attribute5,
              p_attribute6                       => x.attribute6,
              p_attribute7                       => x.attribute7,
              p_attribute8                       => x.attribute8,
              p_attribute9                       => x.attribute9,
              p_attribute10                      => x.attribute10,
              p_attribute11                      => x.attribute11,
              p_attribute12                      => x.attribute12,
              p_attribute13                      => x.attribute13,
              p_attribute14                      => x.attribute14,
              p_attribute15                      => x.attribute15,
              p_attribute16                      => x.attribute16,
              p_attribute17                      => x.attribute17,
              p_attribute18                      => x.attribute18,
              p_attribute19                      => x.attribute19,
              p_attribute20                      => x.attribute20,
              p_attribute21                      => x.attribute21,
              p_attribute22                      => x.attribute22,
              p_attribute23                      => x.attribute23,
              p_attribute24                      => x.attribute24,
              p_attribute25                      => x.attribute25,
              p_attribute26                      => x.attribute26,
              p_attribute27                      => x.attribute27,
              p_attribute28                      => x.attribute28,
              p_attribute29                      => x.attribute29,
              p_attribute30                      => x.attribute30,
              p_scorecard_id                     => x.scorecard_id,
              p_copied_from_library_id           => x.copied_from_library_id,
              p_copied_from_objective_id         => x.copied_from_objective_id,
              p_aligned_with_objective_id        => x.aligned_with_objective_id,
              p_next_review_date                 => x.next_review_date,
              p_group_code                       => x.group_code,
              p_priority_code                    => x.priority_code,
              p_appraise_flag                    => x.appraise_flag,
              p_verified_flag                    => x.verified_flag,
              p_target_value                     => x.target_value,
              p_actual_value                     => x.actual_value,
              p_weighting_percent                => x.weighting_percent,
              p_complete_percent                 => x.complete_percent,
              p_uom_code                         => x.uom_code,
              p_measurement_style_code           => x.measurement_style_code,
              p_measure_name                     => x.measure_name,
              p_measure_type_code                => x.measure_type_code,
              p_measure_comments                 => x.measure_comments,
              p_sharing_access_code              => x.sharing_access_code,
              p_weighting_over_100_warning       => v_weighting_over_100_warning,
              p_weighting_appraisal_warning      => v_weighting_appraisal_warning,
              p_objective_id                     => v_objective_id,
              p_object_version_number            => v_object_version_number
             );
   DBMS_OUTPUT.put_line (   'Successfully created objective: '
                         || v_objective_id
                         || ' for TARGET PERSON_ID: '
                         || x.owning_person_id
                        );
      DBMS_OUTPUT.put_line ('Completion of API');
   END LOOP;

-- COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('error : ' || SQLERRM);
      ROLLBACK;
END;
 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.