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: 

user-exit & badi for VA02

Former Member
0 Kudos

Hi everyone,

I want to ask you guys (and girls), after I have reviewed all the posts about find user-exit and badi, since I'm not completely sure about what I have found, and I know it could look really a huge discussion, but it is not, I was just detailed in order for you to don't lose your time and focused on the specific answer I'm asking you, I hope you will understand and just take a look. Thank you in advance.

This is my task

to found user-exit or badi:

- before calling VA02

- after requesting to display an order number in VA02

- after modifying something within a specific order in VA02

- after saving

Till now I know I have found those user-exit, and tell me if I'm wrong, but for VA02 there are only those one:

  • SDAPO001  Activating Sourcing Subitem Quantity Propagation
  • SDTRM001  Reschedule schedule lines without a new ATP check
  • V45A0001  Determine alternative materials for product selection
  • V45A0002  Predefine sold-to party in sales document
  • (* triggered after save) V45A0003  Collector for customer function modulpool MV45A
  • V45A0004  Copy packing proposal
  • V45E0001  Update the purchase order from the sales order
  • V45E0002  Data transfer in procurement elements (PRreq., assembly
  • V45L0001  SD component supplier processing (customer enhancements
  • V45P0001  SD customer function for cross-company code sales
  • V45S0001  Update sales document from configuration
  • V45S0003  MRP-relevance for incomplete configuration
  • V45S0004  Effectivity type in sales order
  • V45W0001  SD Service Management: Forward Contract Data to Item
  • V46H0001  SD Customer functions for resource-related billing
  • V60F0001  SD Billing plan (customer enhancement) diff. to billing

And for all of them, just one is good for me, since no one, after putting breakpoints inside the include of each FM user-exit, is being called when I called VA02, or when I put an order number and get the details, or when I modify a detail in that order number, or when I save.

The only one I found which is being called when I SAVE is V45A0003. (for this one I want to check "net-value" but don't know how to use it).

- can you tell me if I can use V45A0003 user exit, to check "net-value"? (if yes, how? if not, then in what ways can I achieve that?)

- can you help me understand if there are other user-exit for VA02?

- would you give me a better solution to find badi, since there are no user-exit good for my task?

WHAT I HAVE DONE till now:

- in order to find user exit:

  - go to Transaction

  - /h (activate debugger)

  - breakpoints - breakpoint at - breakpoint at statement

  - "Call Customer-function" in abap commands

  - F8 to find all different user exits

OR

  - go to SE93 put TCODE

  - get package name

  - go to CMOD->utilities->sap enhancement

  - put package name and run

  - find out all the user-exit for that tcode

- in order to check user-exits found:

- go to SMOD, check each user-exit, inside the include of the function put a breakpoint and then call the VA02 and try to understand if the breakpoint is being triggered

- in order to find badi (I'm not sure):

  - SE24

  - CL_EXITHANDLER

  - GET_INSTANCE

  - breakpoint-> CALL METHOD cl_exithandler=>get_class_name_by_interface

  - go to Transaction you are interested in

  - check out the variable exit and press F8 (save all the badi which are being called)

- in order to check badi found:

- ? (I don't know how to)

1 ACCEPTED SOLUTION

shah_viraj
Active Participant
0 Kudos

Hi Denis,

I want to correct you when you say "in order to check user-exits found:"

Before putting the break point in the function module of the exit, it is necessary to activate the same.

For test purpose you may go to SMOD and click on Test button, there you will find activate button.

Unless you activate the project in SMOD or CMOD, the exit will not triggered.

11 REPLIES 11

VenkatRamesh_V
Active Contributor
0 Kudos

Hi,

Kindly check  XVBAP-netwr  in that Exit V45A0003.

Regards,

Venkat

0 Kudos

what about the main task?

shah_viraj
Active Participant
0 Kudos

Hi Denis,

I want to correct you when you say "in order to check user-exits found:"

Before putting the break point in the function module of the exit, it is necessary to activate the same.

For test purpose you may go to SMOD and click on Test button, there you will find activate button.

Unless you activate the project in SMOD or CMOD, the exit will not triggered.

0 Kudos

Hello Viraj,

I double click on the include, create the object of that include within the FM exit, write inside the include the breakpoint code, activate the include and then it works, just as it worked with the one I have found.

Is this correct?

thank you

0 Kudos

Did you create a Z project in CMOD?

0 Kudos

No explain me step by step what to do, should I review all the user-exit I have found?
If yes, how? (step by step please).

Do you know how can I find user-exit in another way? Since I have tried to goto SE93, get the package name for example of MM02 (MG) and then go to CMOD-utilities-sap enhancement and put MG as package, but it says it requires more search criteria.

How can I found all user exit and badi for a given TCODE? In a better way than the one I have wrote before?

Thank you Viraj.

0 Kudos

Hi Denis,

To find User-exit in a particular transaction below steps to be followed:

  • Go to transaction code, here let's say VA02
  • Enter into debug mode by entering /h.
  • Go to Breakpoints->Breakpoint at->Breakpoint at statement
  • Write 'Call customer-function' in abap commands.
  • it will put breakpoint at the user exits those are being called in that transaction.

To find BADI follow the below steps:

  • Go to class CL_EXITHANDLER in SE24
  • Go to method GET_INSTANCE.
  • put break point in this method.
  • the export parameter EXIT_NAME will give you the BADI name.

Thanks & regards,

Viraj.

former_member195402
Active Contributor
0 Kudos

Hi,

VA02 still has also classical userexits, that can't be found in SMOD/CMOD but in include MV45AFZZ.

  • FORM userexit_delete_document.
  • FORM userexit_field_modification.
  • FORM userexit_move_field_to_vbak.
  • FORM userexit_move_field_to_vbap.
  • FORM userexit_move_field_to_vbep.
  • FORM userexit_move_field_to_vbkd.
  • FORM userexit_number_range USING us_r
  • FORM userexit_pricing_prepare_tkomk.
  • FORM userexit_pricing_prepare_tkomp.
  • FORM userexit_read_document.
  • FORM userexit_save_document.
  • FORM userexit_save_document_prepare.

Regards,

Klaus

0 Kudos

Hello Kalus,

thank you for your help but can you also teach me how to find all possible user-exit and badi for a given TCODE?

I'm new so I want to understand how you got to that conclusion.

Thank you!

Denis

0 Kudos

Hi Denis,

please have a look at Raymond's answer below, who tells you about the different ways of modification options.

  • Business Transaction Events (Tcode FIBF)
  • User Exits (Tcodes CMOD / SMOD)
  • BADIs (Tcodes SE18 / SE19)
  • Classical User Exits (as in MV45AFZZ)
  • Enhancement Framework

For most of them you can get some information in SPRO. But there is no clear way to find all customer modification options for a given Tcode.

If you need help, then post a question in SCN. If you have enough experience, youll will have no need for this in the future.

Sometimes it is also helpful to scan SAP notes in the SAP Support Portal to get information of User Exits.

Regards,

Klaus

raymond_giuseppi
Active Contributor
0 Kudos

Did you look thru SPRO Customizing : Sales and Distribution, System Modifications, User Exits, Business Transaction Events and Business Add-In. You will get list of every user-exit, customer-exit, BTE and BAdI provided by SAP with some documentation.

Else use search-tool, there are already some thread/document at scn on how to look for customer-exit or BAdI, mostly thru package or using break-points.

Regards,

Raymond