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 maintance view and from program on the same time

Former Member
0 Likes
1,304

HI ,

I create program that update table with data online (can update lot of recodes on the same time ) ,and also provide maintenance view to the same table for admin in order to update the view records explicitly (i.e. update some entry in the table) .

I create lock object to the table.

My question's is:

1. if the admin want to update the table data from the maintenance view,if this create

a dead lock i.e. lock all the table record's until he finish to update the table or this is not cause any problem.

2. there is option to allow to lock the maintenance view just for on record at time ?

Best Regards

Nina

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,249

If you want to be sure that SM30 can only be used when there are no locks, then I advise you to modify the SM30 function group so that to lock all records from the lock object you created. Put the code where SM30 currently locks the table (E_TABLEE lock object as I could see).

But this is risky as your main transaction will be then unable to lock and will fail. Anyway, I guess that updating via SM30 is an emergency procedure (data integrity errors, recovery, etc.), then it may make sense to make it work like that.

HI ,

I create program that update table with data online (can update lot of recodes on the same time ) ,and also provide maintenance view to the same table for admin in order to update the view records explicitly (i.e. update some entry in the table) .

I create lock object to the table.

My question's is:

1. if the admin want to update the table data from the maintenance view,if this create

a dead lock i.e. lock all the table record's until he finish to update the table or this is not cause any problem.

2. there is option to allow to lock the maintenance view just for on record at time ?

Best Regards

Nina

11 REPLIES 11
Read only

Former Member
0 Likes
1,249

Hi,

Please look into following Link,

Please let me know if any query.

Thanks and regards,

ShreeMohan

Read only

0 Likes
1,249

HI ShreeMohan,

Tanks but i dont ask for lock single row by the enque lock object ,my question is if i can lock one recored on the

admin view ?

BR

Nina

Read only

0 Likes
1,249

Hi,

I am not Sure but, It cannot be done.

Becz when ever you try to modify Table record by using SM30 and some other try's to access same table via SM30, the later person get error.

To confirm plz ask your basis guy.

please also let me know if it is possible.

Thanks & Regards

Read only

0 Likes
1,249

HI ,

I dont want to update the view from 2 different session view,my question is if i have program that can update the table frequntly during the day and i have also maintance view to this table that admin can update recoreds there sevrel time on the day ,

if this can cause any problem?

p.s. i create to the table lock object .

BR

Nina

Read only

0 Likes
1,249

as far as i know the SM30 creates a table wide lock, which means once your admin is in SM30 your program wont be able to do any updates.

SM30 is not only for updating, but for creating new entries as well. Since noone can know what new entry you will do next, it cant be locked on key fields i think.

Read only

0 Likes
1,249

HI Florian,

ooh, so how sap recommended to handle this issue since i want to update the table sometimes in parallel process (from program and from the maintenance view ),

There is no solution for this problem?

there is no way to do that for the same table ?

Best Regards

Nina

Edited by: Nina C on Jul 17, 2009 12:16 PM

Read only

0 Likes
1,249

well i wrote: "as far as i know".

this SAP functionality is not programmed by myself, so i cant really tell. It´s just i hardly suspect it to be like i told you.

We could spam some words like "NUDE" and such, maybe some moderator gets alerted and has an answer while thinking about how to punish us...

Read only

0 Likes
1,249

HI Florian ,

By the way, do u think that maybe in other forum i can get the answer.... ?

Thanks!

Nina

Read only

0 Likes
1,249

actually, you can give it a shot, but i made the expierience that this SAP SDN forum is the source of the best answers.

Here really skilled people are trying to help and most of the times quickly, but still i´d give it some 24 hours, before giving up hope.

What you could do, if you are not too lazy for that (sry no offense), is to debug the SM30 and see what kind of lock is getting placed.

i had an idea and checked it out right now.

in SM12 you can see the lock entries for a certain table.

there are/were none for a table i picked.

then i went into SM30 edit mode with exactly THAT tablein another mode. then i refreshen the SM12 and still had no lock enries.

so i suspect no, you wont run into problems, doing what you want. at least not lock problems. i dont knwo how SAP overcomes the problems of simultaneous usage of that table then, but like it seems you wont get locvk problems.

Read only

0 Likes
1,249

HI Florian,

O.k. i give it a shot ,

Basically I'm afraid from dead lock problem when the admin try to update/insert records to the table ,

and the program that try to update /insert records to the table failed since all the table locked by the admin which create inconsistency .

Thanks

Nina

Edited by: Nina C on Jul 18, 2009 10:24 PM

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,250

If you want to be sure that SM30 can only be used when there are no locks, then I advise you to modify the SM30 function group so that to lock all records from the lock object you created. Put the code where SM30 currently locks the table (E_TABLEE lock object as I could see).

But this is risky as your main transaction will be then unable to lock and will fail. Anyway, I guess that updating via SM30 is an emergency procedure (data integrity errors, recovery, etc.), then it may make sense to make it work like that.