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

Problem in modifying a table through modify statement

Former Member
0 Likes
652

Hi,

I am trying to update a 'Z' table in which there are 5 fields comprising of primary key. Out of them 2 key fields are defined as a part of seconadry index with 'Unique' option selected.

As per the requirement, I am trying to update the table using modify statement so whenever this statement occurs it will check the primary keys and accordingly try to modify a record or insert a new record.

But as there is Unique Index defined on 2 of the key fields the Modify query is

5 REPLIES 5
Read only

former_member201275
Active Contributor
0 Likes
619

You post the same question 20 times!

I hope they lock you out.

Read only

Former Member
0 Likes
619

What is your name?

Is it Paaavan or Tejaswini Chintawar ???

Because we could see the same post in different names..

[;

people are not sitting here to waist time for these types of posts..Please kindly dont spoil the dignity of this community.

Read only

Former Member
0 Likes
619

You posted it many times that too incomplete.

Read only

0 Likes
619

I am sorry ...

Actually me and my friend is trying to post the same question but due to some server problem it has been posted so many times and that too with incomplete form.. And Hareesh I am much more concerned of the dignity of forum.. So don't teach me of all this thing..

Read only

Former Member
0 Likes
619

It is nonsensical (IMHO) to have a secondary unique index on two of the five primary key fields. Make the secondary index non-unique or supply at least all the primary key plus more fields to be unique, then modify without worrying about whether row is already there or not (SAP MODIFY takes care of that), but always supply values in ALL five of the primary key fields.