Solved

Customizing Supplier Agreement No sequance

  • 7 September 2021
  • 5 replies
  • 155 views

Userlevel 7
Badge +19

Per the organizational standards, I need to automate the SA number generation to the next one in the sequence of XB0000767 and there onwards +1 automatically every time someone creates an agreement. I can manually do this in IFS. How do I set it up in IFS to fetch the number automatically? 

 

 

icon

Best answer by Rangi Wijewardana 7 September 2021, 13:17

View original

This topic has been closed for comments

5 replies

Userlevel 5
Badge +7

If you do not enter a number manually, the system will Get_Next_Balanket_No via  SELECT pur_blanket_no.nextval INTO blanket_no_ FROM dual in Supplier_Blanket_API. Get_Next_Balanket_No

If the number already exists system will check for next value.

Perhaps you can create customized sequence up to some extent by modifying below. However it seems adding prefix is not possible.

 

Userlevel 5
Badge +7

Further to above, this works insame manner as message id is assigned to connectivity inbox/outbox messages

Userlevel 7
Badge +19

@Rangi Wijewardana thanks for the answer. Do you mean setup a custom event? We can explore that. 

 

Adding a prefix is possible when I do it manually. So I suppose it should be possible to automate too as I understand. 

 

And if I don’t go with a prefix,  adding the front zeros in XB0000767 seems also not possible :( 

Userlevel 7
Badge +19

Further to above, this works insame manner as message id is assigned to connectivity inbox/outbox messages

Will check that too @Rangi Wijewardana , thanks 

Userlevel 5
Badge +7

@EnzoFerrari, No. Not something related to custom events.

You can define sequences for Customer orders, quotations , distribution orders etc with prefixes in IFS. But it is not practical to facilitate same functionality for all primary key generations.

So , these sequences are defined in SQL server. Refer below for more information

https://docs.microsoft.com/en-us/sql/t-sql/statements/create-sequence-transact-sql?view=sql-server-ver15

You can check this with PL/SQL expert regarding how to create sequence with prefixes in SQL server.