cancel
Showing results for 
Search instead for 
Did you mean: 

Re-ATP at User Exit

Former Member
0 Kudos

We have a requirement, to change the Schedule line delivery date (VBEP-EDATU) through custom enhancement based on Goods Issue date ( VBEP-WADAT). Hence we placed our custom logic inside the exit USEREXIT_CHECK_VBEP, but we observed that after changing the delivery date in this user exit, the SAP is not recalculating the goods issue date based on modified delivery date.  Please let us know is there any possibility to re-trigger the ATP check from this user exit.  i.e. based on VBEP-EDATU , we need to recalculate WADAT, MBDAT etc.., In case of standard SAP changes, these values will be automatically populated through ATP check.

If we place our logic before ATP check i.e. USEREXIT_MOVE_FIELD_TO_VBEP, we will not get the goods issue date populated in this exit, but our whole logic is based on the Goods issue date ( VBEP-WADAT).

Finally the solution will be, to build our logic after ATP check and then needs to re-trigger ATP check based on the modified delivery date from the custom logic, but we are unable to re-trigger ATP check.

Please share your thoughts to proceed on this.

Accepted Solutions (0)

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos

You have to give an attempt with ATP exits recommended in the following note:-

  • Note 1644443 - Documentation on User Exits in Availability check


G. Lakshmipathi

Former Member
0 Kudos

Hi Lakshmipathi -

We have already checked this note. This helps in triggering ATP before User Exit. We are looking to pass value to ATP after User Exit. All we need to know is the trigerring point for re-ATP the enter process.

Former Member
0 Kudos

Hi Ameet,

Check if it is better to use:

  • USEREXIT_MOVE_FIELD_TO_VBEP (in the program MV45AFZZ)

Hope it's useful.

Regards,

Ornella

Former Member
0 Kudos

Hi Ornella,

we have used this but faced with issue of incorrect index for vbep.

Former Member
0 Kudos

Hi Ameet,

Yes, you are right.

The problem is that this field apparently should not be change in any user exit.

Check note

Note 985130 - SAPSQL_ARRAY_INSERT_DUPREC in VBEP_BEARBEITEN

Solution

In your user exits and modifications, particularly user exit USEREXIT_MOVE_FIELD_TO_VBEP in include MV45AFZZ, check whether the values of one or more of the following fields are changed:

  • VBEP-POSNR  Sales document item
  • VBEP-EDATU  Schedule line date
  • VBEP-EZEIT  Arrival time
  • VBEP-PRGRS  Date type (day, week, month, interval)
  • VBEP-ABART  Contract release type
  • VBEP-ABRUF  Forecast delivery schedule number

If this is the case, deactivate the relevant statements or the entire modification, or exit and check whether the symptoms you observed are now gone.

It is generally valid that these fields may not be changed by modifications since they play a central role in the SAP processing logic for schedule lines.

Regards,

Ornella

Former Member
0 Kudos

Hi Ornella -

Thanks for your reply..but

As per the requirement, we need to modify VBEP- EDATU ( Schedule line delivery date ) based on VBEP-WADAT ( Goods issue date ). i.e. logic needs to be placed after standard SAP ATP check.

We placed all our logic in User Exit ‘USEREXIT_CHECK_VBEP’ to modify VBEP-EDATU . The same value is reflecting on Schedule line tab also, but this is not recalculating the goods issue date (WADAT) etc.. based on modified Delivery date.  i.e. after this user exit ATP check is not re triggering.

Hence we need the advice whether is it possible to re trigger the entire ATP check based on modified delivery date from this User exit.

Former Member
0 Kudos

Ameet,

Ok, according to the note: what you need to change, shouldn't be modified during user exit processing.

However, if you still want to re trigger the entire ATP check you can analyze include LV03VFMM.

The availability check is called between PERFORM USEREXIT_AVAILABILITY_IN and PERFORM USEREXIT_AVAILABILITY_OUT.

This is the standard call to availability check.

You can analyze this to copy the logic in your user-exit (I don't know any function or bapi to use for this purpose).

Hope it's useful.

Regards,

Ornella

Former Member
0 Kudos

Hi Ornella,

Hi Ornella -

our requirement is, we are triggering custom screen with proposed dates

and that date we are copying in back to requested delivery date

in this case above exit are not triggering

0 Kudos

I know this is a very old thread and probably you might have found a solution for this or shelved the idea, but here are my 2 cents.

The incorrect index is due to the fact that SAP has another structure which stores part of the VBEP fields with EDATU. The program reads this partial VBEP using the values from XVBEP. Since the EDATU is changed in XVBEP the read on the other structure fails because of which you get the incorrect index error. The solution to this is modify EDATU field in that structure as well. I think that is IVBEP1 but take the help of an ABAPer to find out the correct structure.