DBA Data[Home] [Help]

APPS.HZ_NAME_ADDRESS_FMT_VALIDATE SQL Statements

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

Line: 99

PROCEDURE get_updated_record (
    p_style_fmt_locale_id     IN         NUMBER,
    p_update_field_rec        IN         HZ_STYLE_FMT_LOCALE_V2PUB.STYLE_FMT_LOCALE_REC_TYPE,
    x_updated_rec             OUT NOCOPY        HZ_STYLE_FMT_LOCALE_V2PUB.STYLE_FMT_LOCALE_REC_TYPE
) IS
BEGIN
    SELECT
        style_fmt_locale_id,
        style_format_code,
        language_code,
        territory_code,
        DECODE ( p_update_field_rec.start_date_active, null, start_date_active, fnd_api.g_miss_date, null, p_update_field_rec.start_date_active),
        DECODE ( p_update_field_rec.end_date_active, null, end_date_active, fnd_api.g_miss_date, null, p_update_field_rec.end_date_active)
    INTO
        x_updated_rec.style_fmt_locale_id,
        x_updated_rec.style_format_code,
        x_updated_rec.language_code,
        x_updated_rec.territory_code,
        x_updated_rec.start_date_active,
        x_updated_rec.end_date_active
    FROM HZ_STYLE_FMT_LOCALES
    WHERE style_fmt_locale_id = p_style_fmt_locale_id;
Line: 123

END get_updated_record;
Line: 125

PROCEDURE get_updated_record (
    p_style_fmt_layout_id     IN         NUMBER,
    p_update_field_rec        IN         HZ_STYLE_FMT_LAYOUT_V2PUB.STYLE_FMT_LAYOUT_REC_TYPE,
    x_updated_rec             OUT NOCOPY        HZ_STYLE_FMT_LAYOUT_V2PUB.STYLE_FMT_LAYOUT_REC_TYPE
) IS
BEGIN

    SELECT
        b.style_fmt_layout_id,
        b.style_format_code,
        b.variation_number,
        b.attribute_code,
        b.attribute_application_id,
        DECODE ( p_update_field_rec.line_number, null, b.line_number, fnd_api.g_miss_num, null, p_update_field_rec.line_number),
        DECODE ( p_update_field_rec.position, null, b.position, fnd_api.g_miss_num, null, p_update_field_rec.position),
        DECODE ( p_update_field_rec.mandatory_flag, null, b.mandatory_flag, fnd_api.g_miss_char, null, p_update_field_rec.mandatory_flag),
        DECODE ( p_update_field_rec.use_initial_flag, null, b.use_initial_flag, fnd_api.g_miss_char, null, p_update_field_rec.use_initial_flag),
        DECODE ( p_update_field_rec.uppercase_flag, null, b.uppercase_flag, fnd_api.g_miss_char, null, p_update_field_rec.uppercase_flag),
        DECODE ( p_update_field_rec.transform_function, null, b.transform_function, fnd_api.g_miss_char, null, p_update_field_rec.transform_function),
        DECODE ( p_update_field_rec.delimiter_before, null, b.delimiter_before, fnd_api.g_miss_char, null, p_update_field_rec.delimiter_before),
        DECODE ( p_update_field_rec.delimiter_after, null, b.delimiter_after, fnd_api.g_miss_char, null, p_update_field_rec.delimiter_after),
        DECODE ( p_update_field_rec.blank_lines_before, null, b.blank_lines_before, fnd_api.g_miss_num, null, p_update_field_rec.blank_lines_before),
        DECODE ( p_update_field_rec.blank_lines_after, null, b.blank_lines_after, fnd_api.g_miss_num, null, p_update_field_rec.blank_lines_after),
        DECODE ( p_update_field_rec.prompt, null, t.prompt, fnd_api.g_miss_char, null, p_update_field_rec.prompt),
        DECODE ( p_update_field_rec.start_date_active, null, b.start_date_active, fnd_api.g_miss_date, null, p_update_field_rec.start_date_active),
        DECODE ( p_update_field_rec.end_date_active, null, b.end_date_active, fnd_api.g_miss_date, null, p_update_field_rec.end_date_active)
    INTO
        x_updated_rec.style_fmt_layout_id,
        x_updated_rec.style_format_code,
        x_updated_rec.variation_number,
        x_updated_rec.attribute_code,
        x_updated_rec.attribute_application_id,
        x_updated_rec.line_number,
        x_updated_rec.position,
        x_updated_rec.mandatory_flag,
        x_updated_rec.use_initial_flag,
        x_updated_rec.uppercase_flag,
        x_updated_rec.transform_function,
        x_updated_rec.delimiter_before,
        x_updated_rec.delimiter_after,
        x_updated_rec.blank_lines_before,
        x_updated_rec.blank_lines_after,
        x_updated_rec.prompt,
        x_updated_rec.start_date_active,
        x_updated_rec.end_date_active
    FROM HZ_STYLE_FMT_LAYOUTS_B b , HZ_STYLE_FMT_LAYOUTS_TL t
    WHERE b.style_fmt_layout_id =t.style_fmt_layout_id  AND
          t.style_fmt_layout_id = p_style_fmt_layout_id AND
          t.language=userenv('LANG'); ---Bug No. 5178007
Line: 176

END get_updated_record;
Line: 215

      p_create_update_flag             IN     VARCHAR2,
      p_style_rec                      IN     HZ_STYLE_V2PUB.STYLE_REC_TYPE,
      p_rowid                          IN     ROWID,
      x_return_status                  IN OUT NOCOPY VARCHAR2
  ) IS

      l_dummy                                 VARCHAR2(1);
Line: 240

      IF (p_create_update_flag = 'U') THEN
          SELECT b.style_code, t.style_name,
	         b.database_object_name
          INTO   l_style_code,
	         l_style_name,
                 l_database_object_name
          FROM   HZ_STYLES_B b , HZ_STYLES_TL t
          WHERE  b.ROWID = p_rowid
   	  AND t.style_code = b.style_code
	  AND t.language =  userenv('LANG');
Line: 258

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_code',
            p_column_value                          => p_style_rec.style_code,
            x_return_status                         => x_return_status);
Line: 274

      IF p_create_update_flag = 'U' AND
         p_style_rec.style_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'style_code',
          p_column_value           => p_style_rec.style_code,
          p_old_column_value       => l_style_code,
          x_return_status          => x_return_status);
Line: 284

	   hz_utility_v2pub.debug(p_message=>'style_code is non-updateable. ' ||
					     'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 292

      IF p_create_update_flag = 'C' AND
         p_style_rec.style_code IS NOT NULL
      THEN
        BEGIN
          select 'Y' into l_dummy
          from HZ_STYLES_B
          where style_code = p_style_rec.style_code;
Line: 323

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'database_object_name',
            p_column_value                          => p_style_rec.database_object_name,
            x_return_status                         => x_return_status);
Line: 339

      IF p_create_update_flag = 'U' AND
         p_style_rec.database_object_name IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'database_object_name',
          p_column_value           => p_style_rec.database_object_name,
          p_old_column_value       => l_database_object_name,
          x_return_status          => x_return_status);
Line: 349

	   hz_utility_v2pub.debug(p_message=>'database_object_name is non-updateable. ' ||
            'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 363

              SELECT 'Y'
              into   l_dummy
	      FROM   fnd_tables t
	      where  t.table_name = p_style_rec.database_object_name ;
Line: 391

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_name',
            p_column_value                          => p_style_rec.style_name,
            x_return_status                         => x_return_status);
Line: 407

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'style_name',
              p_column_value                          => p_style_rec.style_name,
              x_return_status                         => x_return_status);
Line: 414

	     hz_utility_v2pub.debug(p_message=>'style_name cannot be set to null during update. ' ||
                  'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 423

      IF p_create_update_flag = 'C' OR
         (p_create_update_flag = 'U' AND
	  p_style_rec.style_name is not null AND
	  p_style_rec.style_name <> l_style_name)
      THEN
        BEGIN
          select 'Y' into l_dummy
          from HZ_STYLES_TL
          where style_name = p_style_rec.style_name
	    and language = userenv('LANG');
Line: 493

      p_create_update_flag             IN     VARCHAR2,
      p_style_format_rec               IN     HZ_STYLE_FORMAT_V2PUB.STYLE_FORMAT_REC_TYPE,
      p_rowid                          IN     ROWID,
      x_return_status                  IN OUT NOCOPY VARCHAR2
  )IS
      l_dummy                                 VARCHAR2(1);
Line: 518

      IF (p_create_update_flag = 'U') THEN
          SELECT b.style_format_code,
	         b.style_code,
		 b.default_flag,
		 t.style_format_name
          INTO   l_style_format_code,
	         l_style_code,
                 l_default_flag,
                 l_style_format_name
          FROM   HZ_STYLE_FORMATS_B b , HZ_STYLE_FORMATS_TL t
          WHERE  b.ROWID = p_rowid
   	  AND t.style_format_code = b.style_format_code
	  AND t.language =  userenv('LANG');
Line: 539

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_format_code',
            p_column_value                          => p_style_format_rec.style_format_code,
            x_return_status                         => x_return_status);
Line: 556

      IF p_create_update_flag = 'U' AND
         p_style_format_rec.style_format_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'style_format_code',
          p_column_value           => p_style_format_rec.style_format_code,
          p_old_column_value       => l_style_format_code,
          x_return_status          => x_return_status);
Line: 566

	   hz_utility_v2pub.debug(p_message=>'l_style_format_code is non-updateable. ' ||
					     'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 574

      IF p_create_update_flag = 'C' AND
         p_style_format_rec.style_format_code IS NOT NULL
      THEN
        BEGIN
          select 'Y' into l_dummy
          from HZ_STYLE_FORMATS_B
          where style_format_code = p_style_format_rec.style_format_code;
Line: 605

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_code',
            p_column_value                          => p_style_format_rec.style_code,
            x_return_status                         => x_return_status);
Line: 621

      IF p_create_update_flag = 'U' AND
         p_style_format_rec.style_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'style_code',
          p_column_value           => p_style_format_rec.style_code,
          p_old_column_value       => l_style_code,
          x_return_status          => x_return_status);
Line: 631

	   hz_utility_v2pub.debug(p_message=>'style_code is non-updateable. ' ||
					     'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 641

      IF p_create_update_flag = 'C'
         AND
         p_style_format_rec.style_code IS NOT NULL
         AND
         p_style_format_rec.style_code <> fnd_api.g_miss_CHAR
      THEN
          BEGIN
              SELECT 'Y'
              INTO   l_dummy
              FROM   HZ_STYLES_B
              WHERE  style_code = p_style_format_rec.style_code;
Line: 675

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'default_flag',
            p_column_value                          => p_style_format_rec.default_flag,
            x_return_status                         => x_return_status);
Line: 706

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'default_flag',
              p_column_value                          => p_style_format_rec.default_flag,
              x_return_status                         => x_return_status);
Line: 713

	     hz_utility_v2pub.debug(p_message=>'default_flag cannot be set to null during update. ' ||
                  'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 722

      IF p_create_update_flag = 'U' AND
         p_style_format_rec.default_flag = 'N' AND
         l_default_flag = 'Y'
      THEN
         fnd_message.set_name('AR', 'HZ_STL_FMT_FLAG_NOT_Y_TO_N');
Line: 743

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_format_name',
            p_column_value                          => p_style_format_rec.style_format_name,
            x_return_status                         => x_return_status);
Line: 759

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'style_format_name',
              p_column_value                          => p_style_format_rec.style_format_name,
              x_return_status                         => x_return_status);
Line: 766

	     hz_utility_v2pub.debug(p_message=>'style_format_name cannot be set to null during update. ' ||
                  'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 775

      IF p_create_update_flag = 'C' OR
         (p_create_update_flag = 'U' AND
	  p_style_format_rec.style_format_name is not null AND
	  p_style_format_rec.style_format_name <> l_style_format_name)
      THEN
        BEGIN
          select 'Y' into l_dummy
          from HZ_STYLE_FORMATS_TL
          where style_format_name = p_style_format_rec.style_format_name
	    and language = userenv('LANG');
Line: 846

      p_create_update_flag             IN     VARCHAR2,
      p_style_fmt_locale_rec           IN     HZ_STYLE_FMT_LOCALE_V2PUB.STYLE_FMT_LOCALE_REC_TYPE,
      p_rowid                          IN     ROWID,
      x_return_status                  IN OUT NOCOPY VARCHAR2
  ) IS

      l_dummy                  VARCHAR2(1);
Line: 861

      l_updated_stl_fmt_rec    HZ_STYLE_FMT_LOCALE_V2PUB.STYLE_FMT_LOCALE_REC_TYPE;
Line: 864

        SELECT 'Y'
        FROM   hz_style_fmt_locales hsfl
        WHERE  hsfl.style_fmt_locale_id = p_style_fmt_locale_id;
Line: 881

    IF (p_create_update_flag = 'U') THEN
        SELECT style_fmt_locale_id,
          style_format_code,
          language_code,
          territory_code,
          start_date_active,
          end_date_active
        INTO
          l_style_fmt_locale_id,
          l_style_format_code,
          l_language_code,
          l_territory_code,
          l_start_date_active,
          l_end_date_active
        FROM   HZ_STYLE_FMT_LOCALES
        WHERE  ROWID = p_rowid;
Line: 907

     IF p_create_update_flag = 'C' THEN
      IF p_style_fmt_locale_rec.style_fmt_locale_id IS NOT NULL AND
         p_style_fmt_locale_rec.style_fmt_locale_id <> fnd_api.g_miss_num
      THEN
        OPEN c_dup (p_style_fmt_locale_rec.style_fmt_locale_id);
Line: 943

    IF (p_create_update_flag = 'C') THEN
      HZ_UTILITY_V2PUB.validate_mandatory (
          p_create_update_flag                    => p_create_update_flag,
          p_column                                => 'style_format_code',
          p_column_value                          => p_style_fmt_locale_rec.style_format_code,
          x_return_status                         => x_return_status);
Line: 959

    IF p_create_update_flag = 'U' AND
       p_style_fmt_locale_rec.style_format_code IS NOT NULL
    THEN
      HZ_UTILITY_V2PUB.validate_nonupdateable (
        p_column                 => 'style_format_code',
        p_column_value           => p_style_fmt_locale_rec.style_format_code,
        p_old_column_value       => l_style_format_code,
        x_return_status          => x_return_status);
Line: 969

	   hz_utility_v2pub.debug(p_message=>'style_format_code is non-updateable. ' ||
						'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 980

    IF p_create_update_flag = 'C'
       AND
       p_style_fmt_locale_rec.style_format_code IS NOT NULL
       AND
       p_style_fmt_locale_rec.style_format_code <> fnd_api.g_miss_CHAR
    THEN
        BEGIN
            SELECT 'Y'
            INTO   l_dummy
            FROM   HZ_STYLE_FORMATS_B
            WHERE  style_format_code = p_style_fmt_locale_rec.style_format_code;
Line: 1014

      IF p_create_update_flag = 'U' AND
         p_style_fmt_locale_rec.language_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'language_code',
          p_column_value           => p_style_fmt_locale_rec.language_code,
          p_old_column_value       => l_language_code,
          x_return_status          => x_return_status);
Line: 1024

	   hz_utility_v2pub.debug(p_message=>'language_code is non-updateable. ' ||
				 'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1034

      IF p_create_update_flag = 'C'
         AND
         p_style_fmt_locale_rec.language_code IS NOT NULL
         AND
         p_style_fmt_locale_rec.language_code <> fnd_api.g_miss_CHAR
      THEN
          BEGIN
              SELECT 'Y'
              INTO   l_dummy
              FROM   FND_LANGUAGES
              WHERE  language_code = p_style_fmt_locale_rec.language_code;
Line: 1068

      IF p_create_update_flag = 'U' AND
         p_style_fmt_locale_rec.territory_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'territory_code',
          p_column_value           => p_style_fmt_locale_rec.territory_code,
          p_old_column_value       => l_territory_code,
          x_return_status          => x_return_status);
Line: 1078

	   hz_utility_v2pub.debug(p_message=>'territory_code is non-updateable. ' ||
            'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1088

      IF p_create_update_flag = 'C'
         AND
         p_style_fmt_locale_rec.territory_code IS NOT NULL
         AND
         p_style_fmt_locale_rec.territory_code <> fnd_api.g_miss_CHAR
      THEN
          BEGIN
              SELECT 'Y'
              INTO   l_dummy
              FROM   FND_TERRITORIES
              WHERE  territory_code = p_style_fmt_locale_rec.territory_code;
Line: 1121

      IF p_create_update_flag = 'C' AND
	 not ((p_style_fmt_locale_rec.language_code IS NOT NULL AND
              (p_style_fmt_locale_rec.language_code <> fnd_api.g_miss_char) OR
	      (p_style_fmt_locale_rec.territory_code IS NOT NULL ) AND
  	       p_style_fmt_locale_rec.territory_code <> fnd_api.g_miss_char ) )
      THEN
          FND_MESSAGE.SET_NAME('AR', 'HZ_STL_FMT_LOC_MISSING_COLUMN');
Line: 1146

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'start_date_active',
            p_column_value                          => p_style_fmt_locale_rec.start_date_active,
            x_return_status                         => x_return_status);
Line: 1162

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'start_date_active',
              p_column_value                          => p_style_fmt_locale_rec.start_date_active,
              x_return_status                         => x_return_status);
Line: 1169

	      hz_utility_v2pub.debug(p_message=>'start_date_active cannot be set to null during update. ' ||
						'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1182

    IF (p_create_update_flag = 'C') THEN
      IF p_style_fmt_locale_rec.end_date_active IS NOT NULL AND
         p_style_fmt_locale_rec.end_date_active <> fnd_api.g_miss_date AND
         p_style_fmt_locale_rec.end_date_active < p_style_fmt_locale_rec.start_date_active
      THEN
        fnd_message.set_name('AR', 'HZ_API_START_DATE_GREATER');
Line: 1191

    ELSIF (p_create_update_flag = 'U') THEN
      -- old start_date_active, end_date_active has been selected from table
      -- and put into l_start_date_active, l_end_date_active

      IF p_style_fmt_locale_rec.start_date_active <> fnd_api.g_miss_date
         AND p_style_fmt_locale_rec.start_date_active is not null
      THEN
        l_start_date_active := p_style_fmt_locale_rec.start_date_active;
Line: 1230

      IF p_create_update_flag = 'C' AND
         p_style_fmt_locale_rec.style_format_code IS NOT NULL AND
	 ( p_style_fmt_locale_rec.language_code IS NOT NULL OR
	   p_style_fmt_locale_rec.territory_code IS NOT NULL )
      THEN
        BEGIN
          select style_fmt_locale_id into l_dup_style_fmt_locale_id
          from HZ_STYLE_FMT_LOCALES
          where style_format_code = p_style_fmt_locale_rec.style_format_code AND
	        decode(language_code, null, fnd_api.g_miss_char, language_code) = NVL( p_style_fmt_locale_rec.language_code, fnd_api.g_miss_char) AND
	        decode(territory_code, null, fnd_api.g_miss_char, territory_code) = NVL(p_style_fmt_locale_rec.territory_code, fnd_api.g_miss_char) AND
		NOT ( ( p_style_fmt_locale_rec.end_date_active is not null and
		        p_style_fmt_locale_rec.end_date_active <> fnd_api.g_miss_date and
                        p_style_fmt_locale_rec.end_date_active < start_date_active ) OR
                      ( end_date_active is not null and
                        p_style_fmt_locale_rec.start_date_active > end_date_active )) AND
		rownum =1;
Line: 1264

     ELSIF p_create_update_flag = 'U' AND
          (p_style_fmt_locale_rec.start_date_active is not null OR
	    p_style_fmt_locale_rec.end_date_active is not null )
     THEN
        get_updated_record (
            p_style_fmt_locale_id  => p_style_fmt_locale_rec.style_fmt_locale_id,
            p_update_field_rec     => p_style_fmt_locale_rec,
            x_updated_rec          => l_updated_stl_fmt_rec );
Line: 1274

          select style_fmt_locale_id into l_dup_style_fmt_locale_id
          from HZ_STYLE_FMT_LOCALES
          where style_fmt_locale_id <> l_updated_stl_fmt_rec.style_fmt_locale_id AND
	        style_format_code = l_updated_stl_fmt_rec.style_format_code AND
	        decode(language_code, null, fnd_api.g_miss_char, language_code) = NVL( l_updated_stl_fmt_rec.language_code, fnd_api.g_miss_char) AND
	        decode(territory_code, null, fnd_api.g_miss_char, territory_code) = NVL(l_updated_stl_fmt_rec.territory_code, fnd_api.g_miss_char) AND
		NOT ( ( l_updated_stl_fmt_rec.end_date_active is not null and
                        l_updated_stl_fmt_rec.end_date_active < start_date_active ) OR
                      ( end_date_active is not null and
                        l_updated_stl_fmt_rec.start_date_active > end_date_active )) AND
		rownum =1;
Line: 1352

      p_create_update_flag             IN     VARCHAR2,
      p_style_fmt_variation_rec        IN     HZ_STYLE_FMT_VARIATION_V2PUB.STYLE_FMT_VARIATION_REC_TYPE,
      p_rowid                          IN     ROWID,
      x_return_status                  IN OUT NOCOPY VARCHAR2
  )IS
      l_style_format_code      HZ_STYLE_FMT_VARIATIONS.style_format_code%TYPE;
Line: 1378

    IF (p_create_update_flag = 'U') THEN
        SELECT
          style_format_code,
          variation_number,
          variation_rank,
          start_date_active,
          end_date_active
        INTO
          l_style_format_code,
          l_variation_number,
          l_variation_rank,
          l_start_date_active,
          l_end_date_active
        FROM   HZ_STYLE_FMT_VARIATIONS
        WHERE  ROWID = p_rowid;
Line: 1400

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_format_code',
            p_column_value                          => p_style_fmt_variation_rec.style_format_code,
            x_return_status                         => x_return_status);
Line: 1417

      IF p_create_update_flag = 'U' AND
         p_style_fmt_variation_rec.style_format_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'style_format_code',
          p_column_value           => p_style_fmt_variation_rec.style_format_code,
          p_old_column_value       => l_style_format_code,
          x_return_status          => x_return_status);
Line: 1427

	    hz_utility_v2pub.debug(p_message=>'l_style_format_code is non-updateable. ' ||
						'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1437

      IF p_create_update_flag = 'C'
         AND
         p_style_fmt_variation_rec.style_format_code IS NOT NULL
         AND
         p_style_fmt_variation_rec.style_format_code <> fnd_api.g_miss_CHAR
      THEN
          BEGIN
              SELECT 'Y'
              INTO   l_dummy
              FROM   HZ_STYLE_FORMATS_B
              WHERE  style_format_code = p_style_fmt_variation_rec.style_format_code;
Line: 1470

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'variation_number',
            p_column_value                          => p_style_fmt_variation_rec.variation_number,
            x_return_status                         => x_return_status);
Line: 1487

      IF p_create_update_flag = 'U' AND
         p_style_fmt_variation_rec.variation_number IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'variation_number',
          p_column_value           => p_style_fmt_variation_rec.variation_number,
          p_old_column_value       => l_variation_number,
          x_return_status          => x_return_status);
Line: 1497

	   hz_utility_v2pub.debug(p_message=>'l_variation_number is non-updateable. ' ||
						 'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1505

      IF p_create_update_flag = 'C'
      THEN
        BEGIN
          select 'Y' into l_dummy
          from HZ_STYLE_FMT_VARIATIONS
          where variation_number = p_style_fmt_variation_rec.variation_number
	    and style_format_code = p_style_fmt_variation_rec.style_format_code;
Line: 1531

      IF p_create_update_flag = 'C' AND
         p_style_fmt_variation_rec.variation_number is not null
      THEN
          check_greater_than_zero (
              p_column             => 'variation_number',
              p_column_value       => p_style_fmt_variation_rec.variation_number,
              x_return_status      => x_return_status );
Line: 1553

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'variation_rank',
            p_column_value                          => p_style_fmt_variation_rec.variation_rank,
            x_return_status                         => x_return_status);
Line: 1569

      IF p_create_update_flag = 'C' OR
         (p_create_update_flag = 'U' AND
	  p_style_fmt_variation_rec.variation_rank is not null AND
	  p_style_fmt_variation_rec.variation_rank <> l_variation_rank)
      THEN
        BEGIN
          select 'Y' into l_dummy
          from HZ_STYLE_FMT_VARIATIONS
          where variation_rank = p_style_fmt_variation_rec.variation_rank
	    and style_format_code = p_style_fmt_variation_rec.style_format_code;
Line: 1598

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'variation_rank',
              p_column_value                          => p_style_fmt_variation_rec.variation_rank,
              x_return_status                         => x_return_status);
Line: 1605

		 hz_utility_v2pub.debug(p_message=>'variation_rank cannot be set to null during update. ' ||
						'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1614

      IF (p_create_update_flag = 'C' AND
          p_style_fmt_variation_rec.variation_rank is not null ) OR
         (p_create_update_flag = 'U' AND
	  p_style_fmt_variation_rec.variation_rank is not null AND
	  p_style_fmt_variation_rec.variation_rank <> fnd_api.g_miss_num AND
	  p_style_fmt_variation_rec.variation_rank <> l_variation_rank)
      THEN
          check_greater_than_zero (
              p_column             => 'variation_rank',
              p_column_value       => p_style_fmt_variation_rec.variation_rank,
              x_return_status      => x_return_status );
Line: 1638

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'start_date_active',
            p_column_value                          => p_style_fmt_variation_rec.start_date_active,
            x_return_status                         => x_return_status);
Line: 1654

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'start_date_active',
              p_column_value                          => p_style_fmt_variation_rec.start_date_active,
              x_return_status                         => x_return_status);
Line: 1661

	      hz_utility_v2pub.debug(p_message=>'start_date_active cannot be set to null during update. ' ||
                  'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1674

      IF (p_create_update_flag = 'C') THEN
        IF p_style_fmt_variation_rec.end_date_active IS NOT NULL AND
           p_style_fmt_variation_rec.end_date_active <> fnd_api.g_miss_date AND
           p_style_fmt_variation_rec.end_date_active < p_style_fmt_variation_rec.start_date_active
        THEN
          fnd_message.set_name('AR', 'HZ_API_START_DATE_GREATER');
Line: 1683

      ELSIF (p_create_update_flag = 'U') THEN
        -- old start_date_active, end_date_active has been selected from table
        -- and put into l_start_date_active, l_end_date_active

        IF p_style_fmt_variation_rec.start_date_active <> fnd_api.g_miss_date
           AND p_style_fmt_variation_rec.start_date_active is not null
        THEN
          l_start_date_active := p_style_fmt_variation_rec.start_date_active;
Line: 1759

      p_create_update_flag             IN     VARCHAR2,
      p_style_fmt_layout_rec           IN     HZ_STYLE_FMT_LAYOUT_V2PUB.STYLE_FMT_LAYOUT_REC_TYPE,
      p_rowid                          IN     ROWID,
      x_return_status                  IN OUT NOCOPY VARCHAR2
  )  IS

      l_dummy                    VARCHAR2(1);
Line: 1782

      l_updated_stl_fmt_layout_rec  HZ_STYLE_FMT_LAYOUT_V2PUB.STYLE_FMT_LAYOUT_REC_TYPE;
Line: 1788

        SELECT 'Y'
        FROM   hz_style_fmt_layouts_b hsfl
        WHERE  hsfl.style_fmt_layout_id = p_style_fmt_layout_id;
Line: 1804

    IF (p_create_update_flag = 'U') THEN
        SELECT
          style_fmt_layout_id,
          style_format_code,
          variation_number,
          attribute_code,
          attribute_application_id,
          line_number,
          position,
          mandatory_flag,
          use_initial_flag,
          uppercase_flag,
          blank_lines_before,
          blank_lines_after,
          start_date_active,
          end_date_active
        INTO
          l_style_fmt_layout_id,
          l_style_format_code,
          l_variation_number,
          l_attribute_code,
          l_attribute_application_id,
          l_line_number,
          l_position,
          l_mandatory_flag,
          l_use_initial_flag,
          l_uppercase_flag,
          l_blank_lines_before,
          l_blank_lines_after,
          l_start_date_active,
          l_end_date_active
        FROM   HZ_STYLE_FMT_LAYOUTS_B
        WHERE  ROWID = p_rowid;
Line: 1838

        get_updated_record (
            p_style_fmt_layout_id  => p_style_fmt_layout_rec.style_fmt_layout_id,
            p_update_field_rec     => p_style_fmt_layout_rec,
            x_updated_rec          => l_updated_stl_fmt_layout_rec );
Line: 1853

     IF p_create_update_flag = 'C' THEN
      IF p_style_fmt_layout_rec.style_fmt_layout_id IS NOT NULL AND
         p_style_fmt_layout_rec.style_fmt_layout_id <> fnd_api.g_miss_num
      THEN
        OPEN c_dup (p_style_fmt_layout_rec.style_fmt_layout_id);
Line: 1888

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'style_format_code',
            p_column_value                          => p_style_fmt_layout_rec.style_format_code,
            x_return_status                         => x_return_status);
Line: 1905

      IF p_create_update_flag = 'U' AND
         p_style_fmt_layout_rec.style_format_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'style_format_code',
          p_column_value           => p_style_fmt_layout_rec.style_format_code,
          p_old_column_value       => l_style_format_code,
          x_return_status          => x_return_status);
Line: 1915

	   hz_utility_v2pub.debug(p_message=>'l_style_format_code is non-updateable. ' ||
            'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1927

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'variation_number',
            p_column_value                          => p_style_fmt_layout_rec.variation_number,
            x_return_status                         => x_return_status);
Line: 1944

      IF p_create_update_flag = 'U' AND
         p_style_fmt_layout_rec.variation_number IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'variation_number',
          p_column_value           => p_style_fmt_layout_rec.variation_number,
          p_old_column_value       => l_variation_number,
          x_return_status          => x_return_status);
Line: 1954

	   hz_utility_v2pub.debug(p_message=>'l_variation_number is non-updateable. ' ||
            'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 1962

      IF p_create_update_flag = 'C' AND
         p_style_fmt_layout_rec.variation_number is not null
      THEN
          check_greater_than_zero (
              p_column             => 'variation_number',
              p_column_value       => p_style_fmt_layout_rec.variation_number,
              x_return_status      => x_return_status );
Line: 1984

      IF p_create_update_flag = 'C'  AND
         p_style_fmt_layout_rec.style_format_code IS NOT NULL AND
         p_style_fmt_layout_rec.style_format_code <> fnd_api.g_miss_CHAR AND
         p_style_fmt_layout_rec.variation_number IS NOT NULL AND
         p_style_fmt_layout_rec.variation_number <> fnd_api.g_miss_num

      THEN
          BEGIN
              SELECT 'Y'
              INTO   l_dummy
              FROM   HZ_STYLE_FMT_VARIATIONS
              WHERE  style_format_code = p_style_fmt_layout_rec.style_format_code AND
	             variation_number = p_style_fmt_layout_rec.variation_number;
Line: 2000

                  SELECT 'Y'
                  INTO   l_dummy
                  FROM   HZ_STYLE_FMT_VARIATIONS
                  WHERE  style_format_code = p_style_fmt_layout_rec.style_format_code AND
                         variation_number = p_style_fmt_layout_rec.variation_number AND
    		         p_style_fmt_layout_rec.start_date_active
    		             BETWEEN start_date_active AND NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')) AND
          		     (decode(p_style_fmt_layout_rec.end_date_active, null, to_date('12/31/4712','MM/DD/YYYY'),
    		              fnd_api.g_miss_date, to_date('12/31/4712','MM/DD/YYYY'), p_style_fmt_layout_rec.end_date_active)
    		             BETWEEN start_date_active
                             AND    NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')));
Line: 2039

      ELSIF  p_create_update_flag = 'U'  AND
             x_return_status = fnd_api.g_ret_sts_success
      THEN
          BEGIN
              SELECT 'Y'
              INTO   l_dummy
              FROM   HZ_STYLE_FMT_VARIATIONS
              WHERE  style_format_code = l_updated_stl_fmt_layout_rec.style_format_code AND
	             variation_number = l_updated_stl_fmt_layout_rec.variation_number AND
		     l_updated_stl_fmt_layout_rec.start_date_active BETWEEN start_date_active
                      AND    NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')) AND
      		     (decode(l_updated_stl_fmt_layout_rec.end_date_active, null, to_date('12/31/4712','MM/DD/YYYY'),
		             fnd_api.g_miss_date, to_date('12/31/4712','MM/DD/YYYY'), l_updated_stl_fmt_layout_rec.end_date_active)
		      BETWEEN start_date_active
                      AND    NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')));
Line: 2076

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'attribute_code',
            p_column_value                          => p_style_fmt_layout_rec.attribute_code,
            x_return_status                         => x_return_status);
Line: 2092

      IF p_create_update_flag = 'U' AND
         p_style_fmt_layout_rec.attribute_code IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'attribute_code',
          p_column_value           => p_style_fmt_layout_rec.attribute_code,
          p_old_column_value       => l_attribute_code,
          x_return_status          => x_return_status);
Line: 2102

	   hz_utility_v2pub.debug(p_message=>'attribute_code is non-updateable. ' ||
            'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2114

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'attribute_application_id',
            p_column_value                          => p_style_fmt_layout_rec.attribute_application_id,
            x_return_status                         => x_return_status);
Line: 2131

      IF p_create_update_flag = 'U' AND
         p_style_fmt_layout_rec.attribute_application_id IS NOT NULL
      THEN
        HZ_UTILITY_V2PUB.validate_nonupdateable (
          p_column                 => 'attribute_application_id',
          p_column_value           => p_style_fmt_layout_rec.attribute_application_id,
          p_old_column_value       => l_attribute_application_id,
          x_return_status          => x_return_status);
Line: 2140

	   hz_utility_v2pub.debug(p_message=>'attribute_application_id is non-updateable. ' ||
		'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2154

         p_create_update_flag = 'C'  AND
         p_style_fmt_layout_rec.attribute_code IS NOT NULL AND
         p_style_fmt_layout_rec.attribute_code <> fnd_api.g_miss_CHAR
--         p_style_fmt_layout_rec.attribute_application_id IS NOT NULL AND
--         p_style_fmt_layout_rec.attribute_application_id <> fnd_api.g_miss_num
      THEN
          BEGIN
              SELECT database_object_name
              INTO   l_database_object_name
              FROM   hz_style_formats_b sf, hz_styles_b s
              WHERE  sf.style_format_code = p_style_fmt_layout_rec.style_format_code AND
	             s.style_code = sf.style_code;
Line: 2167

              SELECT 'Y'
              into   l_dummy
	      FROM   fnd_columns c, fnd_tables t
	      where  t.table_name = l_database_object_name AND
                     t.table_id = c.table_id AND
                     c.application_id = t.application_id AND --Bug No.4942505. SQLID:14450634
		     c.column_name = p_style_fmt_layout_rec.attribute_code;
Line: 2200

      IF p_create_update_flag = 'C' AND
         p_style_fmt_layout_rec.style_format_code IS NOT NULL AND
         p_style_fmt_layout_rec.variation_number IS NOT NULL AND
         p_style_fmt_layout_rec.attribute_code IS NOT NULL AND
         p_style_fmt_layout_rec.attribute_application_id IS NOT NULL
      THEN
        BEGIN
          select style_fmt_layout_id into l_dup_style_fmt_layout_id
          from HZ_STYLE_FMT_LAYOUTS_B
          where style_format_code = p_style_fmt_layout_rec.style_format_code AND
                variation_number = p_style_fmt_layout_rec.variation_number AND
                attribute_code = p_style_fmt_layout_rec.attribute_code AND
                attribute_application_id = p_style_fmt_layout_rec.attribute_application_id AND
		NOT ( ( p_style_fmt_layout_rec.end_date_active is not null and
		        p_style_fmt_layout_rec.end_date_active <> fnd_api.g_miss_date and
                        p_style_fmt_layout_rec.end_date_active < start_date_active ) OR
                      ( end_date_active is not null and
                        p_style_fmt_layout_rec.start_date_active > end_date_active )) AND
		rownum =1;
Line: 2236

     ELSIF p_create_update_flag = 'U' AND
          (p_style_fmt_layout_rec.start_date_active is not null OR
	    p_style_fmt_layout_rec.end_date_active is not null )
     THEN

        BEGIN
          select style_fmt_layout_id into l_dup_style_fmt_layout_id
          from HZ_STYLE_FMT_LAYOUTS_B
          where style_fmt_layout_id <> l_updated_stl_fmt_layout_rec.style_fmt_layout_id AND
	        style_format_code = l_updated_stl_fmt_layout_rec.style_format_code AND
	        variation_number = l_updated_stl_fmt_layout_rec.variation_number AND
	        attribute_code = l_updated_stl_fmt_layout_rec.attribute_code AND
	        attribute_application_id = l_updated_stl_fmt_layout_rec.attribute_application_id AND
		NOT ( ( l_updated_stl_fmt_layout_rec.end_date_active is not null and
                        l_updated_stl_fmt_layout_rec.end_date_active < start_date_active ) OR
                      ( end_date_active is not null and
                        l_updated_stl_fmt_layout_rec.start_date_active > end_date_active )) AND
		rownum =1;
Line: 2277

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'line_number ',
            p_column_value                          => p_style_fmt_layout_rec.line_number ,
            x_return_status                         => x_return_status);
Line: 2309

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'line_number',
              p_column_value                          => p_style_fmt_layout_rec.line_number,
              x_return_status                         => x_return_status);
Line: 2315

		hz_utility_v2pub.debug(p_message=>'line_number cannot be set to null during update. ' ||
						'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2328

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'position ',
            p_column_value                          => p_style_fmt_layout_rec.position  ,
            x_return_status                         => x_return_status);
Line: 2359

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'position',
              p_column_value                          => p_style_fmt_layout_rec.position,
              x_return_status                         => x_return_status);
Line: 2365

		hz_utility_v2pub.debug(p_message=>'position cannot be set to null during update. ' ||
				'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2381

      IF p_create_update_flag = 'C' AND
         p_style_fmt_layout_rec.style_format_code IS NOT NULL AND
         p_style_fmt_layout_rec.variation_number IS NOT NULL AND
         p_style_fmt_layout_rec.line_number IS NOT NULL AND
         p_style_fmt_layout_rec.position IS NOT NULL
      THEN
        BEGIN
          select style_fmt_layout_id into l_dup_style_fmt_layout_id
          from HZ_STYLE_FMT_LAYOUTS_B
          where style_format_code = p_style_fmt_layout_rec.style_format_code AND
                variation_number = p_style_fmt_layout_rec.variation_number AND
                line_number = p_style_fmt_layout_rec.line_number AND
                position = p_style_fmt_layout_rec.position AND
		NOT ( ( p_style_fmt_layout_rec.end_date_active is not null and
		        p_style_fmt_layout_rec.end_date_active <> fnd_api.g_miss_date and
                        p_style_fmt_layout_rec.end_date_active < start_date_active ) OR
                      ( end_date_active is not null and
                        p_style_fmt_layout_rec.start_date_active > end_date_active )) AND
		rownum =1;
Line: 2417

     ELSIF p_create_update_flag = 'U' AND
          (p_style_fmt_layout_rec.start_date_active is not null OR
	    p_style_fmt_layout_rec.end_date_active is not null )
     THEN

        BEGIN
          select style_fmt_layout_id into l_dup_style_fmt_layout_id
          from HZ_STYLE_FMT_LAYOUTS_B
          where style_fmt_layout_id <> l_updated_stl_fmt_layout_rec.style_fmt_layout_id AND
	        style_format_code = l_updated_stl_fmt_layout_rec.style_format_code AND
	        variation_number = l_updated_stl_fmt_layout_rec.variation_number AND
	        line_number = l_updated_stl_fmt_layout_rec.line_number AND
	        position = l_updated_stl_fmt_layout_rec.position AND
		NOT ( ( l_updated_stl_fmt_layout_rec.end_date_active is not null and
                        l_updated_stl_fmt_layout_rec.end_date_active < start_date_active ) OR
                      ( end_date_active is not null and
                        l_updated_stl_fmt_layout_rec.start_date_active > end_date_active )) AND
		rownum =1;
Line: 2458

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'mandatory_flag',
            p_column_value                          => p_style_fmt_layout_rec.mandatory_flag   ,
            x_return_status                         => x_return_status);
Line: 2474

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'mandatory_flag',
              p_column_value                          => p_style_fmt_layout_rec.mandatory_flag,
              x_return_status                         => x_return_status);
Line: 2481

	     hz_utility_v2pub.debug(p_message=>'mandatory_flag cannot be set to null during update. ' ||
				'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2509

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'use_initial_flag',
            p_column_value                          => p_style_fmt_layout_rec.use_initial_flag   ,
            x_return_status                         => x_return_status);
Line: 2524

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'use_initial_flag',
              p_column_value                          => p_style_fmt_layout_rec.use_initial_flag,
              x_return_status                         => x_return_status);
Line: 2531

	     hz_utility_v2pub.debug(p_message=>'use_initial_flag cannot be set to null during update. ' ||
					       'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2559

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'uppercase_flag',
            p_column_value                          => p_style_fmt_layout_rec.uppercase_flag   ,
            x_return_status                         => x_return_status);
Line: 2575

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'uppercase_flag',
              p_column_value                          => p_style_fmt_layout_rec.uppercase_flag,
              x_return_status                         => x_return_status);
Line: 2582

	     hz_utility_v2pub.debug(p_message=>'uppercase_flag cannot be set to null during update. ' ||
			 'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2648

      IF (p_create_update_flag = 'C') THEN
        HZ_UTILITY_V2PUB.validate_mandatory (
            p_create_update_flag                    => p_create_update_flag,
            p_column                                => 'start_date_active',
            p_column_value                          => p_style_fmt_layout_rec.start_date_active,
            x_return_status                         => x_return_status);
Line: 2664

      IF p_create_update_flag = 'U' THEN
          HZ_UTILITY_V2PUB.validate_cannot_update_to_null (
              p_column                                => 'start_date_active',
              p_column_value                          => p_style_fmt_layout_rec.start_date_active,
              x_return_status                         => x_return_status);
Line: 2671

	     hz_utility_v2pub.debug(p_message=>'start_date_active cannot be set to null during update. ' ||
                  'x_return_status = ' || x_return_status,
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 2684

      IF (p_create_update_flag = 'C') THEN
        IF p_style_fmt_layout_rec.end_date_active IS NOT NULL AND
           p_style_fmt_layout_rec.end_date_active <> fnd_api.g_miss_date AND
           p_style_fmt_layout_rec.end_date_active < p_style_fmt_layout_rec.start_date_active
        THEN
          fnd_message.set_name('AR', 'HZ_API_START_DATE_GREATER');
Line: 2693

      ELSIF (p_create_update_flag = 'U') THEN
        -- old start_date_active, end_date_active has been selected from table
        -- and put into l_start_date_active, l_end_date_active

        IF p_style_fmt_layout_rec.start_date_active <> fnd_api.g_miss_date
           AND p_style_fmt_layout_rec.start_date_active is not null
        THEN
          l_start_date_active := p_style_fmt_layout_rec.start_date_active;