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

auto increment

Former Member
0 Likes
768

Hi,

I've created Z table with field POS,

My question is, how to make it autoincrement ??

Its very important to me because I have also field TANUM and VBELN

and when I put them into table i want that field POS should increment automaticly.

Best Regards,

Greg.

4 REPLIES 4
Read only

Former Member
0 Likes
593

Hi,

You can do one thing

You will have data in internal table.

... doing some process...

While inserting Data into the ztable from internal table, find what was the last number of the POS in ztable and increment and populate from the internal table.

Reward Points if this helps,

Satish

Read only

Former Member
0 Likes
593

hi Grzegorz,

if u are doing at SM30,

this thread can help u...

Regards

Allan Cristian

Read only

Former Member
0 Likes
593

create a number range for the custom fields...

and wherever you need to increment the field value use get next number function module...

Read only

Former Member
0 Likes
593

Hi

write code to modify the table when the fields xxxx and yyyy are fetching

check sy-subrc and make the changes to the req field with the corresponding increment and modify the table have it done first in the part of the itab and check it and do so...

Hope this help u

Reward points if helpful..

Regards

Sreenivas