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

BAPI and Userexit

Former Member
0 Likes
2,611

Hi guys,

Does a BAPI go through the logic in userexits?

If i use a BAPI to create a Sales order, will it go through the logic i code in the user exits.

If not does it mean that i cannot use BAPI's in this case?

I would greatly appreciate your replies..

thanks a lot..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,651

Hi Srinivas,

If your userexit is activated, it will be definitely called. Userexits works like a 'hook' in a normal process. You can call BAPI function module in user exits with proper coding. As you must be knowing few userexits are called more than once during the same process.

Thanks and Warm Regards.

Pras

7 REPLIES 7
Read only

Former Member
0 Likes
1,651

Hi,

BAPI's doesn't go thru logic in user-exits.

The User-exits are for standard Transactions to add custom code.

Thanks

Bala

Read only

Former Member
0 Likes
1,652

Hi Srinivas,

If your userexit is activated, it will be definitely called. Userexits works like a 'hook' in a normal process. You can call BAPI function module in user exits with proper coding. As you must be knowing few userexits are called more than once during the same process.

Thanks and Warm Regards.

Pras

Read only

0 Likes
1,651

of course we have to activate cmod enhancements, but i meant about the from userexits like in mv45afzz in sales order...

it should be going through as you said i believe..

otherwise u just cannot use BAPI's for create/change right? ( unless there is no code in the exits)

Read only

0 Likes
1,651

BAPIs should go through the user exit logic, if there is one active. Otherwise the whole purpose of user exits and BAPIs will be defeated. Eventually, somewhere deep in the code, BAPIs call the same 'perform' statements and function modules that a normal transaction would have.

Read only

Former Member
0 Likes
1,651

Hi,

I just want to add something based on my experience.

I had checked that BAPI_SALESORDER_CREATEFROMDAT2 calls the user exit in MV45AFZZ. I checked this for USEREXIT_MOVE_FIELD_TO_VBAP, USEREXIT_MOVE_FIELD_TO_VBKD, USEREXIT_PRICING_PREPARE_TKOMP, and USEREXIT_SAVE_DOCUMENT_PREPARE. So I think all the user exit in MV45AFZZ should be called.

Regards,

Teddy Kurniawan

Read only

Former Member
0 Likes
1,651

Most of User-Exit/BADI/Enhancement Spot implementation stil; work in BAPI function. But for screen check. And for new customerized field, we need to adjust BAPI's parameters to ensure the data(like SO/PO relatedBAPI).

Read only

Former Member
0 Likes
1,651

Yes the user exits would be called in the BAPI call.

Only if there are some screen changes using BDC, will they be impacted.