Skip to Content
author's profile photo Former Member
Former Member

Material Master data

Hi,

We have a process in our system, as soon as a new material is created, one of the material characterisctics should be updated with a value based on some conditions which are coded in a custom program.

For this we are triggering a task as soon as a material is crated, through which the program is called which updates the characteristic of the material through MM02.

Now the problem is, our operators create two materials with a delay of 1 second only. This is resulting in assignment of the same characteristic value to Two materials, which should not happen?

How to resolve this issue?

Could anyone help me in this regard.

Thanks,

Madhusudan.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 01:39 AM

    We had a similar requirement.

    what we did is, we created a table and we flag the table before start of the process and after successful creation we delete the flag.

    Now every other process trying to do the same thing will wait till the flag is available and then flag for itself.

    Let me know if it helps!!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 02:10 AM

    Can you not pass the material number to the task ( or use ABAP memory ) , so that in your program you can use this material number to update the correct characteristic . Which version you are on. Material master creation itself has a business transaction event where you can write the code for triggering another update ( thru MM02) on the same material may be after a delay .

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

    • I am still confused as to how your program knows which material it needs to work on. When you start the customer task, how are you passing the material number to your program?

      Also, did you check my other post where I suggested you to look at initialization? Could that be a cause?

      From your problem definition, it looked like you are able to do the changes, only that they are wrong values. That is why I am thinking that it may be to do with some values held in the memory.

      Srinivas

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 12:37 AM

    Hi

    You can try to use the block, the first transaction triggers the block, the second transaction can't run the updating process if block is active.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 18, 2005 at 02:34 AM

    Hi Madhu,

    Please give us some information.

    "<i>For this we are triggering a task as soon as a material is crated, through which the program is called which updates the characteristic of the material through MM02</i>."

    How are triggering this task and what are you passing to the called program? How is the called program determining which material it has to work on?

    Looks like your characteristic assignment is happening correctly, which means that the program is getting the material number properly. But the values seems to be duplicated. Under normal circumstances this should not happen because, both the material creation events should have triggered two different instances of the program execution.

    This will happen only if they are sharing the same memory somehow or there is a memory leak. Make sure that you initialize all your variables before you fill them in your program. Also initialize any parameter ids associated with the material master or the characteristics. Clear all variables and refresh all internal tables in the INITIALIZATION event.

    Regards,

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.