Application Development 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: 

ATP user exits EXIT_SAPLATPC_002

Former Member
0 Kudos

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.

Thanks!

Abby

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Abby,

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

T_MDVEX-BDCNT = T_ATPCSX-XLINE or T_ATPCSX-YLINE.

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

Regards,

Srinivas

4 REPLIES 4

Former Member
0 Kudos

Hi Abby,

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

T_MDVEX-BDCNT = T_ATPCSX-XLINE or T_ATPCSX-YLINE.

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

Regards,

Srinivas

Former Member
0 Kudos

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?

Former Member
0 Kudos

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 -

Abby

0 Kudos

Thanks Abby for posting the follow-up. But I think if SAP has a way to do it for a fee, I would assume we can also find a workaround within the enhancement perview. I will check if that is possible and post it here, if I find something.

Srinivas