Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create incremental Ztable key

Former Member
0 Likes
440

Hello everyone,

I need to create a Ztable with a key (ZID) that must be a number (like NUMC15, for example), incremented as elements are added to the table. How do i know whats the number to follow. Imagine i allready have 356 elements. So next ZID = 357.

I searched the forum and found something about number ranges. I created one. But how can i link this to my table key ?

Thank you in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
418

I guess there is no direct link.

But you have to read the table each time before adding the records to find the latest key value. Than propose the next key value. How ?

In the table maintainace enter your own code and make the key field display only in insert mode.

Note: When you generate the table maintainace code each time it will ovwerwrite your code

2 REPLIES 2
Read only

Former Member
0 Likes
419

I guess there is no direct link.

But you have to read the table each time before adding the records to find the latest key value. Than propose the next key value. How ?

In the table maintainace enter your own code and make the key field display only in insert mode.

Note: When you generate the table maintainace code each time it will ovwerwrite your code

Read only

Former Member
0 Likes
418

Solved it on my own. I'm not using ranges. Just searching for select (max) of that field, and then increment +1. Thank you all.