Create / Update Location API

We define a
location in order to identify the exact address of an organization or employee
work location. Locations can be local as well as global. Local locations are
available only in particular Business Groups, whereas global locations are
visible across all Business Groups
defined
in the application.

Step1:
Create Location
 The location parameters can be passed to the
below API’s to insert data to Oracle standard tables hr_locations_all and other
relevant tables.
                                               
 Sample script with description to upload the
location information is explained below
hr_location_api.create_location 

(

   p_effective_date                   => SYSDATE,

   p_location_code                    => ‘1234’,

   p_description                      => ‘Loaded by API’,

   p_address_line_1                   => NULL,

   p_country                          =>
NULL,

   p_postal_code                      => NULL,

   p_telephone_number_1               => NULL,

   p_town_or_city                     => NULL,

   p_business_group_id                => NULL,

   p_style                            => ‘US_GLB’,

   p_location_id                      => l_location_id,

   p_object_version_number        => l_object_version_number

);
Step2: Update location
 The location parameters can be passed to the
below API’s to update data to Oracle standard tables hr_locations_all and other
relevant tables.      
                      
Sample script with description
to upload the location information is explained below
     HR_LOCATION_API.UPDATE_LOCATION

     (

         P_EFFECTIVE_DATE                  => SYSDATE

        ,P_LOCATION_ID                     => L_LOCATION_ID

        ,P_LOCATION_CODE                   => ‘1234’

        ,P_DESCRIPTION                     => ‘XXX Location’

        ,P_ADDRESS_LINE_1                  =>  ‘XXX123’

        ,P_COUNTRY                         => ‘US’

        ,P_POSTAL_CODE                     => ‘123’

        ,P_STYLE                           => ‘US_GLB’

        ,P_TELEPHONE_NUMBER_1              => ‘13579’

        ,P_TOWN_OR_CITY                    => ‘XXX321’

        ,P_OBJECT_VERSION_NUMBER       =>L_OBJECT_VERSION_NUMBER

    );

Locations
will be created / updated in the application as shown below
–Deepak Jeyaraj
  • October 12, 2015 | 32 views