‎2008 Jan 30 9:28 PM
Hi,
I have a quick question.
There is part in the project where we need to update information in SAP which we gather from the user. I am getting a series of name from user and updating it. For that I am using insert statement. If user tries modify those series of name, I do delete first and insert again.
I am not sure whether it is a good way. Also my concern is whether there will be performance overhead for SAP through my way?
thanks.
- deepan
‎2008 Jan 30 9:35 PM
Deepan,
Your method is fine. No performance issue to be concerned about.
You could also just use the MODIFY verb.
It handles INSERT-ing and UPDATE-ing all in one statement.
By that - I mean:
If "Jake" does not exist in the table, it will be INSERT automatically.
If "Jake" does exist in the table and you changing something about Jake's info, it will be UPDATEd automatically.
All by using the MODIFY verb.
‎2008 Jan 30 10:03 PM
Hi Deepan
As said by John ^ modify will change and update.. it works based on primary keys.
Ztable has jake jane jay in it already and are *primary key fields*
itab has Andy Bob Candy jay.
modify Ztable from itab.
Andy Bob and Candy are inserted into Ztable... Jay already exist in the table and there cannot be redundancies with primary key fields.