Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
MaxNumber:
LOAD
num(max(%_KEY_SALES_FACT)) AS MaxAutoNumber
RESIDENT SALES_HEADER ;
LET vMaxAutoNumber = peek('MaxAutoNumber', 0, 'MaxNumber');
vMaxAutoNumber=1200;
SALES_HEADER:
LOAD
AUTONUMBER(COMPANY & TRN_NO) as %_KEY_SALES_FACT
Resident XX ;
I want to start my autonumber from vMaxAutoNumber>1200.
Please sugest how to write autonumber syntax.
Add 1200 to it:
SALES_HEADER:
LOAD
1200 + AUTONUMBER(COMPANY & TRN_NO) as %_KEY_SALES_FACT
Resident XX ;
Something that you have to keep in mind is that autonumber is not guaranteed to hand out the same number across different reloads, only during the same reload. Meaning that you can't count on it to always generate the exact same number for the same company&trn_no combination. You can get different numbers the next day when your document is reloaded again to refresh the data.
Add 1200 to it:
SALES_HEADER:
LOAD
1200 + AUTONUMBER(COMPANY & TRN_NO) as %_KEY_SALES_FACT
Resident XX ;
Something that you have to keep in mind is that autonumber is not guaranteed to hand out the same number across different reloads, only during the same reload. Meaning that you can't count on it to always generate the exact same number for the same company&trn_no combination. You can get different numbers the next day when your document is reloaded again to refresh the data.
Yeah i hav done also in the same way u hav done.
Thanks 4 ur prompt reply.
Regards,
Sukamal