Skip to Content
avatar image
-4
Former Member

Multiple users executing the same program at same time and multiple equipment's getting created

Hello,

The program accepts a excel file and creates equipment.My issue is when multiple users execute the program at the same time,it creates multiple equipment's for the same record combination.

Let's say file has 2 records and 2 users are running the program at same time.

Now program will create 2 equipment's for 1st record and 2 equipment's for 2nd record.A total of 4 equipment's are getting created instead of 2.

I do not want this to happen and do not want to lock the program. I still want to allow multiple users to run the program at the same time and if first record is already processed by one user it should be skipped in another processing and should continue with other record.Please help me in solving this issue.

Add comment
10|10000 characters needed characters exceeded

  • What happens if user one runs the program and then user two runs the program? You'll still get 2 equipments for the first record and 2 equipments for the second, won't you?

    Why are two users loading the same excel at the same time anyway.

    Your scenario is somewhat strange.

  • Former Member Matthew Billingham

    2 equipment's are created for the first record only when both the users start execution at same time. Yes,scenario is strange.This situation is not frequent though but when this situation arises program should be in a position to process as explained.

  • I think you'd be well advised to read up again on the SAP locking concept and lock objects.

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 19 at 10:35 AM

    Hi!

    Do you use lock objects in the processing? If you use INDX table, you can also lock it by FM ENQUEUE_ESINDX so this will prevent other users from processing the entry.

    Hope it's helpful

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 21 at 09:50 AM

    Hi Pavan,

    I assume from your query that you are Migrating the data and creating equipment in bulk.

    As you said it created 2 different equipment if run in parallel ,I assume you are using the internal number range.

    To fix it , you can create a Z table that can hold the record of identification from excel file. if that record is present then any other program with same set of record won't process it.

    Regards

    Himanshu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 05 at 06:32 AM

    Hi Matthew,

    Thank you and locking works.

    Add comment
    10|10000 characters needed characters exceeded