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: 

Alternative for USEREXIT_SAVE_DOCUMENT(MV45AFZZ) in S4HANA Private Cloud

Subham
Explorer
0 Kudos

Hello Experts,

We have a requirement to write the same functionality(currently present in the user exit) in BAdI instead of the above user exit.
Can anyone suggest the alternative for the above user exit. 

Thanks in advance

3 REPLIES 3

raymond_giuseppi
Active Contributor
0 Kudos

Some options

  1. Use the good old user exits, but not with a sccr key and modification, but using implicit enhancement points at start/end of the fiorms of MV45AFZZ.
  2. If you are an SAP employee, look at BAdI BADI_SD_SALES.
  3. Analyze form BELEG_SICHERN of include MV45AF0B_BELEG_SICHERN.

What did you already try?

0 Kudos

Hi,

Implicit enhancements fall under legacy development (tier 3), which will not be certified for the S4HANA private cloud. We are searching for alternatives as a result.

We have found the alternative for the subroutine USEREXIT_SAVE_DOCUMENT_PREPARE as SD_SLS_CHECK_BEFORE_SAVE (BAdI definition). Likewise we are searching the alternative for USEREXIT_SAVE_DOCUMENT.

The one you have given BADI_SD_SALES, It is for internal use so we can not create implementation.

Thanks

0 Kudos

So you have to use my option 3 (1 doesnt comply your requirement, 2 only for SAP as written)

  • the BAdI SD_SLS_CHECK_BEFORE_SAVE is called just before USEREXIT_SAVE_DOCUMENT_PREPARE (form BELEG_SICHERDN in include MV45AF0B_BELEG_SICHERN)
    NB: The BAdi signature doesn't contain every data available in the old user-exit (every global data) so you may be required to adapt the code to access missing data.
  • But in my latest S/4HANA version, only the SAP restricted BAdI is called before USEREXIT_SAVE_DOCUMENT. So did you look for enhancement-points such  as BELEG_SICHERN_08  of Enhancement Spot ES_SAPMV45A in your version ?