Skip to Content
author's profile photo Former Member
Former Member

auto increment

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 11:53 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 11:59 AM

    hi Grzegorz,

    if u are doing at SM30,

    this thread can help u...

    auto counter field

    Regards

    Allan Cristian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 12:00 PM

    create a number range for the custom fields...

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 12:01 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.