ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Standard API 开发示例

Standard API 开发示例

原创 Linux操作系统 作者:asiaidea 时间:2010-11-04 18:23:52 0 删除 编辑
更新客户状态
 
--定义记录变量用来存放待更新或导入的值.

p_cust_account_rec hz_cust_account_v2pub.cust_account_rec_type;

--赋值

-- set value

p_cust_account_rec.cust_account_id := cust_info.cust_account_id;

p_cust_account_rec.status := 'A';

p_object_version_number := cust_info.object_version_number;

--调用API

--Call API

hz_cust_account_v2pub .update_cust_account

(

p_init_msg_list => FND_API.G_TRUE,

p_cust_account_rec => p_cust_account_rec,

p_object_version_number => p_object_version_number,

x_return_status => x_return_status,

x_msg_count => x_msg_count,

x_msg_data => x_msg_data

);

--返回消息

--Display message

if x_msg_count>0 then

fnd_file.put_line(fnd_file.log,'Record_number = '||to_char(rec_count));

fnd_file.put_line(fnd_file.log,'Account_number = '||cust_info.account_number);

fnd_file.put_line(fnd_file.log,'Return_status = '||substr(x_return_status,1,255));

fnd_file.put_line(fnd_file.log,

'Msg_count = '||to_char(x_msg_count));

fnd_file.put_line(fnd_file.log,

'Version_Number = '||to_char(p_object_version_number));

fnd_file.put_line(fnd_file.log,

'Msg_data = '||substr(x_msg_data,1,255));

end if;

if x_msg_count >1 then

for I in 1..x_msg_count loop

fnd_file.put_line(fnd_file.log,i||

'.'||substr(fnd_msg_pub.get(p_encoded=> fnd_api.g_false ), 1, 255));

end loop;

end if;

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

请登录后发表评论 登录
全部评论

注册时间:2010-11-04

  • 博文量
    140
  • 访问量
    519110