Skip to main content
Solved

Customizing Supplier Agreement No sequance

  • September 7, 2021
  • 5 replies
  • 186 views

Asela Munasinghe
Superhero (Customer)
Forum|alt.badge.img+23

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? 

 

 

Best answer by Rangi Wijewardana

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.

 

This topic has been closed for replies.

5 replies

Rangi Wijewardana
Hero (Employee)
Forum|alt.badge.img+8

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.

 


Rangi Wijewardana
Hero (Employee)
Forum|alt.badge.img+8

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


Asela Munasinghe
Superhero (Customer)
Forum|alt.badge.img+23
  • Author
  • Superhero (Customer)
  • September 7, 2021

@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 :( 


Asela Munasinghe
Superhero (Customer)
Forum|alt.badge.img+23
  • Author
  • Superhero (Customer)
  • September 7, 2021

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

Will check that too @Rangi Wijewardana , thanks 


Rangi Wijewardana
Hero (Employee)
Forum|alt.badge.img+8

@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.