DBA Data[Home] [Help]

APPS.HZ_LOCATION_PROFILE_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 21

   SELECT hl.country, hl.address1, hl.address2, hl.address3,
          hl.address4, hl.city, hl.postal_code, hl.state,
          hl.province, hl.county, hl.actual_content_source,
          hl.validation_status_code, hl.date_validated
   FROM   hz_locations hl
   WHERE  hl.location_id = l_location_id;
Line: 122

    p_create_update_flag        => 'C'
   ,p_location_profile_rec      => p_location_profile_rec
   ,x_return_status             => x_return_status );
Line: 140

  HZ_LOCATION_PROFILES_PKG.Insert_Row (
       x_location_profile_id            => l_location_profile_rec.location_profile_id
      ,x_location_id                    => l_location_profile_rec.location_id
      ,x_actual_content_source          => l_location_profile_rec.actual_content_source
      ,x_effective_start_date           => l_start_date
      ,x_effective_end_date             => l_end_date
      ,x_validation_sst_flag            => l_location_profile_rec.validation_sst_flag
      ,x_validation_status_code         => l_location_profile_rec.validation_status_code
      ,x_date_validated                 => l_location_profile_rec.date_validated
      ,x_address1                       => l_location_profile_rec.address1
      ,x_address2                       => l_location_profile_rec.address2
      ,x_address3                       => l_location_profile_rec.address3
      ,x_address4                       => l_location_profile_rec.address4
      ,x_city                           => l_location_profile_rec.city
      ,x_postal_code                    => l_location_profile_rec.postal_code
      ,x_prov_state_admin_code          => l_location_profile_rec.prov_state_admin_code
      ,x_county                         => l_location_profile_rec.county
      ,x_country                        => l_location_profile_rec.country
      ,x_object_version_number          => 1
  );
Line: 172

    UPDATE HZ_LOCATIONS
    SET date_validated = sysdate
      , validation_status_code = l_location_profile_rec.validation_status_code
      , last_update_date = hz_utility_v2pub.last_update_date
      , last_updated_by = hz_utility_v2pub.last_updated_by
      , last_update_login = hz_utility_v2pub.last_update_login
    WHERE location_id = l_location_profile_rec.location_id;
Line: 212

PROCEDURE update_location_profile (
   p_init_msg_list             IN VARCHAR2 := FND_API.G_FALSE
  ,p_location_profile_rec      IN location_profile_rec_type
--  ,px_object_version_number    IN OUT NOCOPY NUMBER
  ,x_return_status             OUT NOCOPY    VARCHAR2
  ,x_msg_count                 OUT NOCOPY    NUMBER
  ,x_msg_data                  OUT NOCOPY    VARCHAR2
) IS
   l_object_version_number     NUMBER;
Line: 226

   l_allow_update_std          VARCHAR2(1);
Line: 234

   SELECT 'X'
   FROM hz_location_profiles
   WHERE location_id = l_location_id
   AND actual_content_source = l_content_source
   AND sysdate+.001 between effective_start_date and nvl(effective_end_date, sysdate)
   AND rownum = 1;
Line: 243

   SELECT 'X'
   FROM hz_locations
   WHERE location_id = l_location_id
   AND date_validated IS NOT NULL
   AND validation_status_code IS NOT NULL;
Line: 250

   select location_profile_id, rowid, object_version_number
   from   hz_location_profiles
   where  sysdate between effective_start_date and nvl(effective_end_date, sysdate)
   and    location_id = c_location_id
   and    location_profile_id <> c_location_profile_id;
Line: 262

   savepoint update_location_profile_pub;
Line: 273

   l_allow_update_std := nvl(fnd_profile.value('HZ_UPDATE_STD_ADDRESS'), 'Y');
Line: 286

     IF((l_allow_update_std = 'N') AND (l_dummy IS NOT NULL)) THEN
       l_validation_sst_flag := 'N';
Line: 301

      p_create_update_flag        => 'U'
     ,p_location_profile_rec      => l_location_profile_rec
     ,x_return_status             => x_return_status );
Line: 311

       SELECT rowid, object_version_number, validation_sst_flag
       INTO l_rowid, l_object_version_number, l_orig_sst_flag
       FROM hz_location_profiles
       WHERE location_id = l_location_profile_rec.location_id
       AND actual_content_source = l_location_profile_rec.actual_content_source
       AND sysdate+.001 between effective_start_date and nvl(effective_end_date,sysdate)
       AND rownum = 1
       FOR UPDATE NOWAIT;
Line: 329

         HZ_LOCATION_PROFILES_PKG.Update_Row(
            x_rowid                          => l_rowid
           ,x_location_profile_id            => NULL
           ,x_location_id                    => NULL
           ,x_actual_content_source          => NULL
           ,x_effective_start_date           => NULL
           ,x_effective_end_date             => l_end_date
           ,x_validation_sst_flag            => l_validation_sst_flag
           ,x_validation_status_code         => l_location_profile_rec.validation_status_code
           ,x_date_validated                 => l_location_profile_rec.date_validated
           ,x_address1                       => l_location_profile_rec.address1
           ,x_address2                       => l_location_profile_rec.address2
           ,x_address3                       => l_location_profile_rec.address3
           ,x_address4                       => l_location_profile_rec.address4
           ,x_city                           => l_location_profile_rec.city
           ,x_postal_code                    => l_location_profile_rec.postal_code
           ,x_prov_state_admin_code          => l_location_profile_rec.prov_state_admin_code
           ,x_county                         => l_location_profile_rec.county
           ,x_country                        => l_location_profile_rec.country
           ,x_object_version_number          => nvl(l_object_version_number,1)+1
         );
Line: 365

       SELECT rowid, object_version_number, validation_sst_flag
       INTO l_rowid, l_object_version_number, l_orig_sst_flag
       FROM hz_location_profiles
       WHERE location_id = l_location_profile_rec.location_id
       AND actual_content_source = l_location_profile_rec.actual_content_source
       AND sysdate+.001 between effective_start_date and nvl(effective_end_date,sysdate)
       AND rownum = 1
       FOR UPDATE NOWAIT;
Line: 380

         HZ_LOCATION_PROFILES_PKG.Update_Row(
            x_rowid                          => l_rowid
           ,x_location_profile_id            => NULL
           ,x_location_id                    => NULL
           ,x_actual_content_source          => NULL
           ,x_effective_start_date           => NULL
           ,x_effective_end_date             => sysdate
           ,x_validation_sst_flag            => NULL
           ,x_validation_status_code         => NULL
           ,x_date_validated                 => NULL
           ,x_address1                       => NULL
           ,x_address2                       => NULL
           ,x_address3                       => NULL
           ,x_address4                       => NULL
           ,x_city                           => NULL
           ,x_postal_code                    => NULL
           ,x_prov_state_admin_code          => NULL
           ,x_county                         => NULL
           ,x_country                        => NULL
           ,x_object_version_number          => nvl(l_object_version_number,1)+1
        );
Line: 410

      HZ_LOCATION_PROFILES_PKG.Insert_Row (
          x_location_profile_id            => l_location_profile_rec.location_profile_id
         ,x_location_id                    => l_location_profile_rec.location_id
         ,x_actual_content_source          => l_location_profile_rec.actual_content_source
         ,x_effective_start_date           => sysdate
         ,x_effective_end_date             => l_end_date
         ,x_validation_sst_flag            => l_validation_sst_flag
         ,x_validation_status_code         => l_location_profile_rec.validation_status_code
         ,x_date_validated                 => l_location_profile_rec.date_validated
         ,x_address1                       => l_location_profile_rec.address1
         ,x_address2                       => l_location_profile_rec.address2
         ,x_address3                       => l_location_profile_rec.address3
         ,x_address4                       => l_location_profile_rec.address4
         ,x_city                           => l_location_profile_rec.city
         ,x_postal_code                    => l_location_profile_rec.postal_code
         ,x_prov_state_admin_code          => l_location_profile_rec.prov_state_admin_code
         ,x_county                         => l_location_profile_rec.county
         ,x_country                        => l_location_profile_rec.country
         ,x_object_version_number          => 1
       );
Line: 456

     HZ_LOCATION_PROFILES_PKG.Insert_Row (
        x_location_profile_id            => l_location_profile_rec.location_profile_id
       ,x_location_id                    => l_location_profile_rec.location_id
       ,x_actual_content_source          => l_location_profile_rec.actual_content_source
       ,x_effective_start_date           => l_startdate
       ,x_effective_end_date             => l_enddate
       ,x_validation_sst_flag            => l_validation_sst_flag
       ,x_validation_status_code         => l_location_profile_rec.validation_status_code
       ,x_date_validated                 => l_location_profile_rec.date_validated
       ,x_address1                       => l_location_profile_rec.address1
       ,x_address2                       => l_location_profile_rec.address2
       ,x_address3                       => l_location_profile_rec.address3
       ,x_address4                       => l_location_profile_rec.address4
       ,x_city                           => l_location_profile_rec.city
       ,x_postal_code                    => l_location_profile_rec.postal_code
       ,x_prov_state_admin_code          => l_location_profile_rec.prov_state_admin_code
       ,x_county                         => l_location_profile_rec.county
       ,x_country                        => l_location_profile_rec.country
       ,x_object_version_number          => 1
     );
Line: 490

       UPDATE HZ_LOCATIONS
       SET date_validated = sysdate,
           validation_status_code = l_location_profile_rec.validation_status_code
       WHERE location_id = l_location_profile_rec.location_id;
Line: 496

         UPDATE HZ_LOCATION_PROFILES
         SET validation_sst_flag = 'N'
         WHERE validation_sst_flag = 'Y'
         AND sysdate between effective_start_date and nvl(effective_end_date, sysdate)
	 /* SSM SST Integration and Extension
	  * Removed the hard-coded value of DNB and will instead check if the
	  * source system is not of type PURCHASED.

         AND actual_content_source <> l_location_profile_rec.actual_content_source
         AND actual_content_source not in ('USER_ENTERED','DNB');*/
Line: 518

       UPDATE HZ_LOCATIONS
       SET date_validated = null,
           validation_status_code = null
       WHERE location_id = l_location_profile_rec.location_id;
Line: 527

         HZ_LOCATION_PROFILES_PKG.Update_Row(
            x_rowid                          => l_all_active_loc_profiles.rowid
           ,x_location_profile_id            => l_all_active_loc_profiles.location_profile_id
           ,x_location_id                    => NULL
           ,x_actual_content_source          => NULL
           ,x_effective_start_date           => NULL
           ,x_effective_end_date             => sysdate
           ,x_validation_sst_flag            => NULL
           ,x_validation_status_code         => NULL
           ,x_date_validated                 => NULL
           ,x_address1                       => NULL
           ,x_address2                       => NULL
           ,x_address3                       => NULL
           ,x_address4                       => NULL
           ,x_city                           => NULL
           ,x_postal_code                    => NULL
           ,x_prov_state_admin_code          => NULL
           ,x_county                         => NULL
           ,x_country                        => NULL
           ,x_object_version_number          => nvl(l_all_active_loc_profiles.object_version_number,1)+1
        );
Line: 553

     ROLLBACK TO update_location_profile_pub;
Line: 561

     ROLLBACK TO update_location_profile_pub;
Line: 569

     ROLLBACK TO update_location_profile_pub;
Line: 578

END update_location_profile;
Line: 581

   p_create_update_flag        IN VARCHAR2,
   p_location_profile_rec      IN location_profile_rec_type,
   x_return_status             IN OUT NOCOPY VARCHAR2
) IS

   l_dummy                     VARCHAR2(1);
Line: 596

   select 'X'
   from AR_LOOKUPS
   where lookup_type = l_lookup_type
   and lookup_code = l_lookup_code;
Line: 618

   IF (p_create_update_flag = 'U') THEN
     IF(l_actual_content_source = FND_API.G_MISS_CHAR) THEN
       FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
Line: 639

   ELSIF (p_create_update_flag = 'C') THEN
     IF(l_actual_content_source IS NULL OR l_actual_content_source = FND_API.G_MISS_CHAR) THEN
       FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_MISSING_COLUMN' );
Line: 684

  SELECT 'X'
  FROM HZ_LOCATION_PROFILES
  WHERE location_profile_id = l_location_profile_id;
Line: 698

      UPDATE hz_location_profiles
      SET effective_end_date = sysdate
      WHERE location_profile_id = p_location_profile_id;
Line: 758

  SELECT 'X'
  FROM HZ_LOCATION_PROFILES
  WHERE location_profile_id = l_location_profile_id;
Line: 772

      UPDATE hz_location_profiles
      SET validation_status_code = p_validation_status_code
      WHERE location_profile_id = p_location_profile_id;
Line: 776

      UPDATE hz_locations
      SET validation_status_code = p_validation_status_code
      WHERE location_id =
      ( SELECT location_id
        FROM HZ_LOCATION_PROFILES
        WHERE location_profile_id = p_location_profile_id);