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

Update table without locking it

Former Member
0 Likes
1,738

Hi Guys,

I need to update a Z-table (create/change entries) through one z-program and dont want to lock the table while updating.

what would be the best approach to perform this task.

Regards,

Prashant

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,019

Hi,

If u don't want to lock the table then nothing special to do. Directly update the table using INSERT/MODIFY/UPDATE statements in ur zprogram.

INSERT ztable FROM TABLE i_ztable. " If the data is new always. i.e. i_ztable don't have records in Ztable.

MODIFY ztable FROM TABLE i_ztable. " If data is combination of existing and new records.i.e. i_ztable might have records in Ztable

Hope it helps.

Thanks,

Vinod.

6 REPLIES 6
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,020

Hi,

If u don't want to lock the table then nothing special to do. Directly update the table using INSERT/MODIFY/UPDATE statements in ur zprogram.

INSERT ztable FROM TABLE i_ztable. " If the data is new always. i.e. i_ztable don't have records in Ztable.

MODIFY ztable FROM TABLE i_ztable. " If data is combination of existing and new records.i.e. i_ztable might have records in Ztable

Hope it helps.

Thanks,

Vinod.

Read only

0 Likes
1,019

Hi,

Use update command.

Raghav

Read only

Former Member
0 Likes
1,019

Dont use END-OF-SELECTION in the program

regrasrd

rajesh

Read only

0 Likes
1,019

>

> Dont use END-OF-SELECTION in the program

>

> regrasrd

>

> rajesh

Why not?! What has that got to do with updating a table with or without locking it?!

Read only

Former Member
0 Likes
1,019

hiii

use from following query

-> UPDATE dbtab SET f1 ... fn.

-> UPDATE dbtab.

UPDATE *dbtab.

UPDATE (dbtabname)

-> UPDATE dbtab FROM TABLE i_tab.

UPDATE (dbtabname) FROM TABLE i_tab.

if you have used Insert statement then use MODIFY statement

-> MODIFY dbtab FROM wa.

-> MODIFY (dbtabname) FROM wa.

-> MODIFY dbtab FROM TABLE itab.

-> MODIFY dbtab

regards

twinkal

Read only

Former Member
0 Likes
1,019

Hi,

Use INSERT, MODIFY,UPDATE statements for update table

or insert data into table via internal table.

Use sy-subrc check for each updation/modification/insertion.

This is only for z-tables only.For standard table don't do these hings.U can load the data using table maintenance generator also.

Regards,

Naveen.