Application Development and Automation 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: 
Read only

need help with BADI..

Former Member
0 Likes
1,046

hi,

in VA02 when i delete a sales item, i need to check something and if that validates to true, i dont want to allow the user to delete that item.

i was able to trace up to a level where when user clicks on the minus icon in the materials window and confirms by clicking Yes, a BADI called BADI_SD_SALES_ADDON is called.

but SAP fails to get a handle of it's class which is CL_EX_BADI_SD_SALES_ADDON. I am not sure how i implement my code inside this class!! I cannot implement BADI_SD_SALES_ADDON as SAP does not allow me to do so.. what shall i do ?

i think if i make SAP to get the handle of CL_EX_BADI_SD_SALES_ADDON then if i write my code inside this class as an implicit enhancement ?? I am not sure.

any suggestions please ?

thks

hi,

in VA02 when i delete a sales item, i need to check something and if that validates to true, i dont want to allow the user to delete that item.

i was able to trace up to a level where when user clicks on the minus icon in the materials window and confirms by clicking Yes, a BADI called BADI_SD_SALES_ADDON is called.

but SAP fails to get a handle of it's class which is CL_EX_BADI_SD_SALES_ADDON. I am not sure how i implement my code inside this class!! I cannot implement BADI_SD_SALES_ADDON as SAP does not allow me to do so.. what shall i do ?

i think if i make SAP to get the handle of CL_EX_BADI_SD_SALES_ADDON then if i write my code inside this class as an implicit enhancement ?? I am not sure.

any suggestions please ?

thks

6 REPLIES 6
Read only

Former Member
0 Likes
899

Hi,

The BADI BADI_SD_SALES_ADDON is used for internal SAP purpose..Check the BADI in SE18..The withinsap checkbox is checked..

Try using the userexit USEREXIT_CHECK_VBAP in MV45AFZB.

Thanks

Naren

Read only

0 Likes
899

Hi Narendran,

I tried using the user exit check vbap, but the code there gets executed only when i add an item, not when i delete the item.

thats why i started looking at badis...

any other user exits or tips ?

thks

Read only

Former Member
0 Likes
899

Hello,

See these:

/people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners

The last link shows step by step how to create a BADI implementation.

Regards.

Read only

0 Likes
899

Thanks Davis, the links u gave are for creating a new BADI of which I am very well aware of . But I need to know for this paricular issue of mine, how do i go ahead with the BADI class CL_EX_BADI_SD_SALES_ADDON. This is a standard BADI class, not custom one.

thks

Read only

0 Likes
899

OK..I got it...it is USEREXIT_CHECK_XVBAP_FOR_DELET.

Read only

Former Member
0 Likes
899

resolved myself.