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: 

Passing VBAP data to Availability Check user exit

Former Member
0 Kudos

Hi All,

We have added a few custom fields to the VBAP table in our SAP instance.

I have a requirement to pass a couple of these custom fields during Sales Order creation / change to the availability check user exit - ZXATPU02.

But unfortunately, I am not able to locate the best place to do this.

I tried doing this in USEREXIT_MOVE_FIELD_TO_VBAP, but any changes to the custom fields do not seem to trigger this user exit.

I considered USEREXIT_CHECK_VBAP, but this seems to get called only after the execution of ZXATPU02 and not before.

Please share your ideas / experience if any in this regard.

I need to pass these fields to ZXATPU02, so that I can use these fields for certain processing inside this include.

Thank you.

Best Regards,

Keerthi

6 REPLIES 6

Former Member
0 Kudos

Hi Keerthi,

U can check the below link :

https://scn.sap.com/thread/2065600

Thanks

Tarak

0 Kudos

Hi,

The link you have suggested talks about using the user exit USEREXIT_MOVE_FIELD_TO_VBAP, which gets triggered only when you insert a new line and it does not work for my case.

Also, I had already mentioned in my post that I have tried this user exit and it does not work for my case when I am making changes to the existing line.

Please let me know if you have any other ideas.

Regards,

Keerthi

Former Member
0 Kudos

Keerthi,

check the include RV03VFZZ. There are 2 exits in this include related to ATP.

USEREXIT_AVAILABILITY_IN is called before ATP happens.

USEREXIT_AVAILABILITY_OUT is called after ATP is carried out.

If these exits are not useful, I would do the following. Place a break point in *_IN and the exits *TO_VBAP, *CHECK_VBAP and see the flow.

Also since this is related to ATP, check the exits *MOVE/CHECK_VBEP.

Hope this helps.

Thanks,

Vikram.M

Former Member
0 Kudos

Hi,

Try using the exit USEREXIT_CHECK_VBAP in the include program MV45AFZB and check if this is called before the exit ZXATPU02.

Hope this helps.

Regards,

Ravi.

0 Kudos

Hi Ravi,

No, it does not. I have already tried that and I have even mentioned that in my original post.

Regards,

Keerthi

Former Member
0 Kudos

Hi,

I found a workaround to this issue.

Instead of playing around with the confirmation quantity in the result of ATP inside ZXATPU02 include, I was able to achieve the desired result by making changes to the XVBEP[ ] internal table inside userexit_save_document_prepare.

Thanks for all your responses.

Regards,

Keerthi