Skip to Content
Former Member
Mar 18, 2008 at 07:20 AM

working of modify statement


Hye folks,

There is a scenario where there 4 fields in a data base.

Table Fields.

Serial Number PK

Article number

Article name


i have inserted the entry as 12... 123... xyz... 100...

13... 101... abc... 120...

now i wish to change the price of serial number 13 to 150 and also insert a new entry to table, i am getting the new entry created with modify and also a new entry for already existing row 13 with a changed price. there is a primary key violation.

internal table rows: 13... ... ... 150

modify dbtab from itab.

As per the definiton of modify it should update the existing row with a price of 150 but it is not happening, instead a new row is created.

As per the definiton of Primary key (PK), it shuld not allow duplicate.

How does a modify statement work in this scenario, why is ti giving a new entry.

Please help me in understanding the same.

thanks in advance.