How add system generated sequence for a Supplier address in DFF field
We have a scenario where a DFF attribute (Supplier Address Sequence) is created at Supplier Address level. This field will be populated initially when we load the supplier addresses through conversion.
Post the Supplier address conversion, whenever any new address is created for a supplier, we wanted to default that DFF attribute (Supplier Address Sequence) to a system generated value. For example Supplier "ABC" has two address already defined with the Supplier Address Sequence 1 and 2, now when third address is added then Supplier Address Sequence field should get auto populate with 3 and so on.
Wanted to check if it feasible to write sql query or something where we can auto populate the sequence based on Supplier Number and the Max of Supplier address sequence and then increment by 1 to assign to new address for that supplier.