DBA Data[Home] [Help]

APPS.OKC_TERMS_SECTIONS_GRP SQL Statements

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

Line: 29

  G_AMEND_CODE_DELETED         CONSTANT   VARCHAR2(30) := 'DELETED';
Line: 31

  G_AMEND_CODE_UPDATED         CONSTANT   VARCHAR2(30) := 'UPDATED';
Line: 310

    OKC_TERMS_SECTIONS_PVT.insert_row(
      p_validation_level           => p_validation_level,
      x_return_status              => x_return_status,
      p_id                         => p_id,
      p_section_sequence           => p_section_sequence,
      p_label                      => p_label,
      p_scn_id                     => p_scn_id,
      p_heading                    => p_heading,
      p_description                => p_description,
      p_document_type              => p_document_type,
      p_document_id                => p_document_id,
      p_scn_code                   => p_scn_code,
      p_amendment_description      => l_amendment_description,
      p_amendment_operation_code   => l_amendment_operation_code,
      p_summary_amend_operation_code => l_summary_amend_operation_code,
      p_orig_system_reference_code => p_orig_system_reference_code,
      p_orig_system_reference_id1  => p_orig_system_reference_id1,
      p_orig_system_reference_id2  => p_orig_system_reference_id2,
      p_print_yn                   => p_print_yn,
      p_attribute_category         => p_attribute_category,
      p_attribute1                 => p_attribute1,
      p_attribute2                 => p_attribute2,
      p_attribute3                 => p_attribute3,
      p_attribute4                 => p_attribute4,
      p_attribute5                 => p_attribute5,
      p_attribute6                 => p_attribute6,
      p_attribute7                 => p_attribute7,
      p_attribute8                 => p_attribute8,
      p_attribute9                 => p_attribute9,
      p_attribute10                => p_attribute10,
      p_attribute11                => p_attribute11,
      p_attribute12                => p_attribute12,
      p_attribute13                => p_attribute13,
      p_attribute14                => p_attribute14,
      p_attribute15                => p_attribute15,
      x_id                         => x_id
    );
Line: 426

  PROCEDURE update_section(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2 ,
    p_validation_level	           IN NUMBER,
    p_validate_commit              IN VARCHAR2,
    p_validation_string            IN VARCHAR2,
    p_commit                       IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_mode                       IN VARCHAR2 , --'AMEND' or 'NORMAL'
    p_id                         IN NUMBER,
    p_section_sequence           IN NUMBER,
    p_label                      IN VARCHAR2,
    p_scn_id                     IN NUMBER,
    p_heading                    IN VARCHAR2,
    p_description                IN VARCHAR2,
    p_document_type              IN VARCHAR2,
    p_document_id                IN NUMBER,
    p_scn_code                   IN VARCHAR2,
    p_amendment_description      IN VARCHAR2,
    p_orig_system_reference_code IN VARCHAR2,
    p_orig_system_reference_id1  IN NUMBER,
    p_orig_system_reference_id2  IN NUMBER,
    p_print_yn                   IN VARCHAR2,
    p_attribute_category         IN VARCHAR2,
    p_attribute1                 IN VARCHAR2,
    p_attribute2                 IN VARCHAR2,
    p_attribute3                 IN VARCHAR2,
    p_attribute4                 IN VARCHAR2,
    p_attribute5                 IN VARCHAR2,
    p_attribute6                 IN VARCHAR2,
    p_attribute7                 IN VARCHAR2,
    p_attribute8                 IN VARCHAR2,
    p_attribute9                 IN VARCHAR2,
    p_attribute10                IN VARCHAR2,
    p_attribute11                IN VARCHAR2,
    p_attribute12                IN VARCHAR2,
    p_attribute13                IN VARCHAR2,
    p_attribute14                IN VARCHAR2,
    p_attribute15                IN VARCHAR2,
    p_object_version_number      IN NUMBER,
    p_lock_terms_yn              IN VARCHAR2
   ) IS

    l_api_version                  CONSTANT NUMBER := 1;
Line: 472

    l_api_name                     CONSTANT VARCHAR2(30) := 'g_update_section';
Line: 487

    SELECT DOCUMENT_ID,DOCUMENT_TYPE,orig_system_reference_id1 FROM OKC_SECTIONS_B
    WHERE ID=P_ID;
Line: 491

    SELECT SUMMARY_AMEND_OPERATION_CODE ,amendment_operation_code
    FROM OKC_SECTIONS_B
    WHERE ID=P_ID;
Line: 498

       okc_debug.log('1600: Entered update_section', 2);
Line: 503

     	   G_PKG_NAME, '1600: Entered update_section' );
Line: 507

    SAVEPOINT g_update_section_GRP;
Line: 563

       l_amendment_operation_code := nvl(l_existing_operation_code,G_AMEND_CODE_UPDATED);
Line: 566

   p_amend_operation_code=>G_AMEND_CODE_UPDATED);
Line: 580

         AND  l_amendment_operation_code = G_AMEND_CODE_UPDATED
         AND  p_lock_terms_yn = 'Y'
         AND  l_orig_system_reference_id1 IS NOT null
        )
    THEN

       okc_k_entity_locks_grp.lock_entity
                      ( p_api_version     => 1,
                       p_init_msg_list    => FND_API.G_FALSE ,
                       p_commit           => FND_API.G_FALSE,
                       p_entity_name      => okc_k_entity_locks_grp.G_SECTION_ENTITY,
                       p_entity_pk1       => To_Char(l_orig_system_reference_id1),
                       P_LOCK_BY_ENTITY_ID => p_id,
                       p_LOCK_BY_DOCUMENT_TYPE => l_document_type,
                       p_LOCK_BY_DOCUMENT_ID => l_document_id,
                       X_RETURN_STATUS => X_RETURN_STATUS,
                       X_MSG_COUNT => X_MSG_COUNT,
                       X_MSG_DATA => X_MSG_DATA
                      );
Line: 612

    OKC_TERMS_SECTIONS_PVT.update_row(
      p_validation_level           => p_validation_level,
      x_return_status              => x_return_status,
      p_id                         => p_id,
      p_section_sequence           => p_section_sequence,
      p_label                      => p_label,
      p_scn_id                     => p_scn_id,
      p_heading                    => p_heading,
      p_description                => p_description,
      p_document_type              => p_document_type,
      p_document_id                => p_document_id,
      p_scn_code                   => p_scn_code,
      p_amendment_description      => l_amendment_description,
      p_amendment_operation_code   => l_amendment_operation_code,
      p_summary_amend_operation_code => l_summary_amend_operation_code,
      p_orig_system_reference_code => p_orig_system_reference_code,
      p_orig_system_reference_id1  => p_orig_system_reference_id1,
      p_orig_system_reference_id2  => p_orig_system_reference_id2,
      p_print_yn                   => p_print_yn,
      p_attribute_category         => p_attribute_category,
      p_attribute1                 => p_attribute1,
      p_attribute2                 => p_attribute2,
      p_attribute3                 => p_attribute3,
      p_attribute4                 => p_attribute4,
      p_attribute5                 => p_attribute5,
      p_attribute6                 => p_attribute6,
      p_attribute7                 => p_attribute7,
      p_attribute8                 => p_attribute8,
      p_attribute9                 => p_attribute9,
      p_attribute10                => p_attribute10,
      p_attribute11                => p_attribute11,
      p_attribute12                => p_attribute12,
      p_attribute13                => p_attribute13,
      p_attribute14                => p_attribute14,
      p_attribute15                => p_attribute15,
      p_object_version_number      => p_object_version_number
    );
Line: 665

      okc_debug.log('1800: Leaving update_section', 2);
Line: 670

  	    G_PKG_NAME, '1800: Leaving update_section' );
Line: 676

         okc_debug.log('1900: Leaving update_section: OKC_API.G_EXCEPTION_ERROR Exception', 2);
Line: 681

	      G_PKG_NAME, '1900: Leaving update_section: OKC_API.G_EXCEPTION_ERROR Exception' );
Line: 688

      ROLLBACK TO g_update_section_GRP;
Line: 694

         okc_debug.log('2000: Leaving update_section: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
Line: 699

	      G_PKG_NAME, '2000: Leaving update_section: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception' );
Line: 706

      ROLLBACK TO g_update_section_GRP;
Line: 712

        okc_debug.log('2100: Leaving update_section because of EXCEPTION: '||sqlerrm, 2);
Line: 717

	      G_PKG_NAME, '2100: Leaving update_section because of EXCEPTION: '||sqlerrm );
Line: 730

      ROLLBACK TO g_update_section_GRP;
Line: 738

  END update_section;
Line: 810

    SELECT id,
           'SECTION' object_type,
           object_version_number,
           section_sequence display_sequence,
           scn_id
    FROM okc_sections_b
    WHERE document_type=p_document_type
    AND   document_id  = p_document_id
    AND ( (b_scn_id IS NOT NULL AND scn_id=b_scn_id) OR
            (b_scn_id IS NULL AND scn_id IS NULL)
          )
    UNION ALL
    SELECT id,
           'ARTICLE' object_type,
           object_version_number,
           display_sequence,
           scn_id
    FROM okc_k_articles_b
    WHERE document_type=p_document_type
    AND   document_id  = p_document_id
    AND ( (b_scn_id IS NOT NULL AND scn_id=b_scn_id) OR
            (b_scn_id IS NULL AND scn_id IS NULL)
          )
    ORDER BY display_sequence;
Line: 837

select scn_id from okc_sections_b
where document_type=p_document_type
    AND   document_id  = p_document_id
    AND   id=p_ref_scn_id;
Line: 845

    SELECT nvl(max(SECTION_SEQUENCE),0) FROM OKC_SECTIONS_B
    WHERE  document_type=p_document_type
    AND    document_id=p_document_id
    and     (
               (b_scn_id is Null and scn_id is Null)
                 OR
               (b_scn_id is Not Null and scn_id=b_scn_id));
Line: 853

    SELECT nvl(max(DISPLAY_SEQUENCE),0) FROM OKC_K_ARTICLES_B
    WHERE  document_type=p_document_type
    AND    document_id=p_document_id
    and    scn_id     =b_scn_id;
Line: 859

   SELECT id,object_version_number
          FROM OKC_K_ARTICLES_B
          WHERE SCN_ID=b_scn_id
          AND   display_sequence >= b_ref_sequence
          Order by display_sequence;
Line: 961

   scn_tbl.delete;
Line: 1075

                 OKC_TERMS_SECTIONS_GRP.update_section(
                       p_api_version          =>1,
                       p_init_msg_list        => OKC_API.G_FALSE,
                       x_return_status        => x_return_status,
                       x_msg_count            => x_msg_count,
                       x_msg_data             => x_msg_data,
                       p_mode                 => 'NORMAL',
                       p_id                   => scn_tbl(k).id,
                       p_section_sequence     => l_sequence,
                       p_object_version_number => scn_tbl(k).object_version_number
                                                );
Line: 1098

                 OKC_K_ARTICLES_GRP.update_article(
                       p_api_version           =>1,
                       p_init_msg_list         => OKC_API.G_FALSE,
                       x_return_status         => x_return_status,
                       x_msg_count             => x_msg_count,
                       x_msg_data              => x_msg_data,
                       p_mode                 => 'NORMAL',
                       p_id                    => scn_tbl(k).id,
                       p_display_sequence      => l_sequence,
                       p_object_version_number => scn_tbl(k).object_version_number
                                                );
Line: 1366

  PROCEDURE delete_section(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    p_validate_commit              IN VARCHAR2,
    p_validation_string            IN VARCHAR2,
    p_commit                       IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_mode                         IN VARCHAR2,
    p_super_user_yn                IN VARCHAR2,
    p_amendment_description        IN VARCHAR2,
    p_id                           IN NUMBER,
    p_object_version_number        IN NUMBER,
    p_lock_terms_yn                IN VARCHAR2
  ) IS

    l_api_version                  CONSTANT NUMBER := 1;
Line: 1384

    l_api_name                     CONSTANT VARCHAR2(30) := 'g_delete_section';
Line: 1394

    l_delete_rec                 BOOLEAN :=FALSE;
Line: 1400

    SELECT DOCUMENT_ID,DOCUMENT_TYPE,orig_system_reference_id1 FROM OKC_SECTIONS_B
    WHERE ID=P_ID;
Line: 1404

    SELECT ID,OBJECT_VERSION_NUMBER FROM OKC_SECTIONS_B
    WHERE SCN_ID=b_scn_id;
Line: 1408

    SELECT ID,OBJECT_VERSION_NUMBER FROM OKC_K_ARTICLES_B
    WHERE SCN_ID=b_scn_id;
Line: 1412

    SELECT SUMMARY_AMEND_OPERATION_CODE,AMENDMENT_OPERATION_CODE FROM OKC_SECTIONS_B
    WHERE ID=P_ID;
Line: 1419

       okc_debug.log('2200: Entered delete_section', 2);
Line: 1424

            G_PKG_NAME, '2200: Entered delete_section' );
Line: 1428

    SAVEPOINT g_delete_section_GRP;
Line: 1486

           okc_debug.log('2220: Calling Delete API to delete Section '|| l_scn_id , 2);
Line: 1491

 	      G_PKG_NAME, '2220: Calling Delete API to delete Section '|| l_scn_id );
Line: 1494

      OKC_TERMS_SECTIONS_GRP.delete_section(
                                      p_api_version       => p_api_version,
                                      p_init_msg_list     => FND_API.G_FALSE,
                                      p_commit            => FND_API.G_FALSE,
                                      x_return_status     => x_return_status,
                                      x_msg_count         => x_msg_count,
                                      x_msg_data          => x_msg_data,
                                      p_mode              => p_mode,
                                      p_id                => l_scn_id,
                                      p_amendment_description => NULL,
                                      p_object_version_number => l_ovn
                                      );
Line: 1515

                okc_debug.log('2230: Section '|| l_scn_id||' deleted' , 2);
Line: 1520

 	        G_PKG_NAME, '2230: Section '|| l_scn_id||' deleted' );
Line: 1529

         okc_debug.log('2230: Going to delete Articles of section '|| p_id , 2);
Line: 1534

             G_PKG_NAME, '2230: Going to delete Articles of section '|| p_id  );
Line: 1540

     OKC_K_ARTICLES_GRP.delete_article(
                               p_api_version           => l_api_version,
                               p_init_msg_list         => FND_API.G_FALSE,
                               p_validate_commit       => FND_API.G_FALSE,
                               p_validation_string   => Null,
                               p_commit                => FND_API.G_FALSE,
                               x_return_status         => x_return_status,
                               x_msg_count             => x_msg_count,
                               x_msg_data              => x_msg_data,
                               p_mode                  => p_mode,
                               p_super_user_yn         => l_super_user_yn,
                               p_id                    => l_article_rec.id,
                               p_amendment_description => NULL,
                               p_object_version_number => l_article_rec.object_version_number,
                               p_lock_terms_yn         => p_lock_terms_yn );
Line: 1565

           okc_debug.log('2240: Articles of section '|| p_id||' deleted' , 2);
Line: 1570

             G_PKG_NAME, '2240: Articles of section '|| p_id||' deleted' );
Line: 1583

          p_amend_operation_code=>G_AMEND_CODE_DELETED);
Line: 1624

             OKC_TERMS_SECTIONS_PVT.update_row(
                    x_return_status            => x_return_status,
                    p_id                       => p_id,
                    p_amendment_description    => p_amendment_description,
                    p_amendment_operation_code => G_AMEND_CODE_DELETED,
                    p_summary_amend_operation_code => l_summary_amend_operation_code,
                    p_object_version_number    => p_object_version_number
                  );
Line: 1641

           l_delete_rec := TRUE;
Line: 1645

   IF p_mode<>'AMEND' or l_delete_rec THEN
       -- Following Code will delete  the section

       OKC_TERMS_SECTIONS_PVT.delete_row(
              x_return_status              => x_return_status,
              p_id                         => p_id,
              p_object_version_number      => p_object_version_number
                                     );
Line: 1670

       okc_debug.log('2300: Leaving delete_section', 2);
Line: 1675

             G_PKG_NAME, '2300: Leaving delete_section' );
Line: 1681

         okc_debug.log('2400: Leaving delete_section: OKC_API.G_EXCEPTION_ERROR Exception', 2);
Line: 1686

   	     G_PKG_NAME, '2400: Leaving delete_section: OKC_API.G_EXCEPTION_ERROR Exception' );
Line: 1701

      ROLLBACK TO g_delete_section_GRP;
Line: 1707

         okc_debug.log('2500: Leaving delete_section: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
Line: 1712

   	     G_PKG_NAME, '2500: Leaving delete_section: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception' );
Line: 1727

      ROLLBACK TO g_delete_section_GRP;
Line: 1733

        okc_debug.log('2600: Leaving delete_section because of EXCEPTION: '||sqlerrm, 2);
Line: 1738

   	     G_PKG_NAME, '2600: Leaving delete_section because of EXCEPTION: '||sqlerrm );
Line: 1760

      ROLLBACK TO g_delete_section_GRP;
Line: 1767

  END delete_section;