Application Development 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: 

About Automatic Generation of Primary key

Former Member
0 Kudos

I have created one Z table. Its composite primary keys are vkorg

and Sales Representive Number. I have to assign Sales Representive number

through system. How it should be done?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

If u provide detail scenario.. can able to reach solution.

Regards,

Sujatha.

6 REPLIES 6

Former Member
0 Kudos

If u provide detail scenario.. can able to reach solution.

Regards,

Sujatha.

0 Kudos

Basically we have different situation.

Here we are creating sales represantative for each area for

our particular business. We are manually assigning salrep_no key.

with vkorg as composite primary key. Many time user forgets the last no.

I wanted the functionality by which if in the screen user adds vkorg and name of sales rep and address its salesrep no will be automatically created.

0 Kudos

You can create Number range objects for that table field.

tcode : SNRO

Regards

Rusidar

0 Kudos

Thanks for your wonderful answer Rusidar .

I have created number range object but please

can anyone tell me how to use it in table?

Former Member
0 Kudos

Hi,

In your Z table tick the Both Fields VKORG and SALRP(Sales Rep) as Key fields.

And assign TVKO as check table for VKORG field and Similarly assign KNA1 table as check table for SALRP field by assgning ZTable-SALRP =KNA1-KUNNR.

But you have to check that this Partner Function(PARW) SALESREPRESENTATIVE has been already defined in the SD and check whether any values exists for this entry in KNVP table and KNA1 .

Regards,

Anji

nilesh_vakil
Participant
0 Kudos

Ya thanks i got answer