代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
OracleEBS
】
OM-业务机会批量转移
作者:
Dezai.CN
/ 发布于
2012/8/28
/
1058
<div>--业务机会批次权限转移 Procedure oppty_change_manual(p_batch Number) Is p_access_profile_rec AS_ACCESS_PUB.access_profile_rec_type; p_sales_team_rec AS_ACCESS_PUB.sales_team_rec_type; x_return_status VARCHAR2(40); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); x_access_id NUMBER; v_sql_err varchar2(2000);</div> <div> v_lead_id Number; v_access_id Number; v_person_id Number; v_customer_id Number; v_address_id Number; v_n Number:=0; Begin For i In (Select cob.row_id, cob.oppty_number, cob.source_group_id, cob.source_sales, cob.group_id, cob.desc_sales From secom.Cux_Oppty_Batch_Manual cob Where cob.batch_number=p_batch ) Loop</div> <div></div> <div> select Count(*) Into v_n from as_accesses_all_all aaaa, as_leads_all ala where aaaa.lead_id=ala.lead_id And aaaa.sales_group_id=i.group_id And aaaa.salesforce_id=i.Desc_Sales And ala.lead_number=i.oppty_number;</div> <div> If v_n>0 Then Begin select ala.lead_id, aaaa.access_id Into v_lead_id, v_access_id from as_accesses_all_all aaaa, as_leads_all ala where aaaa.lead_id=ala.lead_id And aaaa.sales_group_id=i.group_id And aaaa.salesforce_id=i.Desc_Sales And ala.lead_number=i.oppty_number;</div> <div> p_sales_team_rec.lead_id := v_lead_id; p_sales_team_rec.access_id := v_access_id;</div> <div> AS_ACCESS_PUB.Delete_SalesTeam(2, NULL, NULL, NULL, p_access_profile_rec, null, null, null, null, p_sales_team_rec, x_return_status, x_msg_count, x_msg_data);</div> <div> If x_return_status='S' Then Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute3='S' Where cob.row_id=i.row_id; Else Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute3='X' Where cob.row_id=i.row_id; End If; Exception When Others Then Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute3='X' Where cob.row_id=i.row_id; End; End If;</div> <div> --创建新的销售小组 Begin</div> <div> Select Jrgm.Person_Id Into v_Person_Id From Jtf_Rs_Group_Members_Vl Jrgm Where Jrgm.Resource_Id = i.Desc_Sales And Rownum = 1;</div> <div> select ala.lead_id, ala.customer_id, ala.address_id Into v_lead_id, v_customer_id, v_address_id From as_leads_all ala Where ala.lead_number=i.oppty_number;</div> <div> p_sales_team_rec.lead_id := v_lead_id; p_sales_team_rec.customer_id:= v_customer_id; p_sales_team_rec.address_id:=v_address_id; p_sales_team_rec.person_id := v_person_id; p_sales_team_rec.salesforce_id := i.Desc_Sales; p_sales_team_rec.sales_group_id := i.group_id; p_sales_team_rec.freeze_flag :='N'; p_sales_team_rec.team_leader_flag :='Y'; p_sales_team_rec.owner_flag:='Y'; AS_ACCESS_PUB.Create_SalesTeam(2, 'T', 'F', NULL, --p_validation_level, p_access_profile_rec, null, null, null, null, p_sales_team_rec, x_return_status, x_msg_count, x_msg_data, x_access_id);</div> <div> If x_return_status='S' Then</div> <div> update AS_SALES_CREDITS ASC1 set asc1.salesforce_id=i.Desc_Sales, asc1.salesgroup_id=i.group_id, asc1.person_id=v_person_id Where asc1.lead_id=v_lead_id;</div> <div> Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute1='S' Where cob.row_id=i.row_id; Else Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute1='X' Where cob.row_id=i.row_id; End If; Exception When Others Then Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute1='X' Where cob.row_id=i.row_id; End;</div> <div> --删除责任人的销售小组 secom.Cux_Oppty_Batch_Manual表的attribute1用来记录返回结果标识 Begin select ala.lead_id, aaaa.access_id Into v_lead_id, v_access_id from as_accesses_all_all aaaa, as_leads_all ala where aaaa.lead_id=ala.lead_id And aaaa.sales_group_id=i.source_group_id And aaaa.salesforce_id=i.source_sales And ala.lead_number=i.oppty_number;</div> <div> p_sales_team_rec.lead_id := v_lead_id; p_sales_team_rec.access_id := v_access_id;</div> <div> AS_ACCESS_PUB.Delete_SalesTeam(2, NULL, NULL, NULL, p_access_profile_rec, null, null, null, null, p_sales_team_rec, x_return_status, x_msg_count, x_msg_data);</div> <div> If x_return_status='S' Then Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute2='S' Where cob.row_id=i.row_id; Else Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute2='X' Where cob.row_id=i.row_id; End If; Exception When Others Then Update secom.Cux_Oppty_Batch_Manual cob Set cob.attribute2='X' Where cob.row_id=i.row_id; End;</div> <div> End Loop; Commit; End;</div> <div></div>
试试其它关键字
批量转移
同语言下
.
设置窗体的位置
.
初始化操作
.
在FORMS调用WEB页面
.
判断数据块的项是否为空
.
EBS 循环处理块记录
.
Oracle Form中调用并发请求生成报表并输出为PDF的方法
.
添加并发程序到指定职责API
.
EBS请求查询输出
.
删除 AP 发票相关脚本
.
ebs安全性
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3