修改工单号码的流水号


The job number is defined by sequence WIP_JOB_NUMBER_S in the database.
The WIP numbering also uses the prefix defined in the profile option "WIP:Discrete Job Prefix" and concatenates this prefix with a value from the sequence WIP_JOB_NUMBER_S to create a default discrete job name.

To find the sequence statement run the following script.:

1. Modify profile option WIP:Discrete Job Prefix=’ TJ1-2009’ and save.

2. Log into Database with wip/wip, and process the following :
SQL> SELECT sequence_owner, sequence_name, min_value , max_value, increment_by,
last_number, cycle_flag, order_flag, cache_size
FROM all_sequences
where sequence_name = 'WIP_JOB_NUMBER_S';

3. To change this number, drop and recreate the sequence.

To drop the sequence: command:
"drop sequence wip_job_number_s"

To recreate sequence: command:
"create sequence wip_job_number_s increment by 1 start with [a number of your choice] maxvalue 2147483647 NOCYCLE nocache NOORDER;".

4. Grant the alter and select to APPS schema.
GRANT ALTER, SELECT ON WIP.WIP_JOB_NUMBER_S TO APPS WITH GRANT OPTION;

5. Now, go to instance, create a new discrete job, and test, check if the job number is changed or not


Caution:
Be sure to change the sequence only for job name.
Donot change the sequence for wip_entity_id since those are existing jobs.

 

修改工單號碼的流水號

1.      說明,目前工單號碼的編碼結構:TJ1-2009-88888,其中TJ1-2009-表示前綴,可通過Profile更新,WIP:Discrete Job Prefix=TJ1-2010’.

88888表示流水號,是通過標準的sequences WIP_JOB_NUMBER_S 自動生成的,系統最大可達2147483647。目前正式環境已達到87768

由於目前的工單號專用章流水號只有5位,如果工單號碼流水號位數超過5位,此章將不能滿足實際需求,影響工單正常作業。

 

Oracle工程師,可通過以下方法,修改工單號碼的流水號。

 

2.      登陸DB,用戶/密碼 wip/wip,查詢并記錄現有的WIP_JOB_NUMBER_S的基礎設置

SELECT sequence_owner, sequence_name, min_value , max_value, increment_by,
last_number, cycle_flag, order_flag, cache_size
FROM all_sequences
where sequence_name = 'WIP_JOB_NUMBER_S';

 

--此步驟主要是記錄SEQUENCE_OWNER CACHE_SIZE的值。

 

3.      drop and recreate the sequence

第一步,drop現有的WIP_JOB_NUMBER_S ,Command:

        drop sequence wip_job_number_s;

第二步,recreate WIP_JOB_NUMBER_S Command

         CREATE SEQUENCE WIP.WIP_JOB_NUMBER_S
  START WITH
1
  MAXVALUE
2147483647  --系統可生成的最大值
  MINVALUE
1    --工單號碼的起始值
  NOCYCLE
  CACHE
100      --與標準值一致(也可将其置空)
  NOORDER;

4.      Grant the alter and select to APPS schemaCommand

GRANT ALTER, SELECT ON WIP.WIP_JOB_NUMBER_S TO APPS WITH GRANT OPTION;

 

5.      以上步驟完成后,即可到WIP模組,開立工單驗證工單流水號是否符合要求。

(http://tjap.tjpcb.com:8007環境測試OK)

 

6.      建議後續在每年年初修改工單號碼的前綴時,一并修改工單號碼的流水號。

7.   如果流水號碼未能連續產生,可將CACHE置0,Command:

      ALTER sequence WIP.WIP_JOB_NUMBER_S nocache。

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

转载于:http://blog.itpub.net/16860121/viewspace-624833/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值