Skip to main content
Question

Next Number for Handling Units


sbarker
Do Gooder (Partner)
Forum|alt.badge.img+3
  • Do Gooder (Partner)
  • 2 replies

Hi Everyone,

 

in the past we have been able to change the “Next number” in a number stack for some parts of the system using a very simple sql update script where we update the next number (using sql) to be what we want it to be.

 

Has anyone (In IFS Cloud) found out how to change the “Next handling Unit id” using a simple sql script?

 

Thanks in advance,

Steve Barker

4 replies

Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • 5 replies
  • July 17, 2025

Hi Steve,

 

could you please share the SQL code you used to use in the past.

 

Thank you,
Peter


Forum|alt.badge.img+10
  • Hero (Customer)
  • 69 replies
  • July 17, 2025

Hi Peter

The next number for a handling unit comes from the HANDLING_UNIT_SEQ database sequence.

To change the next value in Oracle you would need to calculate how much you want to change the value by and then update the sequence accordingly using

alter sequence HANDLING_UNIT_SEQ increment by xx

You then need to cause the next value to be generated by using

select HANDLING_UNIT_SEQ .NEXTVAL from dual

You must then reset the increment back to 1

alter sequence HANDLING_UNIT_SEQ . increment by 1

 

I have never done this for IFS, this approach is purely the way to achieve a sequence reset in Oracle, but hopefully it may help you.

 


Marcel.Ausan
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 1273 replies
  • July 17, 2025

@sbarker ​@pr-upa the way IFS is handling these is by using Oracle DB sequences. Basically in the DB you have the HANDLING_UNIT_SEQ where you can check the current value or next value.

Please note that when you query nextval, it increases the seq.

So, if you have some custom logic built (maybe an event action with PL/SQL code) invoking the sequence could tell you what’s the next number.

select handling_unit_seq.currval from dual;

select handling_unit_seq.nextval from dual;

If you wanna change what the next number would be you could use an alter sequence statement, altough I would advise against going this route:

ALTER SEQUENCE sequence_name RESTART START WITH new_value;


Forum|alt.badge.img+1
  • Do Gooder (Customer)
  • 5 replies
  • July 18, 2025

Many thanks for your help guys!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings