Saturday, September 6, 2014

Create Position Structure (per_position_structure_api.create_position_structure)

CREATE OR REPLACE PROCEDURE xx_upload_position_structure
AS
   --Step 1 Create New Hierarchy PER_POSITION_STRUCTURE_API.CREATE_POSITION_STRUCTURE
   l_effective_date          DATE;
   l_name                    VARCHAR2 (1000);
   l_business_group_id       NUMBER;

   l_primary_position_flag   VARCHAR2 (1)    DEFAULT 'N';
   v_position_structure_id   NUMBER;
   v_object_version_number   NUMBER;
BEGIN
   l_effective_date := '01-jan-2006';
   l_primary_position_flag := 'N';
   l_name := 'Etisalat HR Postion Hierarchy';
   l_business_group_id := 101;
  
 per_position_structure_api.create_position_structure
                         (p_effective_date             => l_effective_date,
                          p_name                       => l_name,
                          p_business_group_id          => l_business_group_id,
                          p_primary_position_flag      => l_primary_position_flag,
                          p_position_structure_id      => v_position_structure_id,
                          p_object_version_number      => v_object_version_number
                         );
   DBMS_OUTPUT.put_line (   'v_position_structure_id = '
                         || v_position_structure_id
                        );
   DBMS_OUTPUT.put_line (   'v_object_version_number = '
                         || v_object_version_number
                        );
END;
grant all on etscust.xx_upload_position_structure to apps;