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

ATP user exits EXIT_SAPLATPC_002

We are using user exit EXIT_SAPLATPC_002 to modify ATP after determination by the system. However, when a material is listed multiple times on purchase order/STO, when reaching this user exit all the line items related to this material appear in the table T_ATPCSX.

When there are multiple materials (and no duplication of materials in the line items) this problem does not exist, as the user exit is run for each material individually and the table T_ATPCSX appears only for the given material.

The problem lies in modifying the availability/committed quantity via table T_MDVEX. There is no way to determine which line in T_MDVEX is for whichline in the STO/purchase order when there are multiple lines containing the same material - T_MDVEX contains no identifying information besides perhaps quantity and date - and that should not be the information you match up table T_ATPCSX with table T_MDVEX for, as it's pretty unreliable when you could have duplicate lines with the

same quantities and dates.

Does anybody have a solution for matching the data in T_ATPCSX with the data in table T_MDVEX for the purposes of modifying the committed quantities? Help is much appreciated as I'm tearing my hair out over this one.


Abby 😊

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jan 19, 2005 at 08:46 PM

    Hi Abby,

    I haven't used this but looks like the link between the two tables is as follows


    Please check it in debugging and let me know if I hit the target.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2005 at 08:57 AM

    I have checked this in debugging - was hoping for the same thing you did, or perhaps field XLINE in T_MDVEX. T_ATPCSX-XLINE does match up with T_MDVEX-BDCNT, but I don't believe this is a definitive match.

    The reason I believe this is that if you enter a second line of the same material into the STO, you will get the first line of the material twice in the table T_ATPCSX - once for ATPing the current qty on the first line, the third to un-ATP the old qty on the first line (even if they are the same amounts). The second line would be the second line item in the STO.

    The XLINE in T_ATPCSX is 1, 2, 3 correspondingly - even though there's only two lines in T_MDVEX to match up with.

    Potentially we COULD do this where we only look at the ATP lines with values > 0, as these all appear to be the first lines in the table, and the un-ATP lines come last, but I'm not sure this is guaranteed (and it sounds kind of sketchy).

    Any thoughts anybody?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2005 at 02:42 PM

    To anybody who may be interested after reading this topic - it can't be done under standard SAP, per OSS. They will modify the code for you to do it, but for a fee.

    Thanks -


    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.