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: 

table maintanace

Former Member
0 Kudos

hi

i have create one Z table in that i have 3 fileds .

whenever user insert the data 2 fileds data should be unique.

the table i have created as below .

Z_CABJN Z_VBELN Z_POSNR

x 1000 10

y 1000 20

z 1000 30

my table shou not accept

x 1000 40

for ever change of Z_VBELN / Z_POSNR i sholud have new

Z_CABJN.

6 REPLIES 6

Former Member
0 Kudos

hi Purva Kathuria ,

you can do one thing make the two fields as primary key then your problem will solved

Regards,

sree.....

Reward points if help full

Former Member
0 Kudos

Hi Purva,

Hi,

Go to SE11 enter table name ->change

Utilities-> Table Maintenance Generator

delete the Table maintenance by pressing delete button on menu,

then start creating it again.

Enter Auth.Group as &NC&

Enter function group < some name>

Maintenance Type -> One step

Overview screen -> some Number (1 or 2)

Press create

enter dev class and save, activate.

Go to SM 30 and check again.

kindly reward if found helpful.

cheers,

Hema.

Former Member
0 Kudos

Hi Purva Kathuria,

Your question is not so clear, as i understood you need the following.

The entries in fields Z_CABJN, Z_POSNR should be unique.

If it is so, below is the answer.

Mark the fields Z_CABJN Z_POSNR as primary key.

So that the entries in those fields will be unique.

I think this is the correct answer to your question.

If, don't forget to reward.

Regards,

Balaram

Former Member
0 Kudos

hi purva,

If u want any fields as unique, then make those fields as primary fields.

To make a field as primary, just click on the check box beside to the field name in the ztable.

regards.

shashikanth naram.

Former Member
0 Kudos

You can create a secondary index on just those two fields and specify that it is a unique undex.

Rob

Former Member
0 Kudos

Dear Purva,

Make Z_CABJN and A_POSNR as Primary keys and then use MODIFY statement. If the user makes an entry and if it doesnt exist then it will make a new entry in the database table and if it already exists then it will modify the existing entry.

Regards,

Tejomayi.