DBA Data[Home] [Help]

APPS.OKC_TERMS_MULTIREC_GRP SQL Statements

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

Line: 29

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

    SELECT ID,SECTION_SEQUENCE DISPLAY_SEQ,'SECTION' obj_type
    FROM   OKC_SECTIONS_B
    WHERE  document_type = p_doc_type
    AND    document_id   = p_doc_id
    AND    scn_id=b_scn_id
    UNION ALL
    SELECT ID,DISPLAY_SEQUENCE DISPLAY_SEQ,'ARTICLE' obj_type
    FROM   OKC_K_ARTICLES_B
    WHERE  document_type = p_doc_type
    AND    document_id   = p_doc_id
    AND    scn_id=b_scn_id
    ORDER  BY 2;
Line: 89

    SELECT SCN_ID FROM OKC_K_ARTICLES_B
    WHERE ID=b_cat_id;
Line: 293

                    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_id                   => scn_child_tbl(k).id,
                          p_display_sequence     => l_ref_sequence,
                          p_object_version_number => Null
                                                );
Line: 321

                   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_id                   => scn_child_tbl(k).id,
                         p_section_sequence     => l_ref_sequence,
                         p_object_version_number =>Null
                                                );
Line: 432

PROCEDURE update_article_variable(
    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 ,
    p_art_var_tbl                  IN art_var_tbl_type,
    p_mode                         IN VARCHAR2 ,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2
    ) IS

    l_api_version                 CONSTANT NUMBER := 1;
Line: 447

    l_api_name                    CONSTANT VARCHAR2(30) := 'update_article_variable';
Line: 453

    SELECT DOCUMENT_TYPE,DOCUMENT_ID
    FROM OKC_K_ARTICLES_B
    WHERE id=b_cat_id;
Line: 458

    SELECT object_version_number
    FROM OKC_K_ARTICLES_B
    WHERE ID=b_cat_id
    AND   AMENDMENT_OPERATION_CODE<>G_AMEND_CODE_UPDATED;
Line: 466

      okc_debug.log('100: Entered update_article_variable', 2);
Line: 479

           G_PKG_NAME, '100: Entered update_article_variable' );
Line: 499

    SAVEPOINT g_update_article_variable_GRP;
Line: 551

         OKC_K_ART_VARIABLES_PVT.update_row(
                             p_validation_level	          => 0,
                             x_return_status              => x_return_status,
                             p_cat_id                     => p_art_var_tbl(i).cat_id,
                             p_variable_code              => p_art_var_tbl(i).variable_code,
                             p_variable_type              => p_art_var_tbl(i).variable_type,
                             p_external_yn                => p_art_var_tbl(i).external_yn,
                             p_variable_value_id          => p_art_var_tbl(i).variable_value_id,
                             p_variable_value             => p_art_var_tbl(i).variable_value,
                             p_attribute_value_set_id     => p_art_var_tbl(i).attribute_value_set_id,
                             p_object_version_number      => p_art_var_tbl(i).object_version_number
                                          );
Line: 586

                    OKC_K_ARTICLES_GRP.Update_article(
                                     p_api_version                => 1,
                                     p_init_msg_list              => FND_API.G_FALSE,
                                     p_validation_level           => 0,
                                     p_mode                       => p_mode,
                                     x_msg_count                  => x_msg_count,
                                     x_msg_data                   => x_msg_data,
                                     x_return_status              => x_return_status,
                                     p_id                         => p_art_var_tbl(i).cat_id,
                                     p_object_version_number      => l_dummy
                                                 );
Line: 619

       okc_debug.log('200: Leaving update_article_variable', 2);
Line: 624

	    G_PKG_NAME, '200: Leaving update_article_variable' );
Line: 630

         okc_debug.log('300: Leaving update_article_variable: OKC_API.G_EXCEPTION_ERROR Exception', 2);
Line: 635

             G_PKG_NAME, '300: Leaving update_article_variable: OKC_API.G_EXCEPTION_ERROR Exception' );
Line: 642

      ROLLBACK TO g_update_article_variable_GRP;
Line: 648

         okc_debug.log('400: Leaving update_article_variable: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
Line: 653

             G_PKG_NAME, '400: Leaving update_article_variable: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception' );
Line: 660

      ROLLBACK TO g_update_article_variable_GRP;
Line: 666

        okc_debug.log('500: Leaving update_article_variable because of EXCEPTION: '||sqlerrm, 2);
Line: 671

             G_PKG_NAME, '500: Leaving update_article_variable because of EXCEPTION: '||sqlerrm );
Line: 678

      ROLLBACK TO g_update_article_variable_GRP;
Line: 685

  END update_article_variable;
Line: 687

PROCEDURE update_structure(
    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 ,
    p_structure_tbl                IN structure_tbl_type,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2
    ) IS

    l_api_version                 CONSTANT NUMBER := 1;
Line: 701

    l_api_name                    CONSTANT VARCHAR2(30) := 'update_structure';
Line: 706

    SELECT DOCUMENT_TYPE,DOCUMENT_ID
    FROM OKC_K_ARTICLES_B
    WHERE id=b_id;
Line: 711

    SELECT DOCUMENT_TYPE,DOCUMENT_ID
    FROM OKC_SECTIONS_B
    WHERE id=b_id;
Line: 718

      okc_debug.log('100: Entered update_structure', 2);
Line: 730

	    G_PKG_NAME, '100: Entered update_structure' );
Line: 748

    SAVEPOINT g_update_structure_GRP;
Line: 805

                   OKC_TERMS_SECTIONS_GRP.update_section(
                             p_api_version                => 1,
                             p_init_msg_list              => FND_API.G_FALSE,
                             x_msg_count                  => x_msg_count,
                             x_msg_data                   => x_msg_data,
                             p_validation_level           => 0,
                             x_return_status              => x_return_status,
                             p_id                         => p_structure_tbl(i).id,
                             p_section_sequence           => p_structure_tbl(i).display_sequence,
                             p_label                      => p_structure_tbl(i).label,
                             p_scn_id                     => p_structure_tbl(i).scn_id,
                             p_object_version_number      => p_structure_tbl(i).object_version_number
                                                      );
Line: 831

                    OKC_K_ARTICLES_GRP.Update_article(
                                     p_api_version                => 1,
                                     p_init_msg_list              => FND_API.G_FALSE,
                                     p_validation_level           => 0,
                                     x_msg_count                  => x_msg_count,
                                     x_msg_data                   => x_msg_data,
                                     x_return_status              => x_return_status,
                                     p_id                         => p_structure_tbl(i).id,
                                     p_mandatory_yn               => p_structure_tbl(i).mandatory_yn,
                                     p_scn_id                     => p_structure_tbl(i).scn_id,
                                     p_label                      => p_structure_tbl(i).label,
                                     p_display_sequence           => p_structure_tbl(i).display_sequence,
                                     p_object_version_number      => p_structure_tbl(i).object_version_number
                                                 );
Line: 866

       okc_debug.log('200: Leaving update_structure', 2);
Line: 871

	    G_PKG_NAME, '200: Leaving update_structure' );
Line: 877

         okc_debug.log('300: Leaving update_structure: OKC_API.G_EXCEPTION_ERROR Exception', 2);
Line: 882

	     G_PKG_NAME, '300: Leaving update_structure: OKC_API.G_EXCEPTION_ERROR Exception' );
Line: 893

      ROLLBACK TO g_update_structure_GRP;
Line: 899

         okc_debug.log('400: Leaving update_structure: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
Line: 904

	     G_PKG_NAME, '400: Leaving update_structure: OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception' );
Line: 915

      ROLLBACK TO g_update_structure_GRP;
Line: 921

        okc_debug.log('500: Leaving update_structure because of EXCEPTION: '||sqlerrm, 2);
Line: 926

	     G_PKG_NAME, '500: Leaving update_structure because of EXCEPTION: '||sqlerrm );
Line: 937

      ROLLBACK TO g_update_structure_GRP;
Line: 944

  END update_structure;
Line: 964

    l_insert_tbl              article_id_tbl_type;
Line: 983

 SELECT 'x' FROM
    OKC_K_ARTICLES_B KART
 WHERE document_type=p_doc_type
 AND   document_id=p_doc_id
 AND   source_flag='R'
 AND   orig_article_id = b_article_id
 AND nvl(KART.AMENDMENT_OPERATION_CODE,'?')<>'DELETED'
 AND nvl(KART.SUMMARY_AMEND_OPERATION_CODE,'?')<>'DELETED';
Line: 993

   SELECT nvl(article_effective_date,sysdate)
   FROM OKC_TEMPLATE_USAGES
   WHERE DOCUMENT_TYPE  = p_doc_type
   AND   DOCUMENT_ID    = p_doc_id;
Line: 999

 SELECT vers.article_id article_id,
        vers.article_version_id article_version_id,
        nvl(vers.default_section,'UNASSIGNED') scn_code,
        nvl(PROVISION_YN,'N') provision_yn
 FROM OKC_ARTICLE_VERSIONS VERS
 WHERE vers.article_id = b_article_id
 AND    article_status in ('ON_HOLD','APPROVED')
 AND   b_article_effective_date >= vers.start_date
 AND   b_article_effective_date <= nvl(vers.end_date,b_article_effective_date+1);
Line: 1010

SELECT article_id,
       article_version_id,
       nvl(vers.default_section,'UNASSIGNED') scn_code,
       nvl(PROVISION_YN,'N') provision_yn
FROM OKC_ARTICLE_VERSIONS VERS
WHERE  article_id= b_article_id
AND    article_status in ('ON_HOLD','APPROVED')
AND    start_date = (select max(start_date) FROM OKC_ARTICLE_VERSIONS
WHERE  article_id= b_article_id
AND    article_status in ('ON_HOLD','APPROVED') );
Line: 1022

SELECT id FROM OKC_SECTIONS_B
WHERE document_type=p_doc_type
AND   document_id =p_doc_id
AND   scn_code     = b_scn_code
AND nvl(AMENDMENT_OPERATION_CODE,'?')<>'DELETED'
AND nvl(SUMMARY_AMEND_OPERATION_CODE,'?')<>'DELETED'
AND   rownum=1 ;
Line: 1031

SELECT nvl(max(section_sequence),0)+10 FROM OKC_SECTIONS_B
WHERE document_type = p_doc_type
AND   document_id   = p_doc_id
AND   NVL(scn_code,'XWY') <> 'UNASSIGNED'
AND   scn_id IS NULL;
Line: 1038

SELECT nvl(max(display_sequence),0)+10 FROM OKC_K_ARTICLES_B
WHERE document_type=p_doc_type
AND   document_id =p_doc_id
AND   SCN_ID = b_scn_id;
Line: 1045

SELECT nvl(max(section_sequence),0)+10 FROM OKC_SECTIONS_B
WHERE document_type=p_doc_type
AND   document_id =p_doc_id
AND   SCN_ID = b_scn_id;
Line: 1051

SELECT name,
       nvl(PROVISION_ALLOWED_YN,'Y')
FROM OKC_BUS_DOC_TYPES_V
WHERE  DOCUMENT_TYPE=p_doc_type;
Line: 1057

SELECT NVL(t.xprt_clause_mandatory_flag,'N'),
       NVL(t.xprt_scn_code,'UNASSIGNED')
  FROM okc_template_usages u,
       okc_terms_templates_all t
 WHERE u.template_id = t.template_id
   AND u.document_type = p_doc_type
   AND u.document_id = p_doc_id ;
Line: 1080

SELECT doc_numbering_scheme
FROM okc_template_usages
WHERE document_type = p_doc_type
  AND document_id = p_doc_id;
Line: 1089

SELECT org_id
FROM OKC_ARTICLES_ALL
WHERE article_id = b_article_id;
Line: 1096

SELECT VERS.ARTICLE_ID article_id,
       ADP.GLOBAL_ARTICLE_VERSION_ID article_version_id,
	  NVL(VERS.default_section,'UNASSIGNED') scn_code,
       NVL(VERS.PROVISION_YN,'N') provision_yn
FROM   OKC_ARTICLE_VERSIONS VERS,
       OKC_ARTICLE_ADOPTIONS  ADP
WHERE ADP.GLOBAL_ARTICLE_VERSION_ID = VERS.ARTICLE_VERSION_ID
AND   VERS.ARTICLE_ID         = b_article_id
AND   nvl(b_article_effective_date,sysdate) >=  VERS.START_DATE
AND   nvl(b_article_effective_date,sysdate) <= nvl(VERS.end_date, nvl(b_article_effective_date,sysdate) +1)
AND   VERS.ARTICLE_STATUS     IN ('ON_HOLD','APPROVED')
AND   ADP.ADOPTION_TYPE = 'ADOPTED'
AND   ADP.LOCAL_ORG_ID = b_local_org_id
AND   ADP.adoption_status IN ( 'APPROVED', 'ON_HOLD') ;
Line: 1113

SELECT VERS.ARTICLE_ID article_id,
       ADP.GLOBAL_ARTICLE_VERSION_ID article_version_id,
	  NVL(VERS.default_section,'UNASSIGNED') scn_code,
       NVL(VERS.PROVISION_YN,'N') provision_yn
FROM   OKC_ARTICLE_VERSIONS VERS,
       OKC_ARTICLE_ADOPTIONS  ADP
WHERE ADP.GLOBAL_ARTICLE_VERSION_ID = VERS.ARTICLE_VERSION_ID
AND   VERS.ARTICLE_ID         = b_article_id
AND   VERS.ARTICLE_STATUS     IN ('ON_HOLD','APPROVED')
AND   ADP.ADOPTION_TYPE = 'ADOPTED'
AND   ADP.LOCAL_ORG_ID = b_local_org_id
AND   ADP.adoption_status IN ( 'APPROVED', 'ON_HOLD')
ORDER BY ADP.creation_date desc;
Line: 1229

   l_query1 := 'Select kart.id ,kart.object_version_number from okc_k_articles_b kart where document_type=:l_doc_type and document_id=:l_doc_id and source_flag=''R'' and orig_article_id not in (';
Line: 1251

             l_insert_tbl(k):= p_article_id_tbl(i);
Line: 1265

      l_query := 'Select kart.id ,kart.object_version_number from okc_k_articles_b kart where document_type=:l_doc_type and document_id=:l_doc_id and source_flag=''R'' ';
Line: 1280

           okc_debug.log('400: Going to delete Articles which came from expert last time but not present in expert this time');
Line: 1285

         G_PKG_NAME, '400: Going to delete Articles which came from expert last time but not present in expert this time' );
Line: 1297

     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,
                                 p_mode                  => p_mode,
                                 p_id                    => l_article_id,
                                 p_object_version_number => l_ovn,
						   p_mandatory_clause_delete => 'Y',
                                 x_return_status         => x_return_status,
                                 x_msg_count             => x_msg_count,
                                 x_msg_data              => x_msg_data
                                     );
Line: 1324

          okc_debug.log('500: Articles Delete ',2);
Line: 1325

          okc_debug.log('600: Going to insert new Articles retunred by expert',2);
Line: 1326

          okc_debug.log('600: Inserting Articles : '||l_insert_tbl.COUNT,2);
Line: 1331

          G_PKG_NAME, '500: Articles Delete ' );
Line: 1333

          G_PKG_NAME, '600: Going to insert new Articles retunred by expert' );
Line: 1335

          G_PKG_NAME, '600: Inserting Articles : '||l_insert_tbl.COUNT );
Line: 1338

  IF l_insert_tbl.COUNT > 0 THEN

       OPEN  l_get_effective_date_csr;
Line: 1348

       FOR i IN l_insert_tbl.FIRST..l_insert_tbl.LAST LOOP

      	   -- bug 4162255
              -- check if Article is global or local
              OPEN l_get_article_org_csr(l_insert_tbl(i));
Line: 1363

              OPEN  l_get_active_article_csr(l_insert_tbl(i),l_article_effective_date);
Line: 1370

                  OPEN  l_get_max_article_csr(l_insert_tbl(i));
Line: 1390

		    OPEN l_get_local_article_csr(b_article_id => l_insert_tbl(i),
                               b_local_org_id => l_current_org_id,
						 b_article_effective_date => l_article_effective_date );
Line: 1397

				OPEN l_get_max_local_article_csr(b_article_id => l_insert_tbl(i),
                               b_local_org_id => l_current_org_id );
Line: 1576

  END IF; -- l_insert_tbl.COUNT > 0
Line: 1579

          okc_debug.log('900: New Articles Inserted');
Line: 1584

	   G_PKG_NAME, '900: New Articles Inserted' );
Line: 1882

SELECT article_id , 'x' FROM OKC_ARTICLE_VERSIONS
WHERE   article_version_id=b_article_version_id;
Line: 1968

           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                 => p_mode,
                       p_id                   => p_article_tbl(i).cat_id,
                       p_sav_sae_id           => l_article_id,
                       p_article_version_id   => p_article_tbl(i).article_version_id,
                       p_object_version_number => p_article_tbl(i).ovn
                                                );
Line: 2103

     l_not_deleted                 BOOLEAN;
Line: 2116

SELECT nvl(max(SECTION_SEQUENCE),0) FROM OKC_SECTIONS_B
WHERE  document_type=p_doc_type
AND    document_id=p_doc_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: 2126

SELECT nvl(max(display_SEQUENCE),0) FROM OKC_K_ARTICLES_B
WHERE  document_type=p_doc_type
AND    document_id=p_doc_id
and    b_scn_id is not null
and    scn_id=b_scn_id;
Line: 2133

SELECT SCN_ID FROM OKC_K_ARTICLES_B WHERE Id=b_cat_id;
Line: 2136

SELECT SCN_ID FROM OKC_SECTIONS_B WHERE Id=b_scn_id;
Line: 2139

SELECT ID FROM OKC_SECTIONS_B
where id<>b_id
AND  document_type=p_doc_type
AND    document_id=p_doc_id
start with Id=b_id
connect by id=prior scn_id;
Line: 2148

SELECT ID,SECTION_SEQUENCE DISPLAY_SEQ,'SECTION' obj_type
FROM   OKC_SECTIONS_B
WHERE  document_type = p_doc_type
AND    document_id   = p_doc_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)
         )
UNION ALL
SELECT ID,DISPLAY_SEQUENCE DISPLAY_SEQ,'ARTICLE' obj_type
FROM   OKC_K_ARTICLES_B
WHERE  document_type = p_doc_type
AND    document_id   = p_doc_id
AND    scn_id=b_scn_id
ORDER  BY 2;
Line: 2262

           okc_debug.log('300: Wrong Selection of Item Location', 2);
Line: 2267

	        G_PKG_NAME, '300: Wrong Selection of Item Location' );
Line: 2279

           okc_debug.log('400: Wrong Selection of Item Location', 2);
Line: 2284

	        G_PKG_NAME, '400: Wrong Selection of Item Location' );
Line: 2300

                 okc_debug.log('500: Wrong Selection ', 2);
Line: 2305

	             G_PKG_NAME, '500: Wrong Selection ' );
Line: 2309

                                 p_msg_name     => 'OKC_WRONG_SELECTION'
                                 );
Line: 2434

         l_not_deleted := TRUE;
Line: 2438

                        l_not_deleted := FALSE;
Line: 2443

         IF l_not_deleted THEN
               IF p_organize_tbl(i).object_type='ARTICLE' THEN

                    /*IF (l_debug = 'Y') THEN
                       okc_debug.log('600: Updating Display Sequence of cat_id '||p_organize_tbl(i).id, 2);
Line: 2463

                     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_id                   => p_organize_tbl(i).id,
                               p_scn_id               => l_parent_scn_id,
                               p_display_sequence     => l_ref_sequence,
                               p_object_version_number => Null
                                                );
Line: 2493

                   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_id                   => p_organize_tbl(i).id,
                         p_scn_id               => nvl(l_parent_scn_id,OKC_API.G_MISS_NUM),
                         p_section_sequence     => l_ref_sequence,
                         p_object_version_number =>Null
                                                );
Line: 2544

                    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_id                   => scn_child_tbl(k).id,
                          p_display_sequence     => l_ref_sequence,
                          p_object_version_number => Null
                                                );
Line: 2572

                   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_id                   => scn_child_tbl(k).id,
                         p_section_sequence     => l_ref_sequence,
                         p_object_version_number =>Null
                                                );
Line: 2752

     l_not_deleted                 BOOLEAN;
Line: 2765

     l_new_action                  OKC_REVIEW_UPLD_TERMS.ACTION%TYPE := 'UPDATED';
Line: 2773

SELECT object_text,
       action,
       NVL(error_message_count,0) error_message_count,
       NVL(warning_message_count,0) warning_message_count
FROM   okc_review_upld_terms
WHERE  review_upld_terms_id = b_review_upld_terms_id;
Line: 2782

SELECT av.insert_by_reference,
       akb.mandatory_yn,
	  av.lock_text
FROM   okc_article_versions av, okc_review_upld_terms ar, okc_k_articles_b akb
WHERE  av.article_version_id = ar.article_version_id
AND    akb.id = ar.object_id
AND    ar.review_upld_terms_id = b_review_upld_terms_id;
Line: 2791

SELECT doc_numbering_scheme from okc_template_usages
WHERE  document_type = p_doc_type
AND    document_id = p_doc_id;
Line: 2866

    Process the records to update the first clause text with the clause text
    of the rest of the clauses.
    Check is made for clause not being IBR, lock_text, mandatory
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
IF p_merge_review_tbl.COUNT>0 THEN
    OPEN  l_get_article_text_csr(p_merge_review_tbl(1).review_upld_terms_id);
Line: 2888

  	            G_PKG_NAME, '500: Wrong Selection ' );
Line: 2891

                                 p_msg_name     => 'OKC_WRONG_SELECTION'
                                 );
Line: 2934

  	        G_PKG_NAME, '500: Wrong Selection ' );
Line: 2937

                              p_msg_name     => 'OKC_WRONG_SELECTION');
Line: 2980

	   Update the records being merged with ACTION=MERGED (Soft Delete)
	 ***********************************************************************/
       -- Added for Bug 5339759
	   UPDATE okc_review_upld_terms
	   SET
	   old_review_upld_terms_id = review_upld_terms_id
	   WHERE review_upld_terms_id = p_merge_review_tbl(i).review_upld_terms_id;
Line: 2988

        OKC_REVIEW_UPLD_TERMS_PVT.update_row(
        x_return_status         => x_return_status,
        p_review_upld_terms_id  => p_merge_review_tbl(i).review_upld_terms_id,
        p_action                => 'MERGED',
        p_object_version_number => p_merge_review_tbl(i).object_version_number,
        p_new_parent_id         => G_MISS_NUM
         );
Line: 3004

	   UPDATE okc_review_var_values
	   SET
	   old_review_upld_terms_id = review_upld_terms_id,
	   review_upld_terms_id = p_merge_review_tbl(1).review_upld_terms_id
	   WHERE review_upld_terms_id = p_merge_review_tbl(i).review_upld_terms_id;
Line: 3012

   Update the OKC_REVIEW_UPLD_TERMS table for the first clause
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   -- Added for bug# 4897442

    IF(l_new_action = 'ADDED') THEN
        l_new_action := 'ADDED';
Line: 3019

        l_new_action := 'UPDATED';
Line: 3039

        OKC_REVIEW_UPLD_TERMS_PVT.update_row(
        x_return_status => x_return_status,
        p_review_upld_terms_id  => p_merge_review_tbl(1).review_upld_terms_id,
	   p_action                => l_new_action,
        p_object_text           => l_final_article_text,
        p_object_version_number => NULL,
        p_error_message_count   => l_final_err_msg_count,
        p_warning_message_count => l_final_wrn_msg_count );