cancel
Showing results for 
Search instead for 
Did you mean: 

hi

Former Member
0 Kudos

i have created customer table in that i want customer id to be generated automatically also should not give the id number that i already have in table.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try this logic.

Select zcustid from zcustomer into gt_custid.

Sort gt_custid descending.

Read table gt_custid index 1.

gv_newid = gt_custid + 1.

Awrd Points if useful

Bhupal

Answers (3)

Answers (3)

Kanagaraja_L
Active Contributor
0 Kudos

Use FM NUMBER_GET_NEXT

Kanagaraja L

Vijay
Active Contributor
0 Kudos

hi

one of the solution could be that u store one variable in cluster memory using export and just before the table is getting updated u import the variable assing the value to customer id and assign next value to that variable and export it again to the cluster memory.

this way u can assign new id to customer every time.

regards

vijay

reward points if helpfull

Former Member
0 Kudos

hi,

u'll have to generate customer id programatically. make a number range object using tcode SNRO and use it in the FM NUMBER_GET_NEXT

pls reward points if useful