ITPub博客

首页 > IT职业 > IT生活 > 分配或取消交货号

分配或取消交货号

原创 IT生活 作者:lflyingfox 时间:2007-09-04 16:13:31 0 删除 编辑
分配或取消交货号[@more@]

SET SERVEROUTPUT ON SIZE 100000
DECLARE
p_api_version_number NUMBER;
p_TabOfDelDets WSH_DELIVERY_DETAILS_PUB.ID_TAB_TYPE;
p_action VARCHAR2(15);
p_delivery_id NUMBER;
p_delivery_name VARCHAR2(30);
p_commit VARCHAR2(30);
p_validation_level NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
BEGIN

p_TabOfDelDets(1) := '439395';
p_action := 'ASSIGN';
p_api_version_number := 1.0;
p_delivery_id := '152501';
p_delivery_name := '152501';

wsh_delivery_details_pub.detail_to_delivery
(
p_api_version => p_api_version_number,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_FALSE,
p_validation_level => p_validation_level,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_TabOfDelDets => p_TabOfDelDets,
p_action => p_action,
p_delivery_id => p_delivery_id,
p_delivery_name => p_delivery_name
);

IF (x_return_status = WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
COMMIT;
dbms_output.put_line('Return Status = '|| SUBSTR (x_return_status,1,255));
dbms_output.put_line('Delivery Id = '|| TO_CHAR(p_delivery_id));
dbms_output.put_line('Delivery Name = '|| p_delivery_name);
ELSE
dbms_output.put_line('Return Status = '|| SUBSTR (x_return_status,1,255));
dbms_output.put_line('Msg Count = '|| TO_CHAR(x_msg_count));
dbms_output.put_line('Delivery Id = '|| TO_CHAR(P_delivery_id));
dbms_output.put_line('Delivery Name = '|| p_delivery_name);
dbms_output.put_line('Msg Data = '|| SUBSTR (x_msg_data,1,255));
--IF x_msg_count >1 THEN
FOR I IN 1..10 LOOP
dbms_output.put_line(I||'. '|| SUBSTR (FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ), 1, 255));
END LOOP;
--END IF;

END IF;
END;


/

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

下一篇: 交货分行
请登录后发表评论 登录
全部评论

注册时间:2010-02-26

  • 博文量
    10
  • 访问量
    9352