我是靠谱客的博主 和谐大山,最近开发中收集的这篇文章主要介绍EBS提交并发请求的简单例子,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

定义变量:

--提交标准并发请求时的参数
    l_request_id1 NUMBER;
    l_request_id2 NUMBER;
    l_request_id3 NUMBER;
    l_request_id4 NUMBER;
    l_bl_result1  BOOLEAN;
    l_bl_result2  BOOLEAN;
    l_bl_result3  BOOLEAN;

 

   调用标准的请求,将三个接口表中的数据导入到系统中。

   实现sql如下:

 

  

[xhtml]  view plain copy
  1. IF v_supplier_error_flag = 'N' AND v_supplier_site_error_flag = 'N' AND  
  2.        v_supplier_contact_error_flag = 'N' THEN  
  3.   
  4.       --分ou的导入,并且初始化OU  
  5.       FOR l_cur_submit IN cur_submit LOOP  
  6.         v_org_id := NULL; --初始化ou  
  7.         v_org_id := get_org_id(l_cur_submit.org_name);  
  8.         --初始化环境变量  
  9.         set_policy_context(v_org_id);  
  10.         --调用标准的并发请求  
  11.         --调用供应商的并发请求  
  12.         l_request_id1 := fnd_request.submit_request('SQLAP', --应用简称  
  13.                                                     'APXSUIMP', --并发程序  
  14.                                                     '',  
  15.                                                     '',  
  16.                                                     FALSE,  
  17.                                                     'NEW',  
  18.                                                     1000,  
  19.                                                     'N',  
  20.                                                     'N',  
  21.                                                     'N',  
  22.                                                     chr(0));  
  23.         COMMIT;  
  24.         IF l_request_id1 IS NULL OR l_request_id1 = 0 THEN  
  25.           retcode := 2;  
  26.           errbuf  := '供应商接口导入标准表出错!';  
  27.           RETURN;  
  28.         END IF;  
  29.   
  30.         l_bl_result1 := fnd_concurrent.wait_for_request(l_request_id1, --等待的请求  
  31.                                                         1, --间隔时间  
  32.                                                         0, --等待时间  
  33.                                                         v_phase,  
  34.                                                         v_status,  
  35.                                                         v_dev_phase,  
  36.                                                         v_dev_status,  
  37.                                                         v_message);  
  38.   
  39.         IF v_dev_phase = 'COMPLETE' AND v_dev_status = 'NORMAL' THEN  
  40.   
  41.           --调用供应商地点的并发请求  
  42.           l_request_id2 := fnd_request.submit_request('SQLAP', --应用简称  
  43.                                                       'APXSSIMP', --并发程序  
  44.                                                       '',  
  45.                                                       '',  
  46.                                                       FALSE,  
  47.                                                       'NEW',  
  48.                                                       1000,  
  49.                                                       'N',  
  50.                                                       'N',  
  51.                                                       'N',  
  52.                                                       chr(0));  
  53.           COMMIT;  
  54.           IF l_request_id2 IS NULL OR l_request_id2 = 0 THEN  
  55.             retcode := 2;  
  56.             errbuf  := '供应商地点接口导入标准表出错!';  
  57.             RETURN;  
  58.           END IF;  
  59.   
  60.           l_bl_result2 := fnd_concurrent.wait_for_request(l_request_id2, --等待的请求  
  61.                                                           1, --间隔时间  
  62.                                                           0, --等待时间  
  63.                                                           v_phase,  
  64.                                                           v_status,  
  65.                                                           v_dev_phase,  
  66.                                                           v_dev_status,  
  67.                                                           v_message);  
  68.   
  69.           IF v_dev_phase = 'COMPLETE' AND v_dev_status = 'NORMAL' THEN  
  70.             --调用供应商地点联系人的并发请求  
  71.             l_request_id3 := fnd_request.submit_request('SQLAP', --应用简称  
  72.                                                         'APXSCIMP', --并发程序  
  73.                                                         '',  
  74.                                                         '',  
  75.                                                         FALSE,  
  76.                                                         'NEW',  
  77.                                                         1000,  
  78.                                                         'N',  
  79.                                                         'N',  
  80.                                                         'N',  
  81.                                                         chr(0));  
  82.             COMMIT;  
  83.             IF l_request_id3 IS NULL OR l_request_id3 = 0 THEN  
  84.               retcode := 2;  
  85.               errbuf  := '供应商地点联系人接口导入标准表出错!';  
  86.               RETURN;  
  87.             END IF;  
  88.             l_bl_result3 := fnd_concurrent.wait_for_request(l_request_id3, --等待的请求  
  89.                                                             1, --间隔时间  
  90.                                                             0, --等待时间  
  91.                                                             v_phase,  
  92.                                                             v_status,  
  93.                                                             v_dev_phase,  
  94.                                                             v_dev_status,  
  95.                                                             v_message);  
  96.             IF v_dev_phase <> 'COMPLETE' AND v_dev_status <> 'NORMAL' THEN  
  97.               retcode := 2;  
  98.               errbuf  := '供应商地点联系人接口导入标准表出错!';  
  99.               RETURN;  
  100.             END IF;  
  101.           END IF;  
  102.         END IF;  
  103.   
  104.         COMMIT;  
  105.       END LOOP; --结束loop循环  
  106. END IF;  



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14766526/viewspace-1159160/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14766526/viewspace-1159160/

最后

以上就是和谐大山为你收集整理的EBS提交并发请求的简单例子的全部内容,希望文章能够帮你解决EBS提交并发请求的简单例子所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(67)

评论列表共有 0 条评论

立即
投稿
返回
顶部