2007 Sep 28 2:11 PM
Hi All,
I have 3 different systems. example sys1, sys2 and sys3
I will get three different files from three different systems. Using those data, one interface program will be updating two custom tables. Using custom tables one interface program will create the sales order.
if two users run the same interface for the diffrent data. while updating custom tables, error message will come like 'user1 is locked by custom table'.
So, here the files are processing one after the other.
I want the solution like, If N number of users processed the interfaces, Files have to process parallel, meaning how the custom tables will be update simultaniously.
Thanks and regards,
M.Rayapureddy
2007 Sep 28 2:22 PM
you should ensure that technical settings of your custom table are using buffering at record level or at least at a level where some key fields are present
the enqueue of the table is based on the buffering
2007 Sep 28 2:22 PM
you should ensure that technical settings of your custom table are using buffering at record level or at least at a level where some key fields are present
the enqueue of the table is based on the buffering
2007 Sep 28 2:40 PM
Give me the function modules that enqueue the table with buffer.
Other than buffering how to deal the above situation...
Thanks in advance,
with kind regards,
M.Rayapureddy
2007 Sep 28 3:03 PM
Go to SE11 and create a new "Lock object" for your table
you will generate ENQUEUE and DEQUEUE function modules that will be able to lock entries according to your needs
2007 Sep 28 3:05 PM
Hi Rayapu,
although I think the error is like
'custom table is locked by user1'.
and not
'user1 is locked by custom table', (imagine!),
every ENQUEUE function has a WAIT parameter. Set this to 'X' and if the table is locked, it will wait (default 3 or 5 seconds) to be able to set a lock.
In most cases, this helps.
Actually I have no experience (and it is not documented) what happens in the case of multiple lock requests, possibly the are processed on a first-come, first lock base. But I think if the actual update (and unlocking) process is not too slow, this may work.
Please let me know if this extremely simple solution works.
Regards,
Clemens
2007 Sep 28 3:13 PM
ENQUEUE function modules have parameters for the key fields of the table - so when enqueueing the table you do not need to do the whole table, only the records you want. This lets multiple users insert / update their own entries.
To get different keys for each user, use a number range object to allocate the numbers.
Andrew