EBS: 获取订单编号
-- Created on 2023/8/3 by
declare
-- Local variables here
i integer;
v_appid number;
v_cat_code varchar2(50);
v_sobid number;
v_met_code varchar2(30);
v_trx_date date;
v_dbseqnm varchar2(30);
v_dbseqid number ;
v_nextval number;
begin
-- Test statements here
/*
select apps.fnd_seqnum.get_next_sequence(
appid => 660,-- in number,
cat_code in varchar2,
sobid in number,
met_code in char,
trx_date in date,
dbseqnm in out nocopy varchar2,
dbseqid in out nocopy integer
) as next_sequence
from dual;
*/
v_met_code := 'A';
SELECT APPS.FND_SEQNUM.get_next_auto_sequence(appid => 660, --in number,
cat_code => '2187', --in varchar2, TRANSACTION_TYPE_ID
sobid =>null, --2331 ,-- in number, SET_OF_BOOK_ID
met_code => v_met_code , -- in char,
trx_date =>'2023/07/02' -- in varchar2 有效日期
)
into v_nextval
from dual;
dbms_output.put_line('v_nextval ='|| to_char(v_nextval));
end;