Monday, 27 March 2017

API to add Classification to an Oracle Project

/* Formatted on 3/27/2017 2:33:29 PM (QP5 v5.114.809.3010) */
DECLARE
   l_project_id       pa_projects_all.project_id%TYPE := NULL;
   l_class_category   pa_project_classes.class_category%TYPE := NULL;
   l_class_code       pa_project_classes.class_code%TYPE := NULL;
   l_return_status    VARCHAR2 (20);
   l_msg_count        NUMBER;
   l_msg_data         VARCHAR2 (240);
BEGIN
   L_PROJECT_ID := &P_PROJECT_ID;
   L_CLASS_CATEGORY := &P_CLASS_CATEGORY;
   l_class_code := &p_class_code;
   pa_projects_maint_pub.create_classifications (
      p_api_version          => 1.0,
      p_init_msg_list        => fnd_api.g_true,
      p_commit               => fnd_api.g_false,
      p_validate_only        => fnd_api.g_false,
      p_validation_level     => fnd_api.g_valid_level_full,
      p_calling_module       => 'SELF_SERVICE',
      p_debug_mode           => 'N',
      p_max_msg_count        => fnd_api.g_miss_num,
      p_object_id            => l_project_id,
      p_object_type          => 'PA_PROJECTS',
      p_class_category       => l_class_category,
      p_class_code           => l_class_code,
      p_code_percentage      => fnd_api.g_miss_num,
      p_attribute_category   => fnd_api.g_miss_char,
      p_attribute1           => fnd_api.g_miss_char,
      p_attribute2           => fnd_api.g_miss_char,
      p_attribute3           => fnd_api.g_miss_char,
      p_attribute4           => fnd_api.g_miss_char,
      p_attribute5           => fnd_api.g_miss_char,
      p_attribute6           => fnd_api.g_miss_char,
      p_attribute7           => fnd_api.g_miss_char,
      p_attribute8           => fnd_api.g_miss_char,
      p_attribute9           => fnd_api.g_miss_char,
      p_attribute10          => fnd_api.g_miss_char,
      p_attribute11          => fnd_api.g_miss_char,
      p_attribute12          => fnd_api.g_miss_char,
      p_attribute13          => fnd_api.g_miss_char,
      p_attribute14          => fnd_api.g_miss_char,
      p_attribute15          => fnd_api.g_miss_char,
      x_return_status        => l_return_status,
      x_msg_count            => l_msg_count,
      x_msg_data             => l_msg_data
   );
   COMMIT;

   DBMS_OUTPUT.put_line ('Status:' || l_return_status);
   DBMS_OUTPUT.put_line ('Message:' || l_msg_data);
END;

No comments:

Post a Comment