ITPub博客

首页 > 数据库 > Oracle > 根据delivery_detail_id创建交货号

根据delivery_detail_id创建交货号

原创 Oracle 作者:lflyingfox 时间:2007-09-04 16:07:00 0 删除 编辑

根据delivery_detail_id创建交货号

[@more@]

SET SERVEROUTPUT ON SIZE 100000
DECLARE
p_api_version_number NUMBER;
p_commit VARCHAR2(30);
x_return_status VARCHAR2(2000);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
p_line_rows WSH_UTIL_CORE.ID_TAB_TYPE;
x_del_rows WSH_UTIL_CORE.ID_TAB_TYPE;

BEGIN

p_api_version_number := 1.0;
p_line_rows(1) := 439300;
p_line_rows(2) := 439301;
--p_line_rows(3) := 214179;


wsh_delivery_details_pub.autocreate_deliveries
(
p_api_version_number => p_api_version_number,
p_init_msg_list => FND_API.G_TRUE,
p_commit => FND_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_line_rows => p_line_rows,
x_del_rows => x_del_rows

);

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(x_del_rows(1)));
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 detail Id = '|| TO_CHAR(p_line_rows(1)));
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-967877/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-02-26

  • 博文量
    10
  • 访问量
    9295