Skip to Content

user-exit & badi for VA02

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)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jun 04, 2014 at 11:04 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

  • Posted on Jun 04, 2014 at 11:52 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Jun 04, 2014 at 10:33 AM

    Hi,

    Kindly check XVBAP-netwr in that Exit V45A0003.

    Regards,

    Venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 04, 2014 at 12:00 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.